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


C# WebControls.ListViewCommandEventArgs类代码示例

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


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

示例1: GhostCastSessionList_ItemCommand

 private void GhostCastSessionList_ItemCommand(object sender, ListViewCommandEventArgs e)
 {
     Agent.GhostCastManagerClient gcmc = new Agent.GhostCastManagerClient();
     switch (e.CommandName)
     {
         case "Clients":
             {
                 GridView list = (GridView)e.Item.FindControl("ConnectedClientsGridView");
                 list.Visible = true;
                 break;
             }
         case "Send":
             {
                 Status.Text = gcmc.SendGhostCastSession(Convert.ToInt32(e.CommandArgument));
                 this.ViewState["ClientListVisible"] = null;
                 break;
             }
         case "Close":
             {
                 Status.Text = gcmc.CloseGhostCastSession(Convert.ToInt32(e.CommandArgument));
                 RefreshSessions(false);
                 this.ViewState["ClientListVisible"] = null;
                 break;
             }
     }
 }
开发者ID:DDLSTraining,项目名称:GhostBuster,代码行数:26,代码来源:Default.aspx.cs

示例2: lvItems_ItemCommand

    protected void lvItems_ItemCommand(object sender, ListViewCommandEventArgs e)
    {
        Literal ltItemID = (Literal)e.Item.FindControl("ltItemID");
        TextBox txtQty = (TextBox)e.Item.FindControl("txtQty");
        double price = GetPrice(ltItemID.Text);
        bool existingItem = IsExisting(ltItemID.Text);

        if (e.CommandName == "additem")
        {
            con.Open();
            SqlCommand com = new SqlCommand();
            com.Connection = con;
            if (existingItem)
            {
                com.CommandText = "UPDATE OrderDetails SET Quantity= Quantity + @Quantity " +
                    "WHERE OrderID=0 AND [email protected] AND [email protected]";
            }
            else
            {
                com.CommandText = "INSERT INTO OrderDetails VALUES (@OrderID, @UserID, @ItemID, " +
                    "@Quantity, @Remarks, @Status)";
            }
            com.Parameters.AddWithValue("@OrderID", 0);
            com.Parameters.AddWithValue("@ItemID", ltItemID.Text);
            com.Parameters.AddWithValue("@UserID", Session["userid"].ToString());
            com.Parameters.AddWithValue("@Quantity", txtQty.Text);
            com.Parameters.AddWithValue("@Remarks", DBNull.Value);
            com.Parameters.AddWithValue("@Status", "In Cart");
            com.ExecuteNonQuery();
            con.Close();
            Response.Redirect(Request.Url.AbsoluteUri);
        }
    }
开发者ID:abramlimpin,项目名称:nomnom-ph,代码行数:33,代码来源:Search.aspx.cs

示例3: ListView1_ItemCommand

    //一般登入
    protected void ListView1_ItemCommand(object sender, ListViewCommandEventArgs e)
    {
        if (e.CommandName == "login")
        {
            string[] commandArgs = e.CommandArgument.ToString().Split(new char[] { ',' });
            NTPCLibrary.User user = LoginUser;
            List<Department> departments = new List<Department>()
            {
                new Department()
                {
                    ID = commandArgs[0],
                    Name = commandArgs[1],
                    Groups = new List<string>()
                    {
                        commandArgs[2]
                    }
                }
            };
            user.Departments = departments;
            //設user cookie
            Util.SetCookie<NTPCLibrary.User>(Util.OPENID_SELECT_USER_COOKIE, user);

            //清除role cookie
            //Util.CleanCookie(Util.OPENID_ROLE_COOKIE);
            Util.SetCookie(Util.OPENID_ROLE_COOKIE, "0");

            //重導
            Response.Redirect(rd);

        }
    }
开发者ID:kingofamani,项目名称:OpenId,代码行数:32,代码来源:LoginExtensionView.aspx.cs

示例4: lvCursos_ItemCommand

        protected void lvCursos_ItemCommand(object sender, ListViewCommandEventArgs e)
        {
            var idCurso = Int32.Parse((String)e.CommandArgument);
            var curso = _CursoService.GetCurso(idCurso);
            var empleado = _EmpleadoService.GetEmpleado(curso.EmpleadoId);
            var inscripcion = Cache.Get("inscripcion") as Inscripcion;
            var existe = inscripcion.Cursos.Any(d => d.Id.Equals(idCurso));

            if (!existe)
            {
                lblMensajeCurso.Text = "";
                lblMensajeCurso.Visible = false;
                lblDetalles.Text = "Detalles";
                lblDetalles.Visible = true;

                curso.Empleado = empleado;

                inscripcion.Cursos.Add(curso);

                /*recalculo los totales despues de agregar*/
                CalcularTotales(inscripcion);

                lvDetallesCursos.DataSource = inscripcion.Cursos;
                lvDetallesCursos.DataBind();

                Cache.Insert("inscripcion", inscripcion);
            }
            else
            {
                lblMensajeCurso.Text = "Ese curso ya ha sido agregado";
                lblMensajeCurso.Visible = true;
            }
        }
开发者ID:juankrlos1521,项目名称:CubanosFinish,代码行数:33,代码来源:frmInscripcion.aspx.cs

示例5: ListView1_ItemCommand

 protected void ListView1_ItemCommand(object sender, ListViewCommandEventArgs e)
 {
     if (e.CommandName == "Cancel")
     {
         Response.Redirect("~/Client/clientaccount.aspx");
     }
 }
开发者ID:romyromano,项目名称:tanghalangpasigenyo,代码行数:7,代码来源:ClientInfoE.aspx.cs

示例6: ListViewShowThreePolls_ItemCommand

        protected void ListViewShowThreePolls_ItemCommand(object sender, ListViewCommandEventArgs e)
        {
            ListViewItem lvi = e.Item;
            Button btn = (Button)lvi.FindControl("VoteButton");
            var commandArg = btn.CommandArgument.ToString();
            int pollID = int.Parse(commandArg);

            if (e.CommandName == "Vote")
            {
                RadioButtonList rbl = (RadioButtonList)lvi.FindControl("RadioButtonListShowingAnswers");
                var answerIDStr = rbl.SelectedValue;
                if (answerIDStr != "")
                {
                    int answerID = int.Parse(answerIDStr);
                    PollsDAL.VoteForPoll(answerID);
                    Response.Redirect("Voting.aspx?pollId=" + pollID);
                }
            }
            else if (e.CommandName == "Reset")
            {
                Response.Redirect("Voting.aspx?reset=true&pollId=" + pollID);
            }
            else if (e.CommandName == "Delete")
            {
                PollsDAL.DeletePoll(pollID);
                Response.Redirect("Polls.aspx");
            }
        }
开发者ID:Termininja,项目名称:TelerikAcademy,代码行数:28,代码来源:Polls.aspx.cs

示例7: lvMsgList_OnItemCommand

 protected void lvMsgList_OnItemCommand(object sender, ListViewCommandEventArgs e)
 {
     switch (e.CommandName)
     {
         case "EditMsg":
             int nextMsg = e.Item.DataItemIndex;
             SaveProfMsg(int.Parse(hfCurMsg.Value));
             LoadProfMsg(nextMsg);
             break;
         case "DelMsg":
             int curMsgIndex = int.Parse(hfCurMsg.Value);
             SaveProfMsg(curMsgIndex);
             DelProfMsg(e.Item.DataItemIndex);
             LoadProfMsg(0);
             break;
         case "AddMsg":
             if (profMsg.Count < 8)
             {
                 SaveProfMsg(int.Parse(hfCurMsg.Value));
                 profMsg.Add(new WxMsg());
                 LoadProfMsg(profMsg.Count - 1);
             }
             else
             {
                 warnMsg.Text = "最多只能同时发8条图文消息!";
             }
             break;
         case "SendMsg":
             SaveProfMsg(int.Parse(hfCurMsg.Value));
             BindProfMsg();
             SendProfMsg();
             break;
     }
 }
开发者ID:jonbakerfish,项目名称:WxSimulateWeb,代码行数:34,代码来源:MultiSendMsg.aspx.cs

示例8: lstSepet_ItemCommand

        protected void lstSepet_ItemCommand(object sender, ListViewCommandEventArgs e)
        {
            if (e.CommandName == "UrunCikar")
            {

            }
        }
开发者ID:sumutcan,项目名称:WTWP-E-Commerce-ShoeShop,代码行数:7,代码来源:sepet.aspx.cs

示例9: ListView1_ItemCommand

    protected void ListView1_ItemCommand(object sender, ListViewCommandEventArgs e)
    {
        try
        {
            if (e.CommandName == "ExpressInterest")
            {
                if (Session["UserId"] != null)
                {
                    ListViewDataItem Edit = (ListViewDataItem)e.Item;
                    //lblreceiverId.Text = Convert.ToString(ListViewCommentsDetails.DataKeys[Edit.DisplayIndex].Value.ToString());
                   // PanelExpressInterest.Visible = true;
                   // ModalPopupInterest.Show();

                }
                else
                {

                    Response.Redirect("Default.aspx");
                }
            }
          

        }
        catch
        {
        }
         
             
    }
开发者ID:vivek0tiwari,项目名称:shaadisaagai,代码行数:29,代码来源:SearchResults.aspx.cs

示例10: ComprasListView_ItemCommand

        protected void ComprasListView_ItemCommand(object sender, ListViewCommandEventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                Server.Transfer("ReservaNoRegistrado.aspx");
            }
            else
            {
                ventas.Matricula = e.CommandArgument.ToString();
                ventas.ObtenerDatosVehiculos();
                ventas.Reservado = 1;
                ventas.EditarVentas();
                ComprasMultiView.ActiveViewIndex = 0;

                Session["MailSubject"] = "Reserva de compra de: " + Session["email"].ToString();
                Session["MailBody"] = "Nombre y apellidos: " + Session["nombre"].ToString() + " " + Session["apellidos"].ToString()
                    + "\n\n Este cliente ha realizado una reserva del coche: \n Matrícula: " + ventas.Matricula + "\n Modelo: " + ventas.Marca + " " + ventas.Modelo
                    + "\n KM: " + ventas.KM.ToString() + "\n Precio: " + ventas.PrecioVenta + "\n Garantía: " + ventas.Garantia;
                Session["MailUser"] = Session["email"].ToString();
                Session["MailUserSubject"] = "La reserva se ha realizado con éxito.";
                Session["MailUserBody"] = "Has realizado una reserva del coche: \n Matrícula: " + ventas.Matricula + "\n Modelo: " + ventas.Marca + " " + ventas.Modelo
                    + "\n KM: " + ventas.KM.ToString() + "\n Precio: " + ventas.PrecioVenta + "\n Garantía: " + ventas.Garantia
                    + "\n\n Tiene reservado este coche durante 3 días. Pase por nuestras oficinas para tomar todos los datos necesarios y completar la compra.";
                Session["MailUrl"] = HttpContext.Current.Request.Url.ToString();
                Response.Redirect("EnviarMail.aspx");
            }
        }
开发者ID:angelguit,项目名称:dpaa-alquilercoches,代码行数:27,代码来源:Compras.aspx.cs

示例11: showFullStatement

    protected void showFullStatement(object sender, ListViewCommandEventArgs e)
    {
        string[] emailList;
        nEmailHandler emailer = new nEmailHandler();

        //grab full list of emails
        ISession session = DatabaseEntities.NHibernateHelper.CreateSessionFactory().OpenSession();
        List<DatabaseEntities.User> userList = DatabaseEntities.User.GetAllUsers(session);

        string[] data = e.CommandArgument.ToString().Split(new char[] { '%' });

        if (String.Equals(e.CommandName, "remove"))
        {
            dbLogic.updateEligible(data[0], "0");
            LabelFeedback.Text = "User successfully removed from the current ballot. Email sent to ALL users alerting them of this action.";
            emailer.sendRemoveFromBallot(userList, GetName(Convert.ToInt32(data[1])));
        }

        else if (String.Equals(e.CommandName, "add"))
        {
            dbLogic.updateEligible(data[0], "1");
            LabelFeedback.Text = "User successfully placed back on the current ballot. Email sent to ALL users alerting them of this action.";
            emailer.sendReAddToBallot(userList, GetName(Convert.ToInt32(data[1])));
        }
        dbLogic.selectInfoForApprovalTable();
        DataSet emailSet = dbLogic.getResults();
        ListViewApproval.DataSource = emailSet;
        ListViewApproval.DataBind();
        loadApprovalInfo();
    }
开发者ID:bashtech,项目名称:ivote-teama,代码行数:30,代码来源:RemoveFromBallot.aspx.cs

示例12: sendReply

 protected void sendReply(ListViewCommandEventArgs e)
 {
     Label email = (Label)e.Item.FindControl("lbl_emailV");
     TextBox message = (TextBox)e.Item.FindControl("txt_msgR");
     TextBox subject = (TextBox)e.Item.FindControl("txt_subR");
     objSendMail.sendEMail(email.Text, "<div><a href='www.brdhchumber.com'><img src='www.brdhchumber.com/images/mailHeader.jpg' /></a><br /><br/>" +  message.Text, "(Blind River District Health Centre) " + subject.Text, true);
 }
开发者ID:resh2302,项目名称:BRDHC-BkUp,代码行数:7,代码来源:ContactAdmin.aspx.cs

示例13: subupdel

     protected void subupdel(object sender, ListViewCommandEventArgs e)
     {
         switch (e.CommandName)
         {
             case "Update":
                 TextBox txtfname = (TextBox)e.Item.FindControl("txtfnameU");
                 TextBox txtlname = (TextBox)e.Item.FindControl("txtlnameU");
                 DropDownList ddlvolType = (DropDownList)e.Item.FindControl("ddlvoltypeU");
                 TextBox txtemail = (TextBox)e.Item.FindControl("txtemailU");
                 TextBox txtcontact = (TextBox)e.Item.FindControl("txtcontactU");
                 HiddenField hdfID = (HiddenField)e.Item.FindControl("hdf_id");
                 
                  int volId = int.Parse(hdfID.Value.ToString());
                  _strMessage(objvolunteer.commitUpdate(volId, txtfname.Text, txtlname.Text, txtemail.Text, txtcontact.Text), "update");
                 
                _subRebind();
                break;
             case "Delete":
                int vol_Id = int.Parse(((HiddenField)e.Item.FindControl("hdf_idD")).Value);
                _strMessage(objvolunteer.commitDelete(vol_Id), "delete");
                _subRebind();
                break;
             case "Cancel":
                _subRebind();
                break;
                 

         }
    }
开发者ID:jacqueline27hh,项目名称:Dryden,代码行数:29,代码来源:volunteer_opp.aspx.cs

示例14: ListView_OnItemCommand

        protected void ListView_OnItemCommand(object sender, ListViewCommandEventArgs e)
        {
            // Button name control
            if (String.Equals(e.CommandName, "AddButton"))
            {

                // take button argument and split
                string toplam = (string) e.CommandArgument;
                string[] top = toplam.Split('/');

                double price = Convert.ToDouble(top[0]);
                string id = top[1];
                // take textbox text
                TextBox t = ((TextBox)e.Item.FindControl("TextBox1"));
                string number = t.Text;

                string quantity = top[2];
                // calculate total cost
                double totalcost = price * Convert.ToDouble(number);

                Label name = ((Label)e.Item.FindControl("nameLabel"));
                Session["name"] = name.Text;
               // all arguments send with session
                Session["number"] += number + "%";
                Session["totalcost"] = Convert.ToDouble(Session["totalcost"]) + totalcost;
                Session["id"] += id + "%" ;
                Session["quantity"] += quantity + "%";
            }
        }
开发者ID:adlonur,项目名称:ShoppingCartASP,代码行数:29,代码来源:Shopping.aspx.cs

示例15: lvw_partsItemCommand

    protected void lvw_partsItemCommand(object sender, ListViewCommandEventArgs e)
    {
        try
        {
            string[] arg = new string[2];
            arg = e.CommandArgument.ToString().Split(';');

            int id = Convert.ToInt32(arg[0]);
            int quantity = Convert.ToInt32(arg[1]);

            if (quantity > 0)
            {
                ShoppingCart.GetInstance().AddItem(id, quantity);
                Session["databaseName"] = "Parts";
                Response.Redirect("ViewCart.aspx");
            }
            else
            {
                lblResult.Text = "That Item is Currently Sold Out!";
            }
        }
        catch(Exception)
        {
            lblResult.Text = "Couldn't Add Item to Cart!";
        }
    }
开发者ID:ultimatecodelab,项目名称:RAD-Project,代码行数:26,代码来源:Parts.aspx.cs


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