当前位置: 首页>>代码示例>>C#>>正文


C# RepeaterCommandEventArgs类代码示例

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


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

示例1: repStyleCategory_ItemCommand

 protected void repStyleCategory_ItemCommand(object sender, RepeaterCommandEventArgs e)
 {
     HiddenField hidden = (HiddenField)e.Item.FindControl("StyleCategoryId");
     B_StyleCategory bll = new B_StyleCategory();
     bll.Delete(int.Parse(hidden.Value.ToString()));
     StyleCategory(0);
 }
开发者ID:suizhikuo,项目名称:KYCMS,代码行数:7,代码来源:StyleManager.aspx.cs

示例2: Repeater1_ItemCommand

    protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
    {
        if(e.CommandName=="View")
        {
            Response.Redirect("ViewVirtualMachineDetails.aspx?VmId=" + e.CommandArgument.ToString());
        }

        if (e.CommandName == "Start")
        {
            string VmId = e.CommandArgument.ToString();
            dataset = new DataSet();
            dataset = b_getdetailsby.GetPerticularVmDetailsByVmId(VmId);

            int Minit = Convert.ToInt32(dataset.Tables[0].Rows[0][9].ToString());
            if (Minit >= 1)
            {
                Response.Redirect("VirtualMachineActions.aspx?VmId=" + e.CommandArgument.ToString());
            }
            else
            {
                Response.Write("<script> alert('Buy More Credits To Start Virtual Machine'); </script>");
            }
        }

        if (e.CommandName == "Buy")
        {
            Response.Redirect("BuyCredits.aspx?VmId=" + e.CommandArgument.ToString());
        }

        if (e.CommandName == "Delete")
        {
            b_actions.DeleteVirtualMachine(Convert.ToInt32(e.CommandArgument.ToString()));
            LoadRepeater();
        }
    }
开发者ID:kishorenekkalapudi,项目名称:Simple-Cloud-Share,代码行数:35,代码来源:VirtualMachine.aspx.cs

示例3: insertFeedback

    protected void insertFeedback(object sender, RepeaterCommandEventArgs e)
    {
        //finding all the textbox and radiobuttonlist control inside the repeater
        TextBox fname = (TextBox)e.Item.FindControl("txt_fname");
        TextBox lname = (TextBox)e.Item.FindControl("txt_lname");
        TextBox email = (TextBox)e.Item.FindControl("txt_email");
        TextBox phone = (TextBox)e.Item.FindControl("txt_phone");
        TextBox city = (TextBox)e.Item.FindControl("txt_city");
        TextBox state = (TextBox)e.Item.FindControl("txt_state");
        TextBox feedback = (TextBox)e.Item.FindControl("txt_feedback");
        RadioButtonList rblpatient = (RadioButtonList)e.Item.FindControl("r_isPatient");
        RadioButtonList rblgender = (RadioButtonList)e.Item.FindControl("r_gender");
        Label message = (Label)e.Item.FindControl("lbl_message");



        switch (e.CommandName)
        {
                //if commandname is insert,insert data intp feedback table and send email to person who submitted feedback
            case "Insert":
                _strMessage(obj.commitInsert(fname.Text, lname.Text, rblpatient.SelectedItem.Text, rblgender.SelectedItem.Text, city.Text, state.Text, phone.Text, email.Text, feedback.Text), "Thank you for the feedback");
                objSendMail.sendEMail(email.Text, "<div><br />" + "<br />Thank you for yor Feedback! <br/>"
                   + "' <br />We will reply as soon as possible", "(Blind River District Health Centre)", true);
                _subRebind();
                break;
            case "Cancel":
                _subRebind();
                break;
        }
    }
开发者ID:resh2302,项目名称:BRDHC-BkUp,代码行数:30,代码来源:feedback.aspx.cs

示例4: repLabelContent_ItemCommand

 protected void repLabelContent_ItemCommand(object sender, RepeaterCommandEventArgs e)
 {
     B_LabelContent bll = new B_LabelContent();
     if(e.CommandName=="Delete")
     {
         Label lblLabelCategoryId = e.Item.FindControl("lblLabelCategoryId") as Label;
         bll.Delete(lblLabelCategoryId.Text.ToString());
     }
     if (e.CommandName == "DeleteAll")
     {
         string strLabelCategoryId = string.Empty;
         foreach (RepeaterItem rowview in repLabelContent.Items)
         {
             CheckBox _cb = rowview.FindControl("CheckBox1") as CheckBox;
             bool isChecked = _cb.Checked;
             Label lblid = rowview.FindControl("lblLabelCategoryId") as Label;
             if (isChecked)
             {
                 strLabelCategoryId +=  lblid.Text+ ",";
             }
         }
         if (strLabelCategoryId.EndsWith(","))
         {
             strLabelCategoryId = strLabelCategoryId.Substring(0, strLabelCategoryId.Length - 1);
         }
         if (strLabelCategoryId == string.Empty || strLabelCategoryId.Trim().Length == 0)
         {
             Function.ShowSysMsg(0, "<li>请选择要删除标签所对应的复选框</li><li><a href='javascript:history.back()'>返回上一页</a></li>");
         }
         else
             bll.Delete(strLabelCategoryId.ToString());
     }
     StyleBind();
 }
开发者ID:suizhikuo,项目名称:KYCMS,代码行数:34,代码来源:LabelManager.aspx.cs

示例5: rDistanceLimits_Delete

 protected void rDistanceLimits_Delete(object source, RepeaterCommandEventArgs e)
 {
     var d = DistanceLimits.OrderBy(x => x.Amount).ToList();
     d.RemoveAt(e.CommandArgument.ToString().TryParseInt());
     DistanceLimits = d;
     BindRepeater();
 }
开发者ID:AzarinSergey,项目名称:learn,代码行数:7,代码来源:ShippingByRangeWeightAndDistance.ascx.cs

示例6: RptFAQ_ItemCommand

    protected void RptFAQ_ItemCommand(object source, RepeaterCommandEventArgs e)
    {
        string strCommand = e.CommandName;
        int nID = ConvertData.ConvertToInt(e.CommandArgument);
        FAQs objFAQ = new FAQs();
        switch (strCommand)
        {
            case "Delete":
                int nDelete = objFAQ.DeleteById(nID);
                BindDataToGrid(1);
                break;

            case "Edit":
                string sEdit = Constants.ROOT + Pages.BackEnds.ADMIN + "?" + Constants.PAGE + "=" + Pages.BackEnds.STR_FAQ_ADD + "&" + Constants.ACTION + "=" + Constants.ACTION_EDIT + "&" + Constants.ACTION_ID + "=" + nID;
                Response.Redirect(sEdit);
                break;

            case "Active":
                int nActive = objFAQ.UpdateStatus(nID, EnumeType.INACTIVE);

                BindDataToGrid(1);
                break;

            case "Inactive":
                int nInactive = objFAQ.UpdateStatus(nID, EnumeType.ACTIVE);

                BindDataToGrid(1);
                break;
        }
    }
开发者ID:changtraicantinh,项目名称:atpgroup,代码行数:30,代码来源:FAQMan.ascx.cs

示例7: Repeater1_ItemCommand

    protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
    {
        if (e.CommandName == "delete")
        {
            using (var db = new ItshowEntities2())
            {
                string workName = e.CommandArgument.ToString();
                var workRm = db.Display__works.SingleOrDefault(a => a.Name == workName);
                if (workRm == null)
                {
                    Response.Redirect("~/Backstage/Addadmin.aspx");
                }
                else
                {
                    db.Display__works.Remove(workRm);
                    int Vf = db.SaveChanges();
                    db.SaveChanges();
                    if (Vf == 1)
                    {

                        Response.Write("<script>alert('删除成功');</script>");
                        Response.Write("<script>location.reload()</script>");

                    }
                    else
                    {
                        Response.Write("<script>alert('删除失败');</script>");
                    }

                }
            }

        }
    }
开发者ID:ITgithubTest,项目名称:githubTest,代码行数:34,代码来源:workList.aspx.cs

示例8: subUpDel

    protected void subUpDel(object sender, RepeaterCommandEventArgs e)
    {
        switch (e.CommandName)
        {
            case "Update":
                DropDownList ddl = (DropDownList)e.Item.FindControl("ddl_subjectU");

                TextBox txtSubjectID = (TextBox)e.Item.FindControl("txt_subjectidU");
                TextBox txtMenuName = (TextBox)e.Item.FindControl("txt_menunameU");
                TextBox txtTitle = (TextBox)e.Item.FindControl("txt_titleU");
                TextBox txtPageContent = (TextBox)e.Item.FindControl("txt_pagecontentU");
                HiddenField hdfID = (HiddenField)e.Item.FindControl("hdf_id");
                int pageID = int.Parse(hdfID.Value.ToString());

                string selected = ddl.SelectedValue.ToString();

                int selectedid = int.Parse(selected);

                _strMessage(objPage.commitUpdate(pageID, selectedid, txtMenuName.Text, txtTitle.Text, txtPageContent.Text), "update");

               // ddl.SelectedValue = pageID.ToString();
               // _strMessage(objPage.commitUpdate(pageID, int.Parse(txtSubjectID.Text.ToString()), txtMenuName.Text, txtTitle.Text, txtPageContent.Text), "update");
                _subRebind();
                break;
            case "Delete":
                int _id = int.Parse(((HiddenField)e.Item.FindControl("hdf_id")).Value);
                _strMessage(objPage.commitDelete(_id),"delete");
                    _subRebind();
                break;
            case "Cancel":
                _subRebind();
                break;
        }
    }
开发者ID:hharrysidhu,项目名称:timmins,代码行数:34,代码来源:pages_cms.aspx.cs

示例9: rptSearchScenics_ItemCommand

    protected void rptSearchScenics_ItemCommand(object source, RepeaterCommandEventArgs e)
    {
        if (e.CommandName == "addscenic")
        {

            int scenicId = Convert.ToInt32(e.CommandArgument);
            //为联票创建一张门票
            DJ_TourEnterprise ent = bllEnt.GetOne(scenicId);
            //如果该拥有者已经有一张门票属于该套票 则不做任何操作
            if (CurrentTicket.TicketList.Where(x => x.Scenic.Id == scenicId).Count() > 0)
            {
                CommonLibrary.Notification.Show(this, "", "该套票已经包含此景区的门票,不需要创建", "");
            }
            else
            {
                TicketNormal t = new TicketNormal();
                t.BeginDate = DateTime.Today;
                t.EndDate = DateTime.MaxValue;
                t.IsMain = false;
                t.Lock = true;
                t.Name = CurrentTicket.Name + "-" + ent.Name;
                t.Scenic = ent;
                //获得主票的原价信息,赋值给自动创建的门票
                decimal originalPrice = 0;
                if (ent.Tickets.Count > 0)
                {

                    if (ent.Tickets.Where(x => x.IsMain).Count() > 0)
                    {
                        originalPrice = ent.Tickets.Where(x => x.IsMain).ToList()[0].GetPrice(PriceType.Normal);
                    }
                    else
                    {
                        originalPrice = ent.Tickets[0].GetPrice(PriceType.Normal);
                    }
                }
                IList<TicketPrice> tpList = new List<TicketPrice>();
                TicketPrice tp1 = new TicketPrice();
                tp1.Price = 0;
                tp1.PriceType = PriceType.PayOnline;

                TicketPrice tp2 = new TicketPrice();
                tp2.Price = 0;
                tp2.PriceType = PriceType.PreOrder;

                TicketPrice tp3 = new TicketPrice();
                tp3.Price = originalPrice;
                tp3.PriceType = PriceType.Normal;

                tpList.Add(tp1);
                tpList.Add(tp2);
                tpList.Add(tp3);
                t.TicketPrice = tpList;
                t.TicketUnion = CurrentTicket;
                bllTicket.SaveOrUpdateTicket(t);
            }

            BindTickets();
        }
    }
开发者ID:phiree,项目名称:testttt,代码行数:60,代码来源:UnionTicketEdit.aspx.cs

示例10: RpBanner_ItemCommand

    protected void RpBanner_ItemCommand(object source, RepeaterCommandEventArgs e)
    {
        string strCommand = e.CommandName;
        int nID = ConvertData.ConvertToInt(e.CommandArgument);
        Banners objBanner = new Banners();
        switch (strCommand)
        {
            case "Delete":
                objBanner.LoadById(nID);
                Support.DeleteFile("banner", objBanner.Data.Images);
                int nDelete = objBanner.DeleteById(nID);
                BindDataToGrid(1);
                break;

            case "Edit":
                string sEdit = Constants.ROOT + Pages.BackEnds.ADMIN + "?" + Constants.PAGE + "=" + Pages.BackEnds.STR_BANNER_ADD + "&" + Constants.ACTION + "=" + Constants.ACTION_EDIT + "&" + Constants.ACTION_ID + "=" + nID;
                Response.Redirect(sEdit);
                break;

            case "Active":
                int nActive = objBanner.UpdateStatus(nID, EnumeType.INACTIVE);

                BindDataToGrid(1);
                break;

            case "Inactive":
                int nInactive = objBanner.UpdateStatus(nID, EnumeType.ACTIVE);

                BindDataToGrid(1);
                break;

        }
    }
开发者ID:changtraicantinh,项目名称:atpgroup,代码行数:33,代码来源:BannerMain.ascx.cs

示例11: subUpDel

 protected void subUpDel(object sender, RepeaterCommandEventArgs e)
 {
     switch (e.CommandName)
     {
         case "Update":
             TextBox txtTo = (TextBox)e.Item.FindControl("txtToU");
             TextBox txtFrom = (TextBox)e.Item.FindControl("txtFromU");
             TextBox txtBg = (TextBox)e.Item.FindControl("txtBgU");
             TextBox txtFont = (TextBox)e.Item.FindControl("txtFontU");
             TextBox txtFontS = (TextBox)e.Item.FindControl("txtFontSU");
             TextBox txtMsg = (TextBox)e.Item.FindControl("txtMsgU");
             HiddenField hdfID = (HiddenField)e.Item.FindControl("hdf_idU");
             int ecardID = int.Parse(hdfID.Value.ToString());
             _strMessage(objEcard.commitUpdate(ecardID, txtTo.Text, txtFrom.Text, txtBg.Text, txtFont.Text, txtFontS.Text, txtMsg.Text), "update");
             _subRebind();
             break;
         case "Delete":
             int _id = int.Parse(((HiddenField)e.Item.FindControl("hdf_idD")).Value);
             _strMessage(objEcard.commitDelete(_id), "delete");
             _subRebind();
             break;
         case "Cancel":
             _subRebind();
             break;
     }
 }
开发者ID:jacqueline27hh,项目名称:Dryden,代码行数:26,代码来源:ecard.aspx.cs

示例12: subdelete

    protected void subdelete(RepeaterCommandEventArgs e)
    {
        Label lbl_idE = (Label)e.Item.FindControl("lbl_idE");
        sds_main.DeleteParameters["MenuId"].DefaultValue = lbl_idE.Text;
        sds_main.Delete();

    }
开发者ID:resh2302,项目名称:BRDHC-BkUp,代码行数:7,代码来源:setDashboardMenus.aspx.cs

示例13: rptAsignList_ItemCommand

    protected void rptAsignList_ItemCommand(object source, RepeaterCommandEventArgs e)
    {
        if (e.CommandName == "save")
        {
            Guid qzTaId = Guid.Parse((e.Item.FindControl("hfTaId") as HiddenField).Value);
            QZTicketAsign qzTa = bllqz.GetOne(qzTaId);
            Repeater rptPartnerList = e.Item.FindControl("rptPartnerList") as Repeater;
            int Amount = 0;
            foreach (RepeaterItem item in rptPartnerList.Items)
            {
                TextBox tbxAsignAmount = item.FindControl("tbxAsignAmount") as TextBox;
                if (tbxAsignAmount.Text == "")
                    tbxAsignAmount.Text = "0";

                DateTime dateTime = DateTime.Parse(Request.QueryString["date"]);
                Guid partnerId = Guid.Parse((item.FindControl("hfPartnerId") as HiddenField).Value);
                int ticketId = qzTa.Ticket.Id;
                QZPartnerTicketAsign qzpartnerTa = bllqzPartnerTa.GetOneByDateAndPartnerIdAndTicketId(dateTime, partnerId, ticketId);
                if (qzpartnerTa == null)
                    qzpartnerTa = new QZPartnerTicketAsign();
                qzpartnerTa.Partner = bllqzPartner.GetOne(partnerId);
                qzpartnerTa.AsignedAmount = int.Parse(tbxAsignAmount.Text);
                qzpartnerTa.QZTicketAsign = qzTa;
                bllqzPartnerTa.SaveOrUpdate(qzpartnerTa);
                Amount += int.Parse(tbxAsignAmount.Text);
            }

            qzTa.Amount = Amount;
            bllqz.SaveOrUpdate(qzTa);
            //这里需要征询袁飞
            ScriptManager.RegisterStartupScript(this, this.GetType(), "s", "window.location=window.location", true);
        }
    }
开发者ID:phiree,项目名称:testttt,代码行数:33,代码来源:DateTicketAssignMedia.aspx.cs

示例14: GamesPlatform_ItemCommand

    protected void GamesPlatform_ItemCommand(object source, RepeaterCommandEventArgs e)
    {
        if (e.CommandName == "detail")
        {
            Response.Redirect("~/Details.aspx?gid=" + (string)e.CommandArgument);
        }
         if (e.CommandName == "wish")
        {
          //  Response.Redirect("~/Wishlist.aspx?gid=" + (string)e.CommandArgument);
            if (Session["userid"] != null)
                wish.Add_To_Wishlist(Convert.ToInt16(Session["userid"]), Convert.ToInt16((string)e.CommandArgument));
            else
                Response.Redirect("~/Login.aspx");

        }

         if (e.CommandName == "cart")
         {

             if (Session["userid"] != null)
                 cart.Add_To_Cart(Convert.ToInt16(Session["userid"]), Convert.ToInt16((string)e.CommandArgument));
             else
                 Response.Redirect("~/Login.aspx");

             Response.Redirect("~/Cart.aspx");
         }
    }
开发者ID:yprocks,项目名称:GameAddict,代码行数:27,代码来源:NewGamesPlatform.aspx.cs

示例15: RepeaterTopBar_ItemCommand

    /// <summary>
    /// Når man klikker på en hest i topbaren
    /// </summary>
    /// <param name="source">topbar repeateren</param>
    /// <param name="e">Alt muligt info om eventet.
    /// Bl.a. e.CommandArgument, hvor vi har ID'et på hesten brugeren trykkede på.</param>
    protected void RepeaterTopBar_ItemCommand(object source, RepeaterCommandEventArgs e)
    {
        // asert Heste
        // TODO hvad hvis ikke heste? Men Ryttere eller ejere...

        // den hest der er klikket på
        int hesteId = Convert.ToInt32(e.CommandArgument);
        using (var ctx = new RideklubbenContext())
        {
            // hent den hest der er klikket på
            Hest hesten = ctx.Heste.Single(heste => heste.HesteId == hesteId);

            // Udskriv info om hesten (der er kun en, så jeg gider ikke en repeater).
            CenterImageNavn.Text = hesten.Navn;
            // udregn alder i år
            CenterImageAlder.Text = Math.Floor(((DateTime.Now - hesten.FødeDato).TotalDays / 365)).ToString() + " år";
            CenterIamgeOprindelse.Text = hesten.Fødestald;
            CenterImageImg.ImageUrl = hesten.BilledeSti;

            // HER BLIR DET SMART!
            // vi binder alle hestens ryttere til repeateren i venstre side.
            RepeaterLeftColumn.DataSource = hesten.Ryttere;
            RepeaterLeftColumn.DataBind();

        }
    }
开发者ID:Rts-wix,项目名称:Rideklubben,代码行数:32,代码来源:Default.aspx.cs


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