Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         try
         {
             if (Session["admin"] != null)
             {
                 ddlclient(); BindingClass.ClearDropDown(ddlGroup, "Select Branch"); BindingClass.ClearDropDown(ddlObject, "Select Device");
             }
             else
             {
                 Response.Redirect("Login.aspx");
             }
         }
         catch (Exception)
         { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
     }
 }
Ejemplo n.º 2
0
 public void gridBind(string type)
 {
     try
     {
         List <ConfigurationModel> list = new List <ConfigurationModel>();
         if (type == "Reports")
         {
             list = obj.getFeatureList(-1);
         }
         if (type == "Configuration")
         {
             list = obj.getFeatureList(0);
         }
         BindingClass.GridViewBind(gvdFeatures, list);
         gvdFeatures.Visible = true;
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }
Ejemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         try
         {
             if (Session["admin"] != null)
             {
                 ddlClientBind();
             }
             else
             {
                 Response.Redirect("Login.aspx");
             }
         }
         catch (Exception)
         { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
     }
 }
Ejemplo n.º 4
0
 public void bindRepeater()
 {
     try
     {
         List <ConfigurationModel> list = obj.getConfigurationList(-1);
         if (list.Count > 0)
         {
             rptReports.DataSource = list;
             rptReports.DataBind();
         }
         else
         {
             BindingClass.ClearRepeaterView(rptReports);
             BindingClass.CallScriptManager(this.Page, this.GetType(), "toastr.error('No Report assigned to " + Session["DisplayName"] + "!', 'N/A',{positionClass:'toast-bottom-right'});");
         }
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }
Ejemplo n.º 5
0
 public void ddlListItemDaysForUser()
 {
     try{
         ListItem[] items = new ListItem[9];
         items[0] = new ListItem("Select Days", "0");
         items[1] = new ListItem("Monday", "1");
         items[2] = new ListItem("Tuesday", "2");
         items[3] = new ListItem("Wednesday", "3");
         items[4] = new ListItem("Thursday", "4");
         items[5] = new ListItem("Friday", "5");
         items[6] = new ListItem("Saturday", "6");
         items[7] = new ListItem("Sunday", "7");
         items[8] = new ListItem("Weekly", "8");
         //items[9] = new ListItem("Holidays", "9");
         ddlDays.Items.AddRange(items);
         ddlDays.DataBind();
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }
Ejemplo n.º 6
0
 public void gvdBind_Controlling(int ObjectId, DateTime StartDate, DateTime EndDate)
 {
     try
     {
         if (StartDate.Date == DateTime.Now.Date)
         {
             List <SwitchesReportControllingModel> Li = obj.getControllingToday(ObjectId);
             BindingClass.GridViewBind(gvdcontrollingReport, Li);
             gvdcontrollingReport.Visible = true;
         }
         else
         {
             List <SwitchesReportControllingModel> Li = obj.getControllingByDT(ObjectId, StartDate, EndDate);
             BindingClass.GridViewBind(gvdcontrollingReport, Li);
             gvdcontrollingReport.Visible = true;
         }
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }
Ejemplo n.º 7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         try
         {
             if (Session["admin"] != null)
             {
                 BindgridView();
                 clearControls();
             }
             else
             {
                 Response.Redirect("404.aspx");
             }
         }
         catch (Exception)
         { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
     }
 }
Ejemplo n.º 8
0
 protected void linkbtnEdit_Command(object sender, CommandEventArgs e)
 {
     try
     {
         if (e.CommandName == "UpdateID")
         {
             allowStaticMethods("applyDatatable('.gvdGroupClass');  staticMethod('Enable');");
             int           cmdArg = Convert.ToInt32(e.CommandArgument);
             GetGroupModel li     = obj.getGroupByGroupID(cmdArg);
             txtComments.Text        = li.Comment;
             txtGroupName.Text       = li.Name;
             ddlClient.SelectedValue = li.ClientID.ToString();
             gridBind();
             Session["GroupId"] = cmdArg.ToString();
             btnGroup.Text      = "Update";
         }
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }
Ejemplo n.º 9
0
 public void ddlClientBind()
 {
     try
     {
         List <ClientIDName> list = cobj.getClientList();
         if (list.Count > 0)
         {
             BindingClass.BindDropDown(ddlClient, list, "Name", "ClientID", "Select Client");
             BindingClass.ClearDropDown(ddlLogin, "Select User");
             BindingClass.ClearDropDown(ddlFeature, "Select Feature");
             gvdLoginFeature.Visible = false;
         }
         else
         {
             BindingClass.ClearDropDown(ddlClient, "Select Client");
         }
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }
Ejemplo n.º 10
0
 protected void rptObject_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     try
     {
         if (e.CommandName.Equals("lnkbtnviewObjdt"))
         {
             //Session["ObjIDTimer"] = null;
             string val = Convert.ToString(e.CommandArgument);
             int    id  = Convert.ToInt32(val);
             //Session["ObjIDTimer"] = id;
             if (val != null)
             {
                 ObjectGridBind(id);
                 allowStaticMethods("$('#myModal').modal();togl();chngeDin();ddlselect2('.ddlSelect');");
             }
         }
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }
Ejemplo n.º 11
0
 public void GvdBindObjdetail(int objectId, bool relayStatus)
 {
     try
     {
         List <ObjectRelayStatus> lirelays = obj.getObjectRelays(objectId, relayStatus);
         List <ObjectAnalog>      liAin    = obj.getObjectAin(objectId);
         List <ObjectDigital>     liDin    = obj.getObjectDin(objectId);
         List <ObjectTemperature> liTemp   = obj.getObjectTemp(objectId);
         Gvdobjsensor.DataSource     = lirelays; Gvdobjsensor.DataBind();
         rptappliances.DataSource    = lirelays; rptappliances.DataBind();
         rptDIN.DataSource           = liDin; rptDIN.DataBind();
         rptdigitalsensor.DataSource = liDin; rptdigitalsensor.DataBind();
         rptAnalog.DataSource        = liAin; rptAnalog.DataBind();
         rptAnalogsensor.DataSource  = liAin; rptAnalogsensor.DataBind();
         rptTemp.DataSource          = liTemp; rptTemp.DataBind();
         rpttempsensor.DataSource    = liTemp; rpttempsensor.DataBind();
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }
Ejemplo n.º 12
0
 protected void linkbtnEdit_Command(object sender, CommandEventArgs e)
 {
     try
     {
         if (e.CommandName == "UpdateID")
         {
             allowStaticMethods("staticMethod('Enable');applyDatatable('.gvdcategoryclass');");
             int           cmdArg = Convert.ToInt32(e.CommandArgument);
             CategoryModel li     = obj.getCategoryByCategoryID(cmdArg);
             txtName.Text          = li.Name;
             txtMin.Text           = li.Name;
             txtMax.Text           = li.Name;
             chkEnable.Checked     = Convert.ToBoolean(li.EnableORDisable);
             Session["CategoryId"] = cmdArg.ToString();
             btnAddCategory.Text   = "Update";
         }
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }
Ejemplo n.º 13
0
 public void ddlClientBind()
 {
     try
     {
         List <ClientIDName> list = cobj.getClientList();
         if (list.Count > 0)
         {
             BindingClass.BindDropDown(ddlClient, list, "Name", "ClientID", "Select Client");
             BindingClass.ClearDropDown(ddlGroup, "Select Branch");
             BindingClass.ClearDropDown(ddlObject, "Select Device");
             BindingClass.ClearDropDown(ddlObjSensor, "Select Location");
             gvdEventConfig.Visible = false;
         }
         else
         {
             BindingClass.ClearDropDown(ddlClient, "Select Client");
         }
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }
Ejemplo n.º 14
0
 protected void ddlgroup_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         if (ddlgroup.SelectedValue != "0")
         {
             Timer1.Enabled    = true;
             rptObject.Visible = true;
             var _sltdval = ddlgroup.SelectedValue;
             int val      = Convert.ToInt32(_sltdval);
             BindObjectRepeater(val);
         }
         else
         {
             BindingClass.ClearRepeaterView(rptObject);
         }
         allowStaticMethods("ddlselect2('.ddlSelect');");
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }
Ejemplo n.º 15
0
        protected void linkUpdateAll_Command(object sender, CommandEventArgs e)
        {
            try
            {
                if (e.CommandName == "Update")
                {
                    int             _cmdArg = Convert.ToInt32(e.CommandArgument);
                    SchedulingModel li      = SS.GetSchedulingById(_cmdArg);
                    Session["scheduleId"] = _cmdArg.ToString();
                    int obs   = li.ObjectSensorId;
                    int _days = li.Days;

                    bool cbstatus = false;
                    var  lb       = (LinkButton)sender;
                    var  row      = (GridViewRow)lb.NamingContainer;
                    if (row != null)
                    {
                        TextBox  S_Time    = row.FindControl("txtstarttime") as TextBox;
                        string   StartTime = S_Time.Text;
                        TextBox  E_Time    = row.FindControl("txtendtime") as TextBox;
                        string   EndTime   = E_Time.Text;
                        CheckBox chk       = (CheckBox)row.FindControl("chkstatus");
                        if (chk.Checked == true)
                        {
                            cbstatus = true;
                        }

                        bool responce = SS.PutEquipmentScheduling(_cmdArg, Convert.ToInt32(ddlObject.SelectedValue), StartTime, EndTime, _days, obs, cbstatus);
                        if (responce == true)
                        {
                            GvdBindObjdetail(Convert.ToInt32(ddlObject.SelectedValue), Convert.ToInt32(ddlDays.SelectedValue));
                            _alert = AlertsClass.SuccessUpdate;
                        }
                    }
                    allowStaticMethods("ALerts('" + _alert + "');staticMethod();");
                }
            }
            catch (Exception)
            { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         try
         {
             if (Session["admin"] != null)
             {
                 ddlClientbind();
                 BindingClass.ClearDropDown(ddlgroup, "Select Branch");
                 BindingClass.ClearDropDown(ddlObject, "Select Device");
                 ddlScheduleBind();
                 ddlHoursBind();
                 ddlMinsBind();
                 ddlSecsBind();
             }
             //else if (Session["poweruser"] != null)
             //{
             //    var list = (LoginModelForUser)Session["poweruser"];
             //    int _clId = list.ClientID;
             //    ddlGroupbind(_clId);
             //    ddlgroup.Visible = true;
             //}
             //else if (Session["user"] != null)
             //{
             //    var list = (LoginModelForUser)Session["user"];
             //    int sessionLoginID = list.LoginID;
             //    LoginGroupModel li = LGS.GetLoginGroupByLogin(sessionLoginID);
             //    if (li != null)
             //    {
             //        ddlObjectbind(li.GroupID);
             //        ddlObject.Visible = true;
             //    }
             //}
         }
         catch (Exception)
         { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
     }
 }
Ejemplo n.º 17
0
 protected void linkbtnEdit_Command(object sender, CommandEventArgs e)
 {
     try
     {
         if (e.CommandName == "UpdateID")
         {
             allowStaticMethods("staticMethod('Enable');  applyDatatable('.gvdSensorclass');");
             clearControls();
             int         _cmdArg = Convert.ToInt32(e.CommandArgument);
             SensorModel li      = SNS.GetSensor(_cmdArg);
             Session["sensorId"] = _cmdArg.ToString();
             txtSourceName.Text  = li.SourceName;
             txtSourceId.Text    = li.SourceID;
             txtUnit.Text        = li.Unit;
             cbEnabled.Checked   = li.EnableOrDisable;
             txtSourceName.Text  = li.SourceName;
             btnAddSensor.Text   = "Update";
         }
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }
 protected void linkbtnDel_Command(object sender, CommandEventArgs e)
 {
     if (e.CommandName == "Remove")
     {
         try
         {
             int _cmdArg = Convert.ToInt32(e.CommandArgument); bool response = OBJ.PutAttendanceObjectStatus(_cmdArg);
             if (response == true)
             {
                 Alert = AlertsClass.SuccessRemove;
             }
             else
             {
                 Alert = AlertsClass.ErrorWentWrong;
             }
             Gridbind(Convert.ToInt32(ddlObject.SelectedValue));
             allowStaticMethods("ALerts('" + Alert + "'); staticMethod();");
         }
         catch (Exception)
         { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
     }
 }
Ejemplo n.º 19
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         try
         {
             if (Session["admin"] != null)
             {
                 ddlClientbind();
                 ddlDays.Items.Clear();
                 ddlgroup.Visible  = false;
                 ddlObject.Visible = false;
             }
             else if (Session["poweruser"] != null)
             {
                 divClient.Visible = false;
                 ddlObject.Visible = false;
                 var list  = (LoginModelForUser)Session["poweruser"];
                 int _clId = list.ClientID;
                 ddlGroupbind(_clId);
                 ddlgroup.Visible = true;
             }
             else if (Session["user"] != null)
             {
                 divClient.Visible = false;
                 divGroup.Visible  = false;
                 int             loginID = Convert.ToInt32(Session["user"]);
                 LoginGroupModel li      = LGS.GetLoginGroupByLogin(loginID);
                 if (li != null)
                 {
                     ddlObjectbind(li.GroupID);
                     ddlObject.Visible = true;
                 }
             }
         }
         catch (Exception)
         { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
     }
 }
Ejemplo n.º 20
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         try
         {
             clearControls();
             if (Session["admin"] != null)
             {
                 ddlClientbind();
             }
             if (Session["poweruser"] != null)
             {
                 string   ID           = Session["poweruser"].ToString();
                 string[] powerSession = ID.Split(',');
                 if (powerSession[1] != "")
                 {
                     ddlclientdiv.Visible = false;
                     int clientID = Convert.ToInt32(powerSession[1]);
                     ddlGroupbind(clientID);
                 }
             }
             if (Session["user"] != null)
             {
                 int loginID = Convert.ToInt32(Session["user"]);
                 if (loginID != 0)
                 {
                     ddlclientdiv.Visible = false;
                     ddlgroupdiv.Visible  = false;
                     int groupID = cObj.getGroupIDForUser(loginID);
                     ddlObjectbind(groupID);
                 }
             }
         }
         catch (Exception)
         { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
     }
 }
Ejemplo n.º 21
0
 protected void linkbtnEdit_Command(object sender, CommandEventArgs e)
 {
     try
     {
         if (e.CommandName == "UpdateID")
         {
             BindingClass.CallScriptManager(this.Page, this.GetType(), "applyDatatable('.gvdclientclass');staticMethod('Enable')");
             int         ID = Convert.ToInt32(e.CommandArgument);
             ClientModel li = obj.getClientByClientID(ID);
             txtClient.Text      = li.Name;
             txtAddress.Text     = li.Address;
             txtOperatorId.Text  = li.OperatorID.ToString();
             txtContact.Text     = li.Contact;
             txtCode.Text        = li.Code;
             txtEmail.Text       = li.Email;
             txtExpireDate.Text  = li.ExpireDate.ToString();
             btnAddClient.Text   = "Update";
             Session["ClientId"] = ID.ToString();
         }
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }
Ejemplo n.º 22
0
 protected void linkbtnDel_Command(object sender, CommandEventArgs e)
 {
     try
     {
         if (e.CommandName == "Remove")
         {
             int  _cmdArg = Convert.ToInt32(e.CommandArgument);
             bool status  = SNS.DeleteSensor(_cmdArg);
             if (status == true)
             {
                 Alert = AlertsClass.SuccessRemove;
             }
             else
             {
                 Alert = AlertsClass.ErrorWentWrong;
             }
             BindgridView();
             allowStaticMethods("ALerts('" + Alert + "'); staticMethod('Disable');  applyDatatable('.gvdSensorclass');");
         }
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }
Ejemplo n.º 23
0
 protected void linkbtnDisable_Command(object sender, CommandEventArgs e)
 {
     try
     {
         if (e.CommandName == "Disable")
         {
             int  cmdArg = Convert.ToInt32(e.CommandArgument);
             bool status = obj.disableObjectSensor(cmdArg);
             if (status == true)
             {
                 alert = AlertsClass.SuccessRemove;
                 gridBind();
             }
             else
             {
                 alert = AlertsClass.ErrorWentWrong;
             }
             allowStaticMethods("ALerts('" + alert + "');applyDatatable('.gvdObjectSensorClass');staticMethod('Disable');");
         }
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }
Ejemplo n.º 24
0
 protected void linkbtnDel_Command(object sender, CommandEventArgs e)
 {
     try
     {
         if (e.CommandName == "Remove")
         {
             int  cmdArg = Convert.ToInt32(Session["eventConfigId"]);
             bool status = ECS.DeleteEventConfiguration(cmdArg);
             if (status == true)
             {
                 alert = AlertsClass.SuccessRemove;
                 gridBind(Convert.ToInt32(ddlObject.SelectedValue));
             }
             else
             {
                 alert = AlertsClass.ErrorWentWrong;
             }
             allowStaticMethods("ALerts('" + alert + "');applyDatatable('.gvdEventConfigClass');staticMethod('Disable');");
         }
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }
Ejemplo n.º 25
0
 protected void linkbtnDel_Command(object sender, CommandEventArgs e)
 {
     try
     {
         if (e.CommandName == "Remove")
         {
             _cmdArg = Convert.ToInt32(e.CommandArgument);
             _status = HSS.DeleteHolidayScheduling(_cmdArg);
             if (_status == true)
             {
                 _alert = AlertsClass.SuccessRemove;
             }
             else
             {
                 _alert = AlertsClass.ErrorWentWrong;
             }
         }
         GvdBindHolidayscheduling(Convert.ToInt32(ddlgroup.SelectedValue));
         allowStaticMethods("ALerts('" + _alert + "');staticMethod();");
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }
Ejemplo n.º 26
0
 protected void linkbtnDel_Command(object sender, CommandEventArgs e)
 {
     try
     {
         if (e.CommandName == "Remove")
         {
             int  ID     = Convert.ToInt32(Session["ObjectId"]);
             bool status = obj.disableObject(ID);
             if (status == true)
             {
                 alert = AlertsClass.SuccessRemove;
             }
             else
             {
                 alert = AlertsClass.ErrorWentWrong;
             }
             GridBind();
             allowStaticMethods("ALerts('" + alert + "'); closeDeleteModal();applyDatatable('.gvdObjectClass');  staticMethod('Disable');");
         }
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }
Ejemplo n.º 27
0
 protected void linkbtnDel_Command(object sender, CommandEventArgs e)
 {
     try
     {
         if (e.CommandName == "Remove")
         {
             int  ID     = Convert.ToInt32(Session["loginGroupId"]);
             bool status = LGS.DeleteLoginGroup(ID);
             if (status == true)
             {
                 Alert = AlertsClass.SuccessRemove;
             }
             else
             {
                 Alert = AlertsClass.ErrorWentWrong;
             }
             gridBind();
             allowStaticMethods("ALerts('" + Alert + "');staticMethod();");
         }
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }
Ejemplo n.º 28
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (!IsPostBack)
         {
             if (Session["admin"] != null)
             {
                 configRptBind();
             }
             else if (Session["poweruser"] != null)
             {
                 string   ID           = Session["poweruser"].ToString();
                 string[] powerSession = ID.Split(',');
                 int      loginID      = Convert.ToInt32(powerSession[0]);
                 if (loginID != 0)
                 {
                     configRptBindByLoginID(loginID);
                 }
             }
             else if (Session["user"] != null)
             {
                 int loginID = Convert.ToInt32(Session["user"]);
                 if (loginID != 0)
                 {
                     configRptBindByLoginID(loginID);
                 }
             }
             else
             {
                 Response.Redirect("Login.aspx");
             }
         }
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }
Ejemplo n.º 29
0
 protected void linkbtnDelAll_Command(object sender, CommandEventArgs e)
 {
     try
     {
         if (e.CommandName == "Remove")
         {
             int  _cmdArg   = Convert.ToInt32(e.CommandArgument);
             bool delstatus = SS.DeleteScheduling(_cmdArg);
             if (delstatus == true)
             {
                 _alert = AlertsClass.SuccessRemove;
             }
             else
             {
                 _alert = AlertsClass.ErrorWentWrong;
             }
             GvdBindObjdetail(Convert.ToInt32(ddlObject.SelectedValue), Convert.ToInt32(ddlDays.SelectedValue));
             Session.Remove("scheduleId");
         }
         allowStaticMethods("ALerts('" + _alert + "');staticMethod();");
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }
Ejemplo n.º 30
0
 protected void linkbtnEdit_Command(object sender, CommandEventArgs e)
 {
     try
     {
         if (e.CommandName == "UpdateID")
         {
             allowStaticMethods("applyDatatable('.gvduserclass');staticMethod('Enable');");
             int            ID = Convert.ToInt32(e.CommandArgument);
             PostLoginModel li = obj.getLoginByLoginID(ID);
             txtUser.Text = li.User;
             txtPassword.Attributes.Add("value", li.Password);
             txtConfirmPassword.Attributes.Add("value", li.Password);
             txtComments.Text          = li.Comment;
             txtdisplayName.Text       = li.DisplayName;
             ddlUserType.SelectedValue = li.RoleID.ToString();
             ddlClient.SelectedValue   = li.ClientID.ToString();
             Session["loginId"]        = ID.ToString();
             btnAddUser.Text           = "Update";
             txtUser.Enabled           = false;
         }
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }