Esempio n. 1
0
        protected void grdGroups_RowUpdating(object sender, GridViewUpdateEventArgs e)
        {
            int id = int.Parse(grdGroups.DataKeys[e.RowIndex].Value.ToString());

            HiddenField1.Value = "update";
            var agentGroup = new AgentGroups()
            {
                AgentGroupId   = id,
                AgentGroupName = GetGridViewText(e, 2)
            };

            try
            {
                monitorDb.UpdateAgentGroup(agentGroup);
                grdGroups.EditIndex = -1;
                LoadData();
            }
            catch (Exception ex)
            {
                throw new Exception($"Exception:{ex.Message}");
            }
        }