Пример #1
0
    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 { }
    }
Пример #2
0
    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 { }
    }
Пример #3
0
    protected void GridDefaultUserRights_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        try
        {
            MpVechlAdd.Show();
            if (e.CommandName == "Empdeta")
            {
                Ckleads.Items[0].Selected      = false; Ckleads.Items[1].Selected = false; Ckleads.Items[2].Selected = false; Ckleads.Items[3].Selected = false;
                chksales.Items[0].Selected     = false; chksales.Items[1].Selected = false; chksales.Items[2].Selected = false; chksales.Items[3].Selected = false;
                ChkReports.Items[0].Selected   = false; ChkReports.Items[1].Selected = false; ChkReports.Items[1].Selected = false;
                chksaleadmin.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 == "LeadsUpload")
                        {
                            Ckleads.Items[0].Selected = true;
                        }

                        if (Modulename == "Transferin")
                        {
                            Ckleads.Items[1].Selected = true;
                        }
                        if (Modulename == "Abondoned")
                        {
                            Ckleads.Items[2].Selected = true;
                        }
                        if (Modulename == "FreePackage")
                        {
                            Ckleads.Items[3].Selected = true;
                        }

                        if (Modulename == "IntroMail")
                        {
                            chksales.Items[0].Selected = true;
                        }
                        if (Modulename == "NewEntry")
                        {
                            chksales.Items[1].Selected = true;
                        }
                        if (Modulename == "TransferOut")
                        {
                            chksales.Items[2].Selected = true;
                        }
                        if (Modulename == "Ticker")
                        {
                            chksales.Items[3].Selected = true;
                        }

                        if (Modulename == "Self")
                        {
                            ChkReports.Items[0].Selected = true;
                        }
                        if (Modulename == "Center")
                        {
                            ChkReports.Items[1].Selected = true;
                        }

                        if (Modulename == "SalesAdmin")
                        {
                            chksaleadmin.Items[0].Selected = true;
                        }
                    }
                }
            }
        }
        catch { }
    }