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

C# WebControls.ListViewCommandEventArgs类代码示例

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

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



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


示例16: lvEnca_ItemCommand

 protected void lvEnca_ItemCommand(object sender, ListViewCommandEventArgs e)
 {
     SqlDataSourceEnca.InsertParameters["Id_Usuario"].DefaultValue = WebMatrix.WebData.WebSecurity.CurrentUserId.ToString();
     SqlDataSourceEnca.InsertParameters["Id_Encarregado"].DefaultValue = e.CommandArgument.ToString();
     SqlDataSourceEnca.Insert();
     Response.Redirect(Request.RawUrl);
 }
开发者ID:Eriksonlove,项目名称:GestINEE,代码行数:7,代码来源:EditorEstudante.aspx.cs


示例17: FileListView_ItemCommand

 /// <summary>
 /// リストビューのアイテム中からのコマンドを受け取る
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void FileListView_ItemCommand(object sender, ListViewCommandEventArgs e)
 {
     if (e.CommandName == "Select")
     {
         DoDownload((e.CommandArgument as string) ?? "");
     }
 }
开发者ID:seraphy,项目名称:SeraphyWebToolboxApp,代码行数:12,代码来源:LogView.aspx.cs


示例18: dlItems_ItemCommand

        protected void dlItems_ItemCommand(object source, ListViewCommandEventArgs e)
        {
            string stringId = e.CommandArgument.ToString();

            if (e.CommandName == "Add")
            {
                var message = TemplateService.GetTemplateArchiveFromRemoteServer(stringId);

                if (!message.IsNullOrEmpty())
                {
                    MsgErr(true);
                    MsgErr(message);
                }
            }

            if (e.CommandName == "Delete")
            {
                UninstallTemplate(stringId);
                SettingsDesign.Template = _default;
                CacheManager.Clean();
            }

            if (e.CommandName == "ApplyTheme")
            {
                SettingsDesign.Template = stringId;
                CacheManager.Clean();
            }
        }
开发者ID:AzarinSergey,项目名称:learn,代码行数:28,代码来源:TemplatesSettings.ascx.cs


示例19: lvList_ItemCommand

        protected void lvList_ItemCommand(object sender, ListViewCommandEventArgs e)
        {
            HiddenField hdnIdNome = (HiddenField)e.Item.FindControl("hdnIdNome");
            HiddenField hdnDescricao = (HiddenField)e.Item.FindControl("hdnDescricao");

            string idAcao = CRB.BOSS.Funcoes.Criptografia.Encrypt(hdnIdNome.Value);

            switch (e.CommandName)
            {
                case "Editar":
                    Response.Redirect("Form.aspx?IdNome=" + idAcao);
                    break;

                case "Visualizar":
                    Response.Redirect("Form.aspx?IdNome=" + idAcao + "&ReadOnly=1");
                    break;

                case "Excluir":
                    Ok ok = new Ok(Excluir);
                    Popup popup = (Popup)this.Page.Master.FindControl("popup");
                    popup.Modulo = CRB.BOSS.Autenticacao.Modulo.Modulo.Atual;
                    popup.Titulo = CRB.BOSS.Autenticacao.Modulo.Modulo.Funcionalidade;
                    popup.Mensagem = "Deseja realmente excluir?";
                    popup.Tipo = InformacoesAlerta.TipoConfirma;
                    popup.param = hdnIdNome.Value + ";" + hdnDescricao.Value;
                    popup.ExecOk = ok;
                    popup.BotaoOk.OnClientClick = String.Empty;
                    popup.Mostrar();
                    break;
            }
        }
开发者ID:KleberRibeiro89,项目名称:d5solucoes,代码行数:31,代码来源:Lista.aspx.cs


示例20: ReservationSummaryListView_ItemCommand

    protected void ReservationSummaryListView_ItemCommand(object sender, ListViewCommandEventArgs e)
    {
        //this is the mthod which will gather the seating  information for reservation and pass to the BLL for proceosessing

        if (e.CommandName.Equals("Seat"))
        {
            //execuion if the code wukk ve uynder tghe controll
            MessageUserControl.TryRun(() =>
            {
                int reservationid = int.Parse(e.CommandArgument.ToString());
                    int waiterid = int.Parse(WaiterDropDownList.SelectedValue);
                    DateTime when = Mocker.MockDate.Add(Mocker.MockTime);
                List<byte> selectedTables = new List<byte>();
                //walk throug the list box row by row
                foreach (ListItem item_tableid in ReservationTableListBox.Items)
                {
                    if (item_tableid.Selected)
                    {
                        selectedTables.Add(byte.Parse(item_tableid.Text.Replace("Table ", "")));
                    }
                }

                //with all data gatherd, connet to your library controller, and send data for processing
                AdminController sysmgr = new AdminController();
                sysmgr.SeatCustomer(when reservationid, selectedTables, waiterid);

                SeatingGridView.DataBind();
                ReservationsRepeater.DataBind();
            }, "customer Seated", "Reservation  customer has been saeated");
        }
    }
开发者ID:wcoonghe1,项目名称:InClassDemos-archive,代码行数:31,代码来源:FrontDesk.aspx.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# WebControls.ListViewDeleteEventArgs类代码示例发布时间:2022-05-26
下一篇:
C# WebControls.ListItemCollection类代码示例发布时间: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