protected void btnAddVehicle_Click(object sender, EventArgs e) { bool Superadmin = false; string EMPID = ""; if (chkleadsadmin.Items[0].Selected == true) { Superadmin = true; } else { Superadmin = false; } EMPID = Session["EMpid"].ToString(); string usertypid = "", LogPerson = ""; try { usertypid = Session[Constants.USER_TYPE_ID].ToString(); } catch { usertypid = "1"; } try { LogPerson = Session[Constants.USER_ID].ToString(); } catch { } DataSet UserEmploRights = objHotLeadBL.UpdateSupadmRightsSales(EMPID, Superadmin, usertypid, LogPerson); System.Web.UI.ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "Script", "alert('User Rights are updated successfully.');", true); GetLeadsSattus(); MpUpdaterights.Hide(); chkleadsadmin.Items[0].Selected = false; }
protected void GridExecutvRights_RowCommand(object sender, GridViewCommandEventArgs e) { try { MpUpdaterights.Show(); if (e.CommandName == "Empdeta") { Ckleads.Items[0].Selected = false; string EmpIdva = e.CommandArgument.ToString(); Session["EMpid"] = EmpIdva.ToString(); DataSet GetUserDefaultRight = new DataSet(); GetUserDefaultRight = objHotLeadBL.AllEMployeeUserRights(EmpIdva.ToString()); int count = GetUserDefaultRight.Tables[0].Rows.Count; for (int i = 0; i < count; i++) { if (GetUserDefaultRight.Tables[0].Rows[i]["Active"].ToString() == "1") { string Modulename = GetUserDefaultRight.Tables[0].Rows[i]["SubModuleName"].ToString(); if (Modulename == "ExecutiveAdmin") { Ckleads.Items[0].Selected = true; } } } } } catch { } }
public void btndelete_Click(object sender, EventArgs e) { //Deactivating Empid from carsales. string EMpid = Session["EMpid"].ToString(); DataSet dsSalesUpdateList = objHotLeadBL.DeleteEmployee(EMpid); System.Web.UI.ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "Script", "alert('" + EMpid + " has been deleted succesfully.');", true); MpUpdaterights.Hide(); GetLeadsSattus(); }
public void OnConfirm(object sender, EventArgs e) { string confirmValue = Request.Form["confirm_value"]; if (confirmValue == "Yes") { //Deactivating Empid from carsales. string EMpid = Session["EMpid"].ToString(); DataSet dsSalesUpdateList = objHotLeadBL.DeleteEmployee(EMpid); System.Web.UI.ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "Script", "alert('" + EMpid + " has been deleted succesfully.');", true); MpUpdaterights.Hide(); GetLeadsUserRights(Convert.ToInt32(ddlcenters.SelectedValue)); } else { } }
protected void btnAddVehicle_Click(object sender, EventArgs e) { bool LeadsUpload = false, LeadsAdmin = false; string EMPID = ""; if (Ckleads.Items[0].Selected == true) { LeadsUpload = true; } else { LeadsUpload = false; } if (chkleadsadmin.Items[0].Selected == true) { LeadsAdmin = true; } else { LeadsAdmin = false; } EMPID = Session["EMpid"].ToString(); string usertypid = ""; try{ usertypid = Session[Constants.USER_TYPE_ID].ToString(); } catch { usertypid = "1"; } DataSet UserEmpRights = objHotLeadBL.EditHistoryforadmin(EMPID, LeadsUpload, LeadsAdmin, usertypid); DataSet UserEmploRights = objHotLeadBL.UpdateLeadsRightsSales(EMPID, LeadsUpload, LeadsAdmin); GetLeadsUserRights(Convert.ToInt32(ddlcenters.SelectedValue)); MpUpdaterights.Hide(); Ckleads.Items[0].Selected = false; chkleadsadmin.Items[0].Selected = false; }
protected void GridQcProcessStatus_RowCommand(object sender, GridViewCommandEventArgs e) { try { if (e.CommandName == "Empdeta") { chkleadsadmin.Items[0].Selected = false; string EmpIdva = e.CommandArgument.ToString(); Session["EMpid"] = EmpIdva.ToString(); string EMpids = Session[Constants.USER_ID].ToString(); if (EMpids != EmpIdva.ToString()) { MpUpdaterights.Show(); DataSet GetUserDefaultRight = new DataSet(); GetUserDefaultRight = objHotLeadBL.AllEMployeeUserRights(EmpIdva.ToString()); int count = GetUserDefaultRight.Tables[0].Rows.Count; for (int i = 0; i < count; i++) { if (GetUserDefaultRight.Tables[0].Rows[i]["Active"].ToString() == "1") { string Modulename = GetUserDefaultRight.Tables[0].Rows[i]["SubModuleName"].ToString(); if (Modulename == "SuperAdmin") { chkleadsadmin.Items[0].Selected = true; } } } } else { System.Web.UI.ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "Script", "alert('No possibility for updating own rights');", true); } } } catch { } }