• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# WebControls.RepeaterCommandEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.Web.UI.WebControls.RepeaterCommandEventArgs的典型用法代码示例。如果您正苦于以下问题:C# RepeaterCommandEventArgs类的具体用法?C# RepeaterCommandEventArgs怎么用?C# RepeaterCommandEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



RepeaterCommandEventArgs类属于System.Web.UI.WebControls命名空间,在下文中一共展示了RepeaterCommandEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: rptList_ItemCommand

        /// <summary>
        /// 选择某一个微信公众帐号,并且将其保存到session里
        /// </summary>
        /// <param name="source"></param>
        /// <param name="e"></param>
        protected void rptList_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            switch (e.CommandName)
            {
                case "toIndex":
                    {
                        int wid = int.Parse(e.CommandArgument.ToString());
                        var weixin = bll.GetAppInfo(wid);
                        if (weixin.WStatus)
                        {
                            MessageBox.Show(this, "账号已被禁用,无法进入");
                            return;
                        }

                        if (weixin.EndDate != null)
                        {
                            if (weixin.EndDate < DateTime.Now)
                            {
                                MessageBox.Show(this, "账号已过期,无法进入");
                                return;
                            }
                        }

                        Session["nowweixin"] = weixin;
                        Utils.WriteCookie("nowweixinId", "WeiXinPF", e.CommandArgument.ToString());
                        Response.Write("<script>parent.location.href='../../../../index.aspx'</script>");
                    }
                    break;
            }
        }
开发者ID:jxiaox,项目名称:weixinpf,代码行数:35,代码来源:myweixinlist.aspx.cs


示例2: CtrlItemCommand

        protected void CtrlItemCommand(object source, RepeaterCommandEventArgs e)
        {
            var cArg = e.CommandArgument.ToString();
            var param = new string[3];

            switch (e.CommandName.ToLower())
            {
                case "addnew":
                    var discountcodes = new DiscountCodesData(_ctrlkey);
                    discountcodes.AddNewRule();
                    discountcodes.Save();
                    Response.Redirect(Globals.NavigateURL(TabId, "", param), true);
                    break;
                case "delete":
                    if (Utils.IsNumeric(cArg))
                    {
                        var discountcodes2 = new DiscountCodesData(_ctrlkey);
                        discountcodes2.RemoveRule(Convert.ToInt32(cArg));
                        discountcodes2.Save();
                    }
                    Response.Redirect(Globals.NavigateURL(TabId, "", param), true);
                    break;
                case "saveall":
                    Update();
                    Response.Redirect(Globals.NavigateURL(TabId, "", param), true);
                    break;
                case "cancel":
                    Response.Redirect(Globals.NavigateURL(TabId, "", param), true);
                    break;
            }
        }
开发者ID:Lewy-H,项目名称:NBrightBuy,代码行数:31,代码来源:DiscountCodes.ascx.cs


示例3: ValidateData

        public bool ValidateData(string strLabourType, RepeaterCommandEventArgs e)
        {
            string strQuery = "";
            if (strLabourType == "")
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "javascript:AlertMsg('Labour Type can not be left blank.');", true);
                return false;
            }
            else
            {
                if (e.CommandName.ToUpper() == "UPDATE")
                    strQuery = "Select Count(Lbr_type_id) From tbl_Lbr_Type Where Lbr_type_id<>" + Convert.ToInt32(Keys[e.Item.ItemIndex]) + " And Lbr_Type='" + strLabourType + "'";
                else if (e.CommandName.ToUpper() == "INSERT")
                    strQuery = "Select Count(Lbr_type_id) From tbl_Lbr_Type Where Lbr_Type='" + strLabourType + "'";

                int Lbr_Type_ID = (int)CrystalConnection.SqlScalartoObj(strQuery);

                if (Lbr_Type_ID > 0)
                {

                    ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "javascript:AlertMsg('Labour type already exist.');", true);
                    return false;
                }
            }

            return true;
        }
开发者ID:AAGJKPRT,项目名称:LMT,代码行数:27,代码来源:LabourType.ascx.cs


示例4: ShippingEdits

        public void ShippingEdits(object s, RepeaterCommandEventArgs e)
        {
            Address address = new Address();
              Guid selectedAddress = new Guid(e.CommandArgument.ToString());
              _user = new WebProfile().GetProfile(ddlCustomer.SelectedValue);
              address = _user.AddressCollection.Find(delegate(Address addressToFind) {
            return addressToFind.AddressId == selectedAddress && addressToFind.AddressType == AddressType.ShippingAddress;
              });

              if (address.AddressId != Guid.Empty) {
            if (e.CommandName == "Edit") {
              //Do the edit
              pnlBillingAddresses.Visible = false;
              pnlShippingAddresses.Visible = false;
              pnlEditAddress.Visible = true;
              LoadEditPanel(address);
              tcMyAccount.ActiveTab = tpAddresses;
            }
            if (e.CommandName == "Delete") {
              _user.AddressCollection.Remove(address);
              _user.Save();
              LoadAddresses();
              tcMyAccount.ActiveTab = tpAddresses;
            }
              }
        }
开发者ID:dashcommerce,项目名称:dashcommerce-3,代码行数:26,代码来源:customerinformation.aspx.cs


示例5: _repeater_ItemCommand

 protected void _repeater_ItemCommand( object source, RepeaterCommandEventArgs e )
 {
     try
     {
         if( e.CommandName == "Delete" )
         {
             using (var dc = new DCFactory<CmsDataContext>())
             {
                 int id = Convert.ToInt32( e.CommandArgument );
                 CatalogItem item = dc.DataContext.CatalogItems.Where( c => c.CatalogItemID == id ).SingleOrDefault();
                 if( item != null )
                     dc.DataContext.CatalogItems.DeleteOnSubmit( item );
                 dc.DataContext.SubmitChanges();
                 Response.Redirect( table.ListActionPath, true );
             }
         }
     }
     catch( ThreadAbortException )
     {
         throw;
     }
     catch( Exception ex )
     {
         _errorLabel.Text = ex.Message;
     }
 }
开发者ID:dmziryanov,项目名称:ApecAuto,代码行数:26,代码来源:List.aspx.cs


示例6: rptPricebf_ItemCommand

        protected void rptPricebf_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            if (e.CommandArgument.Equals("btnCom"))
            {
                TextBox txtCom = e.Item.FindControl("txtCom") as TextBox;
                Label labOid = e.Item.FindControl("LabOid") as Label;
                Label labCid = e.Item.FindControl("labCid") as Label;
                Label labMid = e.Item.FindControl("labMid") as Label;
                if (txtCom == null || txtCom.Text == null || labOid == null || labMid == null)
                {
                    return;
                }
                int oid = int.Parse(labOid.Text);
                int cid = int.Parse(labCid.Text);

                Model.Tao.Comment commodel = new Model.Tao.Comment();
                commodel.OrderID = oid;
                commodel.CourseID = cid;
                commodel.ModuleID = int.Parse(labMid.Text);
                commodel.UserID = CurrentUser.UserID;
                commodel.Comments = txtCom.Text;
                commodel.CommentDate = DateTime.Now;
                commodel.Status = 1;
                BLL.Tao.Comment combll = new BLL.Tao.Comment();
                if (combll.Add(commodel) > 0)
                {
                    BindDatabf();
                }
            }
        }
开发者ID:bookxiao,项目名称:orisoft,代码行数:30,代码来源:Userbuycourse.aspx.cs


示例7: Unnamed_ItemCommand

 protected void Unnamed_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     if (e.CommandName == "Page")
     {
         GridView1.PageIndex = Int32.Parse((string)e.CommandArgument);
     }
 }
开发者ID:davidfowl,项目名称:ReviewR,代码行数:7,代码来源:List.aspx.cs


示例8: MarkRepeater_ItemCommand

        protected void MarkRepeater_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            int id = Convert.ToInt16(e.CommandArgument);
            Eva.Model.Mark mark = new Model.Mark();
            mark = bll.GetModel(id);
            if (e.CommandName == "yes")
            {

                mark.Score = mark.Score + mark.BonusPoint;
                mark.CheckStep = 2;
                mark.Gpa = BLL.Utils.GetGpa(Convert.ToInt16(mark.Score));
                if (bll.Update(mark))
                {
                    Maticsoft.Common.MessageBox.Show(this, "已加分!");
                }

                markBing();
            }
            if (e.CommandName == "no")
            {
                mark.CheckStep = 3;
                if (bll.Update(mark))
                {
                    Maticsoft.Common.MessageBox.Show(this, "已拒绝!");
                }
                markBing();

            }
        }
开发者ID:huihao,项目名称:evaluation,代码行数:29,代码来源:ApplyList.aspx.cs


示例9: SitePackages_OnItemCommand

        protected void SitePackages_OnItemCommand(object source, RepeaterCommandEventArgs e)
        {
            if (e.CommandName.Equals("AddScreenshot"))
            {
                FileUpload upload = (FileUpload)e.Item.FindControl("FileUpload");
                String packageGuid = (String)e.CommandArgument;

                if (upload.HasFile)
                    SitePackageManager.NewInstance.AddScreenshot(Data.Guid.New(packageGuid), upload.FileName, upload.FileBytes);
            }
            else if (e.CommandName.Equals("DeleteScreenshot"))
            {
                String temp = (String)e.CommandArgument;
                String[] arr = temp.Split('|');
                if (arr.Length == 2)
                    SitePackageManager.NewInstance.DeleteScreenshot(arr[0].Trim(),arr[1].Trim());
            }
            else if (e.CommandName.Equals("DeletePackage"))
            {
                String packageGuid = (String)e.CommandArgument;
                SitePackageManager.NewInstance.DeletePackage(packageGuid);
            }

            DoDataBind();
        }
开发者ID:beachead,项目名称:gooey-cms-v2,代码行数:25,代码来源:Default.aspx.cs


示例10: rptSongs_ItemCommand

        public void rptSongs_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            var setSongService = new SetSongService(Ioc.GetInstance<ISetSongRepository>());

            var setSong = setSongService.GetSetSong(new Guid(e.CommandArgument.ToString()));

            if (e.CommandName.ToLower() == "fix")
            {
                txtSongName.Text = setSong.SongName;
                hdnSetSongIdToFix.Value = setSong.SetSongId.ToString();
            }
            else if (e.CommandName.ToLower() == "delete")
            {
                ///TEST THIS SECTION
                var songService = new SongService(Ioc.GetInstance<ISongRepository>());
                var song = songService.GetSong(setSong.SongId.Value);

                using (IUnitOfWork uow = UnitOfWork.Begin())
                {
                    setSongService.Delete(setSong);

                    if (song != null)
                        songService.Delete(song);

                    uow.Commit();
                }

                var setsongs = setSongService.GetAllSetSongs().Where(x => x.SongName.Contains(txtSearchSongName.Text));

                rptSongs.DataSource = setsongs;
                rptSongs.DataBind();
            }
        }
开发者ID:coredweller,项目名称:PhishMarket,代码行数:33,代码来源:EditSongNames.aspx.cs


示例11: rptUser_ItemCommand

 protected void rptUser_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     int id = a.normal.toInt(e.CommandArgument);
     if (e.CommandName == "delete")
     {
         string path = ad_main.admin_delete_img(id, "ad_img", "t_ad_ad");
         if (path != "")
         {
             File.Delete(Server.MapPath(path));
             if (ad_main.admin_delete_id(id, "t_ad_ad") > 0)
             {
                 MessShowBox.show("删除成功", this);
             }
             else
             {
                 MessShowBox.show("网络链接失败,删除失败", this);
             }
         }
         else
         {
             if (ad_main.admin_delete_id(id, "t_ad_ad") > 0)
             {
                 MessShowBox.show("删除成功", this);
             }
             else
             {
                 MessShowBox.show("网络链接失败,删除失败", this);
             }
         }
     }
     bind();
 }
开发者ID:kuangzhongwei,项目名称:ad,代码行数:32,代码来源:ad_ad.aspx.cs


示例12: ItemCommander

 protected void ItemCommander(object sender, RepeaterCommandEventArgs e)
 {
     if (Page.IsValid)
     {
         if (e.CommandName == "Save")
         {
             if (User.IsInRole("Employee"))
             {
                 try
                 {
                     MembershipUser mu = Membership.GetUser();
                     facade.SaveJob2(mu.ProviderUserKey.ToString(), Convert.ToInt16(e.CommandArgument));
                     Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "PopupScript", "<script>alert('You have successfully saved this job.');</script>");
                 }
                 catch (Exception ex)
                 {
                     throw ex;
                 }
             }
             else if (User.IsInRole("organization"))
             {
                 Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "PopupScript", "<script>alert('Sorry, recruiter can not save this job.\\nPlease login as job seeker.');</script>");
             }
             else
             {
                 FormsAuthentication.RedirectToLoginPage("authen=false");
             }
         }
     }
 }
开发者ID:chutinhha,项目名称:teachinvietnam,代码行数:30,代码来源:JobAlert.aspx.cs


示例13: UsersListRepeater_ItemCommand

        protected void UsersListRepeater_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            try
            {
                if (e.CommandName.ToUpper() == "EDITAR")
                {
                    ILogicaUsuario lu = FabricaLogica.getLogicaUsuario();
                    Docente d = new Docente { NOMBRE_USUARIO = Convert.ToString(e.CommandArgument) };
                    d = lu.getDocente(d);
                    if (d != null)
                    {
                        if (Session["EditarUsuario"] == null)
                            Session.Add("EditarUsuario", null);

                        Session["EditarUsuario"] = d;

                        Response.Redirect("~/AdminDocente/Usuarios.aspx", false);
                    }
                    else
                    {
                        lblInfo.Text = "Docente no encontrado";
                    }
                }
            }
            catch (Exception ex)
            {

                lblInfo.Text = ex.ToString();
            }
        }
开发者ID:thefumigator,项目名称:BiosWebMailLab2,代码行数:30,代码来源:ListarDocentes.aspx.cs


示例14: dataList_ItemCommand

 protected void dataList_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     switch (e.CommandName)
     {
         case "detail":
             {
                 var args = new
                 {
                     parentId = this.OrgTree.TreeView.SelectedValue,
                     id = e.CommandArgument.ToString()
                 };
                 this.PageEngine.OpenWindow<object, string>("org-detail.aspx", "org-detail", "width=600,height=285,resizeable=no", args, this.BindAll);
                 break;
             }
         case "delete":
             {
                 this.PageEngine.ShowConfirmBox<string>("确认删除吗", this.Delete, this.Cancel, e.CommandArgument.ToString());
                 break;
             }
         case "role":
             {
                 var args = new
                 {
                     type = "organization",
                     id = e.CommandArgument.ToString()
                 };
                 this.PageEngine.OpenWindow<object, string>("role-give.aspx", "org-give", "width=600,height=500,resizeable=no", args, this.Bind);
                 break;
             }
     }
 }
开发者ID:yhhno,项目名称:Membership,代码行数:31,代码来源:org-list.aspx.cs


示例15: Templates_ItemCommand

 protected void Templates_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     TemplateEditControl.TemplateId = Convert.ToInt32(e.CommandArgument);
     TemplateEditControl.Fill();
     TemplateEditControl.Visible = true;
     TemplateListPanel.Visible = false;
 }
开发者ID:bigWebApps,项目名称:Substitute,代码行数:7,代码来源:EditTemplates.aspx.cs


示例16: rptAssetSetupList_ItemCommand

 protected void rptAssetSetupList_ItemCommand(object sender, RepeaterCommandEventArgs e)
 {
     var setupId = e.CommandArgument.ToString();
     if (e.CommandName.Equals("DeleteDetail"))
     {
         if (!string.IsNullOrEmpty(setupId))
         {
             AssetSetupinfoService.DeleteAssetsetupinfoBySetupid(setupId);
             UIHelper.Alert(this, "删除成功");
             LoadData(pcData.CurrentIndex);
             return;
         }
     }
     if (e.CommandName.Equals("EditDetail"))
     {
         Response.Redirect(ResolveUrl(string.Format("~/Admin/NewInstall.aspx?Setupid={0}", setupId)));
     }
     else if (e.CommandName.Equals("ReplyDetail"))
     {
         Response.Redirect(ResolveUrl(string.Format("~/Admin/Install_Reply.aspx?Setupid={0}", setupId)));
     }
     else if (e.CommandName.Equals("ComfirmDetail"))
     {
         Response.Redirect(ResolveUrl(string.Format("~/Admin/Install_Confirm.aspx?Setupid={0}", setupId)));//安装结束后确认
     }
     else
     {
         Response.Redirect(ResolveUrl(string.Format("~/Admin/Install_View.aspx?Setupid={0}", setupId)));
     }
 }
开发者ID:chutinhha,项目名称:fixed-asset-system,代码行数:30,代码来源:InstallList.aspx.cs


示例17: rptShortlistedSelect_ItemCommand

        protected void rptShortlistedSelect_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            String vacancyNumber = e.CommandArgument.ToString();
            Session["vacancyNumber"] = vacancyNumber;

            setFeedback("Vacancy '"+vacancyNumber+"' is now selected.");
        }
开发者ID:TheProjecter,项目名称:turnkeycareers,代码行数:7,代码来源:SelectVacancy.aspx.cs


示例18: rptClassList_ItemCommand

 //删除操作
 protected void rptClassList_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     HiddenField txtClassId = (HiddenField)e.Item.FindControl("txtClassId");
     int id = Convert.ToInt32(txtClassId.Value);
     //switch (e.CommandName.ToLower())
     //{
     //    case "btndel":
     //        bll.Delete(Convert.ToInt32(txtClassId.Value));
     //        BindData();
     //        JscriptPrint("批量删除成功啦!", "", "Success");
     //        break;
     //    case "ibtnshow":
     //        Spread.Model.Channel model = bll.GetModel(id);
     //        if (model.IsShow == true)
     //            bll.UpdateField(id, "IsShow=false");
     //        else
     //            bll.UpdateField(id, "IsShow=true");
     //        BindData();
     //        break;               
     //    case "ibtnlock":
     //        Spread.Model.Channel model2 = bll.GetModel(id);
     //        if (model2.IsLock == true)
     //            bll.UpdateField(id, "IsLock=false");
     //        else
     //            bll.UpdateField(id, "IsLock=true");
     //        BindData();
     //        break;
     //}
 }
开发者ID:scutsky,项目名称:iyuewan,代码行数:30,代码来源:GameList.aspx.cs


示例19: CtrlItemCommand

        protected void CtrlItemCommand(object source, RepeaterCommandEventArgs e)
        {
            var cArg = e.CommandArgument.ToString();
            var param = new string[3];

            switch (e.CommandName.ToLower())
            {
                case "addnew":
                    var groupData = new GroupData(-1, EditLanguage);
                    Response.Redirect(NBrightBuyUtils.AdminUrl(TabId, param), true);
                    break;
                case "delete":
                    if (Utils.IsNumeric(cArg))
                    {
                        ModCtrl.Delete(Convert.ToInt32(cArg));
                    }
                    Response.Redirect(NBrightBuyUtils.AdminUrl(TabId, param), true);
                    break;
                case "saveall":
                    SaveAll();
                    NBrightBuyUtils.SetNotfiyMessage(ModuleId, NotifyRef + "save", NotifyCode.ok);
                    NBrightBuyUtils.RemoveModCache(-1); //clear any cache
                    Response.Redirect(NBrightBuyUtils.AdminUrl(TabId, param), true);
                    break;
                case "move":
                    if (Utils.IsNumeric(cArg))
                    {
                        MoveRecord(Convert.ToInt32(cArg));
                    }
                    Response.Redirect(NBrightBuyUtils.AdminUrl(TabId, param), true);
                    break;
            }
        }
开发者ID:DNNMonster,项目名称:NBrightBuy,代码行数:33,代码来源:PropertyGroups.ascx.cs


示例20: dataList_ItemCommand

 protected void dataList_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     switch (e.CommandName)
     {
         case "detail":
             {
                 this.PageEngine.OpenWindow<string, string>("role-detail.aspx", "role-detail", "width=600,height=278,resizeable=no", e.CommandArgument.ToString(), this.Bind);
                 break;
             }
         case "delete":
             {
                 this.PageEngine.ShowConfirmBox<string>("确认删除吗", this.Delete, this.Cancel, e.CommandArgument.ToString());
                 break;
             }
         case "config":
             {
                 this.PageEngine.OpenWindow<string, string>("role-operation.aspx", "role-operation", "width=600,height=520,resizeable=no", e.CommandArgument.ToString(), this.Bind);
                 break;
             }
         case "mutex":
             {
                 this.PageEngine.ShowMessageBox("暂不公开");
                 break;
             }
     }
 }
开发者ID:yhhno,项目名称:Membership,代码行数:26,代码来源:role-list.aspx.cs



注:本文中的System.Web.UI.WebControls.RepeaterCommandEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# WebControls.RepeaterItem类代码示例发布时间:2022-05-26
下一篇:
C# WebControls.Repeater类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap