コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                // bool flg1 = Membership.DeleteUser("*****@*****.**", true);


                if (!Page.IsPostBack)
                {
                    DataTable dtInd = clsESPSql.ExecQuery("select * from tblmstIndustry ");

                    Industry.DataSource    = dtInd;
                    Industry.DataTextField = "id";
                    Industry.DataTextField = "name";
                    Industry.DataBind();
                    Industry.Items.Insert(0, new ListItem("Select Industry", ""));

                    DataTable dt = clsESPSql.ExecQuery("SP_GetManager");

                    rptuserlist.DataSource = dt;

                    rptuserlist.DataBind();
                    ViewState["dt"]          = dt;
                    CreateUserButton.Visible = true;
                    UpdateUser.Visible       = false;
                }
            }
            catch (Exception ex)
            {
            }
        }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!Page.IsPostBack)
                {
                    DataTable ds = new DataTable();
                    ds = clsESPSql.ExecQuery("SP_GetNatureofBussines_Org " + Session["orgid"].ToString());


                    rptChlList.DataSource = ds;
                    rptChlList.DataBind();
                    DataTable dtNew = new DataTable();
                    dtNew.Columns.Add("yr", typeof(string));
                    dtNew.Rows.Add(DateTime.Now.Year.ToString());
                    dtNew.Rows.Add((DateTime.Now.Year - 1).ToString());
                    ddlfyear.DataSource     = dtNew;
                    ddlfyear.DataTextField  = "yr";
                    ddlfyear.DataValueField = "yr";
                    ddlfyear.DataBind();
                    ddlfyear.Items.Insert(0, new ListItem("Select First Year", ""));
                    bindyearvalue();
                    Session["remarks"]   = null;
                    Session["correct"]   = null;
                    Session["dtprogess"] = null;
                    Session["dtinst"]    = null;
                }
            }
            catch (Exception ex)
            {
            }
        }
コード例 #3
0
        protected void LoginUser_LoggedIn(object sender, EventArgs e)
        {
            try
            {
                if (Roles.IsUserInRole(LoginUser.UserName, "Admin"))
                {
                    Response.Redirect("~/Admin/Default.aspx");
                }
                else if (Roles.IsUserInRole(LoginUser.UserName, "Manager"))
                {
                    DataTable ds = new DataTable();
                    ds = clsESPSql.ExecQuery("select * from tblOrgBasicInfo where username= '******'");
                    if (ds.Rows.Count > 0)
                    {
                        Session["orglevel"] = ds.Rows[0]["orglevel"].ToString();

                        Session["orgid"] = ds.Rows[0]["id"].ToString();
                    }
                    Response.Redirect("~/Manager/dashboard.aspx");
                }
                else if (Roles.IsUserInRole(LoginUser.UserName, "DataEntry"))
                {
                    DataTable ds = new DataTable();
                    ds = clsESPSql.ExecQuery("select * from tblmstorgusers where email= '" + LoginUser.UserName + "'");
                    if (ds.Rows.Count > 0)
                    {
                        Session["orgid"] = ds.Rows[0]["orgid"].ToString();
                    }
                    Response.Redirect("~/DataEntry/DataEntry1.aspx");
                }
            }
            catch (Exception ex)
            {
            }
        }
コード例 #4
0
 protected void getRatingndGrade()
 {
     try
     {
         DataTable dt1 = clsESPSql.ExecQuery("select * from tblmstPerformance where orgid=" + Session["orgid"].ToString());
         ViewState["dtRating"] = dt1;
         DataTable dt = clsESPSql.ExecQuery("select * from tblmstgrade where orgid=" + Session["orgid"].ToString());
         ViewState["dtGrade"] = dt;
     }
     catch (Exception ex1)
     {
     }
 }
コード例 #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                //

                if (!Page.IsPostBack)
                {
                    string qry = "select top(1) fYear from tblmstemployee where orgid=" + Session["orgid"].ToString() + "  order by fYear desc ";
                    MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();
                    DataTable dt = clsESPSql.ExecQuery(qry);
                    if (dt.Rows.Count > 0)
                    {
                        lblchart2.Text = dt.Rows[0]["fYear"].ToString();
                        lblchart3.Text = dt.Rows[0]["fYear"].ToString();
                        lblchart4.Text = dt.Rows[0]["fYear"].ToString();
                        // lblchart5.Text = dt.Rows[0]["fYear"].ToString();
                        lblchart6.Text = dt.Rows[0]["fYear"].ToString();
                        lblchart7.Text = dt.Rows[0]["fYear"].ToString();
                        lblchart8.Text = dt.Rows[0]["fYear"].ToString();
                    }
                }
            }
            catch (Exception ex)
            {
            }
        }
コード例 #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                //

                if (!Page.IsPostBack)
                {
                    string qry = "select top(1) fYear,cur=(select top 1 currency from tblmstOrgInfo where orgid=tblmstemployee.orgid ) from tblmstemployee where orgid=" + Session["orgid"].ToString() + "  order by fYear desc ";
                    MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();
                    DataTable dt = clsESPSql.ExecQuery(qry);
                    if (dt.Rows.Count > 0)
                    {
                        lblchart2.Text = dt.Rows[0]["fYear"].ToString();
                        lblchart3.Text = dt.Rows[0]["fYear"].ToString();
                        lblchart4.Text = dt.Rows[0]["fYear"].ToString();
                        // lblchart5.Text = dt.Rows[0]["fYear"].ToString();
                        lblchart6.Text = dt.Rows[0]["fYear"].ToString();
                        lblchart7.Text = dt.Rows[0]["fYear"].ToString();
                        lblchart8.Text = dt.Rows[0]["fYear"].ToString();
                        lblday.Text    = DateTime.Now.Day.ToString();
                        lblmnth.Text   = DateTime.Now.Month.ToString();
                        lblyear.Text   = DateTime.Now.Year.ToString();
                        if (dt.Rows.Count > 0)
                        {
                            lblcur.Value = dt.Rows[0]["cur"].ToString();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
            }
        }
コード例 #7
0
        void bindGridPerformancedata()
        {
            try
            {
                string qry = "SP_List4AddPerformance " + Session["orgid"].ToString();
                MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();
                DataTable dt = clsESPSql.ExecQuery(qry);

                ViewState["dt"] = dt;
                if (dt.Rows.Count > 0)
                {
                    rptListPer.DataSource = dt;
                    rptListPer.DataBind();
                }
                dt.DefaultView.RowFilter = "LatestPerformance<>''";
                if (dt.DefaultView.Count > 0)
                {
                    LinkButton lnkremove = (LinkButton)rptListPer.Items[dt.DefaultView.Count - 1].FindControl("lnkremove");
                    lnkremove.Visible = true;
                }

                dt.DefaultView.RowFilter = "";
            }
            catch (Exception ex)
            { }
        }
コード例 #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (Session["orgid"] == null)
                {
                    Response.Redirect("~/Account/Register.aspx", false);
                }
                else
                {
                    string qry = "select top 1 1 from tblmstemployee where orgid=" + Session["orgid"].ToString();
                    MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();
                    DataTable dt = clsESPSql.ExecQuery(qry);
                    if (dt.Rows != null)
                    {
                        if (dt.Rows.Count > 0)
                        {
                            RPT.Visible = true;
                            if (Session["orglevel"] != null)
                            {
                                if (Session["orglevel"].ToString() == "2")
                                {
                                    LiRptLvl2.Visible = true;
                                }
                            }
                        }
                    }

                    //lbluser.Text = User.Identity.Name;
                }
            }
            catch (Exception ex)
            {
            }
        }
コード例 #9
0
        private void Bindchart()
        {
            string qry = "[dbo].SP_GetRptTFPOverAll " + HttpContext.Current.Session["orgid"].ToString() + "";

            MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();
            DataTable dt = clsESPSql.ExecQuery(qry);

            DataTable ChartData = dt;

            //storing total rows count to loop on each Record
            string[] XPointMember = new string[ChartData.Rows.Count];
            int[]    YPointMember = new int[ChartData.Rows.Count];

            for (int count = 0; count < ChartData.Rows.Count; count++)
            {
                //storing Values for X axis
                XPointMember[count] = ChartData.Rows[count]["fyear"].ToString();
                //storing values for Y Axis
                YPointMember[count] = Convert.ToInt32(ChartData.Rows[count]["cnt"]);
            }
            //binding chart control
            Chart1.Series[0].Points.DataBindXY(XPointMember, YPointMember);

            //Setting width of line
            Chart1.Series[0].BorderWidth = 10;
            //setting Chart type
            Chart1.Series[0].ChartType = SeriesChartType.RangeColumn;
            //Chart1.Legends(0).Enabled = True;
            //Hide or show chart back GridLines
            // Chart1.ChartAreas["ChartArea1"].AxisX.MajorGrid.Enabled = false;
            // Chart1.ChartAreas["ChartArea1"].AxisY.MajorGrid.Enabled = false;

            //Enabled 3D
            //Chart1.ChartAreas["ChartArea1"].Area3DStyle.Enable3D = true;
        }
コード例 #10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!Page.IsPostBack)
                {
                    string qry = "SP_GetRptHeadCountDeptWiseLatestYear_level2 " + Session["orgid"].ToString();
                    MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();
                    DataTable dt = clsESPSql.ExecQuery(qry);

                    dt.DefaultView.RowFilter = "category='Category A'";
                    grdListA.DataSource      = dt;
                    grdListA.DataBind();

                    dt.DefaultView.RowFilter = "";
                    dt.DefaultView.RowFilter = "category='Category B'";
                    grdListB.DataSource      = dt;
                    grdListB.DataBind();

                    dt.DefaultView.RowFilter = "";
                    dt.DefaultView.RowFilter = "category='Category C'";
                    grdListC.DataSource      = dt;
                    grdListC.DataBind();
                    //rptlistyr1.DataSource = dt;
                    //rptlistyr1.DataBind();
                }
            }
            catch (Exception ex)
            {
            }
        }
コード例 #11
0
        public static string GetdeptWise(string yr)
        {
            JavaScriptSerializer jsSerializer = new JavaScriptSerializer();
            string qry = " [dbo].SP_GetOrgoveralltenureDept " + HttpContext.Current.Session["orgid"].ToString() + ",'" + yr + "'";

            MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();
            DataTable dt = clsESPSql.ExecQuery(qry);

            //List<List<Dictionary<string, object>>> parentRow = new List<List<Dictionary<string, object>>>();
            List <Dictionary <string, object> > parentRow = new List <Dictionary <string, object> >();

            try
            {
                if (dt != null)
                {
                    if (dt.Rows.Count > 0)
                    {
                        Dictionary <string, object> childRow;
                        ArrayList arrlabel = new ArrayList();
                        ArrayList arrvalue = new ArrayList();
                        foreach (DataRow row in dt.Rows)
                        {
                            arrlabel.Add(row["dept"].ToString());
                            arrvalue.Add(row["cnt"]);
                        }
                        childRow = new Dictionary <string, object>();
                        childRow.Add("label", arrlabel);
                        childRow.Add("value", arrvalue);



                        parentRow.Add(childRow);
                        //DataTable dtdept = dt.DefaultView.ToTable(true, "dept", "cnt");

                        //Dictionary<string, object> childRowdept;
                        //ArrayList arrdept = new ArrayList();
                        //ArrayList arryear = new ArrayList();
                        //foreach (DataRow row in dtdept.Rows)
                        //{
                        //    childRowdept = new Dictionary<string, object>();
                        //    childRowdept.Add("value", row["cnt"]);
                        //    childRowdept.Add("name", row["dept"].ToString());

                        //    //string deptname = row["dept"].ToString();
                        //    //arrdept.Add(row["dept"].ToString());
                        //    //arryear.Add(row["cnt"]);
                        //    parentRowdept.Add(childRowdept);
                        //}
                    }
                }
            }
            catch (Exception ec)
            {
            }

            return(jsSerializer.Serialize(parentRow));
        }
コード例 #12
0
        public static string GetAgeDistdeptWise(string yr)
        {
            JavaScriptSerializer jsSerializer = new JavaScriptSerializer();
            string qry = "SP_GetRptTFPDeptwise " + HttpContext.Current.Session["orgid"].ToString() + ", '" + yr + "'";

            MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();
            DataTable dt = clsESPSql.ExecQuery(qry);
            List <List <Dictionary <string, object> > > parentRow = new List <List <Dictionary <string, object> > >();
            //List<List<Dictionary<string, object>>> parentRow = new List<List<Dictionary<string, object>>>();
            List <Dictionary <string, object> > parentRowSeries = new List <Dictionary <string, object> >();

            try
            {
                if (dt != null)
                {
                    if (dt.Rows.Count > 0)
                    {
                        Dictionary <string, object> childRowdept;

                        ArrayList arrdept = new ArrayList();



                        foreach (DataRow row1 in dt.Rows)
                        {
                            string deptname = row1["dept"].ToString();
                            childRowdept = new Dictionary <string, object>();
                            childRowdept.Add("name", deptname);
                            ArrayList arrdata = new ArrayList();
                            arrdata.Add(row1["cnt"]);
                            childRowdept.Add("data", arrdata);


                            //arryear.Add(row["cnt"]);
                            parentRowSeries.Add(childRowdept);
                        }


                        List <Dictionary <string, object> > parentRowdata = new List <Dictionary <string, object> >();
                        Dictionary <string, object>         childRowdata  = new Dictionary <string, object>();
                        arrdept.Add(yr);
                        childRowdata.Add("cat", arrdept);
                        parentRowdata.Add(childRowdata);
                        parentRow.Add(parentRowSeries);
                        parentRow.Add(parentRowdata);
                    }
                }
            }
            catch (Exception ec)
            {
            }

            return(jsSerializer.Serialize(parentRow));
        }
コード例 #13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                // bool flg1 = Membership.DeleteUser("*****@*****.**", true);


                if (!Page.IsPostBack)
                {
                    DataTable dt = clsESPSql.ExecQuery("select convert(varchar(10),id)+'_'+convert(varchar(10),inputno) as inputno,name from tblmstMetric where IsBenchmark=1 ");

                    ddlRType.DataSource     = dt;
                    ddlRType.DataValueField = "inputno";
                    ddlRType.DataTextField  = "name";
                    ddlRType.DataBind();
                    ddlRType.Items.Insert(0, new ListItem("Select Metric", ""));
                }
            }
            catch (Exception ex)
            {
            }
        }
コード例 #14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                // bool flg1 = Membership.DeleteUser("*****@*****.**", true);


                if (!Page.IsPostBack)
                {
                    DataTable dt = clsESPSql.ExecQuery("select * from tblmstIndustry ");

                    Industry.DataSource    = dt;
                    Industry.DataTextField = "id";
                    Industry.DataTextField = "name";
                    Industry.DataBind();
                    Industry.Items.Insert(0, new ListItem("Select Industry", ""));
                }
            }
            catch (Exception ex)
            {
            }
        }
コード例 #15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                // bool flg1 = Membership.DeleteUser("*****@*****.**", true);


                if (!Page.IsPostBack)
                {
                    DataTable    dt          = clsESPSql.ExecQuery("select * from tblmstIndustry ");
                    DropDownList ddlindustry = (DropDownList)RegisterUserWizardStep.ContentTemplateContainer.FindControl("Industry");
                    ddlindustry.DataSource    = dt;
                    ddlindustry.DataTextField = "id";
                    ddlindustry.DataTextField = "name";
                    ddlindustry.DataBind();
                    ddlindustry.Items.Insert(0, new ListItem("Select Industry", ""));
                }
            }
            catch (Exception ex)
            {
            }
        }
コード例 #16
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                // bool flg1 = Membership.DeleteUser("*****@*****.**", true);


                if (!Page.IsPostBack)
                {
                    DataTable dt = clsESPSql.ExecQuery("SP_GetUserByRole 'DataEntry', " + Session["orgid"].ToString());

                    rptuserlist.DataSource = dt;

                    rptuserlist.DataBind();
                    ViewState["dt"]          = dt;
                    CreateUserButton.Visible = true;
                    UpdateUser.Visible       = false;
                }
            }
            catch (Exception ex)
            {
            }
        }
コード例 #17
0
        public static string GetSPOCData()
        {
            JavaScriptSerializer jsSerializer = new JavaScriptSerializer();
            string qry = "SP_GetRptSPOCLatesty_level2 " + HttpContext.Current.Session["orgid"].ToString();

            MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();
            DataTable dt = clsESPSql.ExecQuery(qry);
            List <List <Dictionary <string, object> > > parentRow = new List <List <Dictionary <string, object> > >();
            //List<List<Dictionary<string, object>>> parentRow = new List<List<Dictionary<string, object>>>();
            List <Dictionary <string, object> > parentRowSeries = new List <Dictionary <string, object> >();

            try
            {
                ArrayList arrdept = new ArrayList();
                if (dt != null)
                {
                    if (dt.Rows.Count > 0)
                    {
                        Dictionary <string, object> childRowdept;
                        arrdept.Add("test");
                        for (int i = 0; i < dt.Rows.Count; i++)
                        {
                            childRowdept = new Dictionary <string, object>();
                            ArrayList arrdata = new ArrayList();
                            arrdata.Add(dt.Rows[i]["value"]);
                            childRowdept.Add("name", dt.Rows[i]["name"].ToString());
                            childRowdept.Add("data", arrdata);
                            parentRowSeries.Add(childRowdept);
                        }

                        //arryear.Add(row["cnt"]);
                    }
                    List <Dictionary <string, object> > parentRowdata = new List <Dictionary <string, object> >();
                    Dictionary <string, object>         childRowdata  = new Dictionary <string, object>();
                    childRowdata.Add("cat", arrdept);
                    parentRowdata.Add(childRowdata);
                    parentRow.Add(parentRowSeries);
                    parentRow.Add(parentRowdata);
                }
            }
            catch (Exception ec)
            {
            }

            return(jsSerializer.Serialize(parentRow));
        }
コード例 #18
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (!Page.IsPostBack)
         {
             string qry = "select distinct fYear from tblmstemployee where orgid=" + Session["orgid"].ToString() + "  order by fYear ";
             MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();
             DataTable dt = clsESPSql.ExecQuery(qry);
             rptlistyr.DataSource = dt;
             rptlistyr.DataBind();
             rptlistyr1.DataSource = dt;
             rptlistyr1.DataBind();
         }
     }
     catch (Exception ex)
     {
     }
 }
コード例 #19
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (!Page.IsPostBack)
         {
             string qry = "Sp_GetTFPInternalEquitybyGender " + Session["orgid"].ToString();
             MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();
             DataTable dt = clsESPSql.ExecQuery(qry);
             grdList.DataSource = dt;
             grdList.DataBind();
             //rptlistyr1.DataSource = dt;
             //rptlistyr1.DataBind();
         }
     }
     catch (Exception ex)
     {
     }
 }
コード例 #20
0
        public static string GetGenderDistrByFyear(string yr)
        {
            JavaScriptSerializer jsSerializer = new JavaScriptSerializer();
            string qry = "SP_GetOrgLatestPerformanceDiversityByFyear " + HttpContext.Current.Session["orgid"].ToString() + ",'" + yr + "'";

            MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();
            DataTable dt = clsESPSql.ExecQuery(qry);
            List <List <Dictionary <string, object> > > parentRow = new List <List <Dictionary <string, object> > >();
            //List<List<Dictionary<string, object>>> parentRow = new List<List<Dictionary<string, object>>>();
            List <Dictionary <string, object> > parentRowdept = new List <Dictionary <string, object> >();

            try
            {
                if (dt != null)
                {
                    if (dt.Rows.Count > 0)
                    {
                        DataTable dtdept = dt.DefaultView.ToTable(true, "LatestPerformance", "cnt");

                        Dictionary <string, object> childRowdept;
                        ArrayList arrdept = new ArrayList();
                        ArrayList arryear = new ArrayList();
                        foreach (DataRow row in dtdept.Rows)
                        {
                            childRowdept = new Dictionary <string, object>();
                            childRowdept.Add("value", row["cnt"]);
                            childRowdept.Add("name", row["LatestPerformance"].ToString());

                            //string deptname = row["dept"].ToString();
                            //arrdept.Add(row["dept"].ToString());
                            //arryear.Add(row["cnt"]);
                            parentRowdept.Add(childRowdept);
                        }
                    }
                }
            }
            catch (Exception ec)
            {
            }

            return(jsSerializer.Serialize(parentRowdept));
        }
コード例 #21
0
        public void EmailPassword_OnClick(object sender, EventArgs args)
        {
            MembershipUser user = Membership.GetUser(UsernameTextBox.Text, false);
            string         password;

            if (user != null)
            {
                try
                {
                    MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();
                    System.Data.DataTable         dt        = clsESPSql.ExecQuery("select * from aspnet_Users where username= '******' or mobilealias='" + UsernameTextBox.Text + "'");
                    if (dt.Rows.Count > 0)
                    {
                        EmailPassword(user.Email, dt.Rows[0]["pwd"].ToString());
                        Msg.Text = "Password sent via email.";
                    }
                    // Attempt to find the user

                    // Unlock them if needed
                    //  user.UnlockUser();

                    //  // They exist, so attempt to reset their password
                    //  user.ResetPassword();

                    //  // Change the user's password
                    //  var newPassword =
                    //      // 0 = Number of non alphanumeric characters
                    //Membership.GeneratePassword(Membership.MinRequiredPasswordLength, 0);
                    //  password = newPassword;
                    //  user.ChangePassword(user.ResetPassword(), newPassword);
                }
                catch (Exception e)
                {
                    Msg.Text = "An exception occurred retrieving your password: "******"User name is not valid. Please check the value and try again.";
            }
        }
コード例 #22
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                // bool flg1 = Membership.DeleteUser("*****@*****.**", true);

                //  RegisterUser.ContinueDestinationPageUrl = Request.QueryString["ReturnUrl"];


                DataTable dt = clsESPSql.ExecQuery("select * from tblmstIndustry ");

                Industry.DataSource    = dt;
                Industry.DataTextField = "id";
                Industry.DataTextField = "name";
                Industry.DataBind();
            }
            catch (Exception ex)
            {
            }
        }
コード例 #23
0
        public static string GetYearwise()
        {
            JavaScriptSerializer jsSerializer = new JavaScriptSerializer();
            string qry = "[dbo].SP_GetRptattrtionOverAll " + HttpContext.Current.Session["orgid"].ToString() + "";

            MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();
            DataTable dt = clsESPSql.ExecQuery(qry);


            List <Dictionary <string, object> > parentRow = new List <Dictionary <string, object> >();

            try
            {
                if (dt != null)
                {
                    if (dt.Rows.Count > 0)
                    {
                        Dictionary <string, object> childRow;
                        ArrayList arrlabel = new ArrayList();
                        ArrayList arrvalue = new ArrayList();
                        foreach (DataRow row in dt.Rows)
                        {
                            arrlabel.Add(row["fYear"].ToString());
                            arrvalue.Add(row["cnt"]);
                        }
                        childRow = new Dictionary <string, object>();
                        childRow.Add("label", arrlabel);
                        childRow.Add("value", arrvalue);



                        parentRow.Add(childRow);
                    }
                }
            }
            catch (Exception ec)
            {
            }

            return(jsSerializer.Serialize(parentRow));
        }
コード例 #24
0
        protected void rptListGrade_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            try
            {
                lblmsg1.Text        = "";
                lblsuccessmsg1.Text = "";
                if (e.CommandName == "modify")
                {
                    bindControlsGrade(e.CommandArgument.ToString());
                    Page.ClientScript.RegisterStartupScript(GetType(), "popupDesi", "<SCRIPT LANGUAGE='javascript'>javascript:openPopUp('newModal');</script>");
                }
                if (e.CommandName == "remove")
                {
                    Page.ClientScript.RegisterStartupScript(GetType(), "popupDesi", "<SCRIPT LANGUAGE='javascript'>javascript:openPopUp('newModal');</script>");
                    string qry = "SELECT TOP 1 1 FROM tblmstgrade where ID=" + e.CommandArgument.ToString() + " and Grade  in (select Grade from tblmstEmployee where orgid=tblmstgrade.orgid)";
                    MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();
                    DataTable dt = clsESPSql.ExecQuery(qry);
                    if (dt != null)
                    {
                        if (dt.Rows.Count > 0)
                        {
                            lblmsg1.Text      = "Can not be deleted, Already in use! ";
                            lblmsg1.ForeColor = System.Drawing.Color.Red;
                            return;
                        }
                    }

                    int    res   = clsESPSql.DeleteSYData(" where ID=" + e.CommandArgument.ToString() + " and  Grade not in (select Grade from tblmstEmployee where orgid=tblmstgrade.orgid)", "tblmstgrade");
                    string strpg = Request.Url.ToString();
                    lblmsg1.Text      = "Deleted Successfuly";
                    lblmsg1.ForeColor = System.Drawing.Color.Red;
                    bindGridGradedata();
                    Page.ClientScript.RegisterStartupScript(GetType(), "desiSubmit", "<SCRIPT LANGUAGE='javascript'>javascript:openPopUp('newModal');</script>");
                }
            }
            catch (Exception ex)
            {
            }
        }
コード例 #25
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!Page.IsPostBack)
                {
                    string qry = "select distinct fYear,cur=(select top 1 currency from tblmstOrgInfo where orgid=tblmstemployee.orgid )  from tblmstemployee where orgid=" + Session["orgid"].ToString() + "  order by fYear ";
                    MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();
                    DataTable dt = clsESPSql.ExecQuery(qry);
                    rptlistyr.DataSource = dt;
                    rptlistyr.DataBind();
                    rptlistyr1.DataSource = dt;
                    rptlistyr1.DataBind();

                    if (dt.Rows.Count > 0)
                    {
                        lblcur.Text = dt.Rows[0]["cur"].ToString();
                    }
                }
            }
            catch (Exception ex)
            {
            }
        }
コード例 #26
0
        public static string GetgenderDistOrgWise()
        {
            JavaScriptSerializer jsSerializer = new JavaScriptSerializer();
            string qry = "SP_GetOrgLatestPerformanceDiversity " + HttpContext.Current.Session["orgid"].ToString() + "";

            MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();
            DataTable dt = clsESPSql.ExecQuery(qry);
            List <List <Dictionary <string, object> > > parentRow = new List <List <Dictionary <string, object> > >();
            //List<List<Dictionary<string, object>>> parentRow = new List<List<Dictionary<string, object>>>();
            List <Dictionary <string, object> > parentRowSeries = new List <Dictionary <string, object> >();

            try
            {
                if (dt != null)
                {
                    if (dt.Rows.Count > 0)
                    {
                        DataTable dtdept = dt.DefaultView.ToTable(true, "fyear");
                        dt.DefaultView.Sort = "perlevel asc";
                        DataTable dtgender = dt.DefaultView.ToTable(true, "LatestPerformance");
                        Dictionary <string, object> childRowdept;

                        ArrayList arrdept = new ArrayList();

                        Dictionary <string, object> childRow1 = new Dictionary <string, object>();
                        childRow1.Add("show", true);
                        childRow1.Add("position", "insideRight");
                        Dictionary <string, object> childRow2 = new Dictionary <string, object>();
                        childRow2.Add("label", childRow1);
                        Dictionary <string, object> childRow3 = new Dictionary <string, object>();
                        childRow3.Add("normal", childRow2);
                        //foreach (DataRow row in dtgender.Rows)
                        for (int i = 0; i < dtgender.Rows.Count; i++)
                        {
                            ArrayList arrdata = new ArrayList();
                            foreach (DataRow row1 in dtdept.Rows)
                            {
                                string deptname = row1["fyear"].ToString();
                                if (i == 0)
                                {
                                    arrdept.Add(deptname);
                                }

                                dt.DefaultView.RowFilter = "";
                                dt.DefaultView.RowFilter = "fyear='" + deptname + "' and LatestPerformance='" + dtgender.Rows[i]["LatestPerformance"].ToString() + "'";
                                DataView dv = dt.DefaultView;
                                if (dv.Count > 0)
                                {
                                    arrdata.Add(dv[0]["cnt"]);
                                }
                                else
                                {
                                    arrdata.Add(0);
                                }
                            }
                            childRowdept = new Dictionary <string, object>();
                            childRowdept.Add("name", dtgender.Rows[i]["LatestPerformance"].ToString());
                            childRowdept.Add("type", "bar");
                            childRowdept.Add("stack", "Stack");
                            childRowdept.Add("itemStyle", childRow3);
                            childRowdept.Add("data", arrdata);


                            //arryear.Add(row["cnt"]);
                            parentRowSeries.Add(childRowdept);
                        }
                        List <Dictionary <string, object> > parentRowdata = new List <Dictionary <string, object> >();
                        Dictionary <string, object>         childRowdata  = new Dictionary <string, object>();
                        childRowdata.Add("cat", arrdept);
                        parentRowdata.Add(childRowdata);
                        parentRow.Add(parentRowSeries);
                        parentRow.Add(parentRowdata);
                    }
                }
            }
            catch (Exception ec)
            {
            }

            return(jsSerializer.Serialize(parentRow));
        }
コード例 #27
0
        public static string Getdata()
        {
            JavaScriptSerializer jsSerializer = new JavaScriptSerializer();
            string qry = "SP_GetTFPCompaRatio " + HttpContext.Current.Session["orgid"].ToString() + "";

            MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();
            DataTable dt = clsESPSql.ExecQuery(qry);
            List <List <Dictionary <string, object> > > parentRow = new List <List <Dictionary <string, object> > >();
            //List<List<Dictionary<string, object>>> parentRow = new List<List<Dictionary<string, object>>>();
            List <Dictionary <string, object> > parentRowSeries = new List <Dictionary <string, object> >();

            try
            {
                if (dt != null)
                {
                    if (dt.Rows.Count > 0)
                    {
                        DataTable dtdept = dt.DefaultView.ToTable(true, "grade");

                        DataTable dtgender = dt.DefaultView.ToTable(true, "rangeratio");
                        Dictionary <string, object> childRowdept;

                        ArrayList arrdept = new ArrayList();


                        //foreach (DataRow row in dtgender.Rows)
                        for (int i = 0; i < dtgender.Rows.Count; i++)
                        {
                            ArrayList arrdata = new ArrayList();
                            foreach (DataRow row1 in dtdept.Rows)
                            {
                                string deptname = row1["grade"].ToString();
                                if (i == 0)
                                {
                                    arrdept.Add(deptname);
                                }

                                dt.DefaultView.RowFilter = "";
                                dt.DefaultView.RowFilter = "grade='" + deptname + "' and rangeratio='" + dtgender.Rows[i]["rangeratio"].ToString() + "'";
                                DataView dv = dt.DefaultView;
                                if (dv.Count > 0)
                                {
                                    arrdata.Add(dv[0]["cnt"]);
                                }
                                else
                                {
                                    arrdata.Add(0);
                                }
                            }
                            childRowdept = new Dictionary <string, object>();
                            childRowdept.Add("name", dtgender.Rows[i]["rangeratio"].ToString());

                            childRowdept.Add("data", arrdata);


                            //arryear.Add(row["cnt"]);
                            parentRowSeries.Add(childRowdept);
                        }
                        List <Dictionary <string, object> > parentRowdata = new List <Dictionary <string, object> >();
                        Dictionary <string, object>         childRowdata  = new Dictionary <string, object>();
                        childRowdata.Add("cat", arrdept);
                        parentRowdata.Add(childRowdata);
                        parentRow.Add(parentRowSeries);
                        parentRow.Add(parentRowdata);
                    }
                }
            }
            catch (Exception ec)
            {
            }

            return(jsSerializer.Serialize(parentRow));
        }
コード例 #28
0
        public static string GetDistdeptWise(string yr)
        {
            JavaScriptSerializer jsSerializer = new JavaScriptSerializer();

            List <List <Dictionary <string, object> > > parentRow = new List <List <Dictionary <string, object> > >();
            //List<List<Dictionary<string, object>>> parentRow = new List<List<Dictionary<string, object>>>();
            List <Dictionary <string, object> > parentRowSeries = new List <Dictionary <string, object> >();

            try
            {
                string qryorg = "[dbo].SP_GetRptSPOCOverAll " + HttpContext.Current.Session["orgid"].ToString() + "";
                MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();
                DataTable dtorg = clsESPSql.ExecQuery(qryorg);

                string qry = "SP_GetRptSPOCDeptwise " + HttpContext.Current.Session["orgid"].ToString() + ", '" + yr + "'";

                DataTable dt = clsESPSql.ExecQuery(qry);
                if (dt != null)
                {
                    if (dt.Rows.Count > 0)
                    {
                        DataTable dtdept = dt.DefaultView.ToTable(true, "dept");

                        Dictionary <string, object> childRowdept;

                        ArrayList arrdept = new ArrayList();

                        Dictionary <string, object> childRow1 = new Dictionary <string, object>();
                        childRow1.Add("show", true);
                        childRow1.Add("position", "insideRight");
                        Dictionary <string, object> childRow2 = new Dictionary <string, object>();
                        childRow2.Add("label", childRow1);
                        Dictionary <string, object> childRow3 = new Dictionary <string, object>();
                        childRow3.Add("normal", childRow2);
                        dtorg.DefaultView.RowFilter = "fyear='" + yr + "'";
                        decimal   orgavg     = Convert.ToDecimal(dtorg.DefaultView[0]["cnt"]);
                        ArrayList arrdata    = new ArrayList();
                        ArrayList arrdataorg = new ArrayList();
                        foreach (DataRow row1 in dtdept.Rows)
                        {
                            string deptname = row1["dept"].ToString();

                            arrdept.Add(deptname);


                            dt.DefaultView.RowFilter = "";
                            dt.DefaultView.RowFilter = "dept='" + deptname + "'";
                            DataView dv = dt.DefaultView;
                            if (dv.Count > 0)
                            {
                                arrdata.Add(dv[0]["cnt"]);
                            }

                            arrdataorg.Add(orgavg);
                        }
                        childRowdept = new Dictionary <string, object>();
                        childRowdept.Add("name", "Deparment Avg. SPOC");
                        childRowdept.Add("type", "column");
                        childRowdept.Add("data", arrdata);



                        parentRowSeries.Add(childRowdept);

                        childRowdept = new Dictionary <string, object>();
                        childRowdept.Add("name", "Organizational Average");
                        childRowdept.Add("type", "line");
                        childRowdept.Add("data", arrdataorg);



                        parentRowSeries.Add(childRowdept);

                        List <Dictionary <string, object> > parentRowdata = new List <Dictionary <string, object> >();
                        Dictionary <string, object>         childRowdata  = new Dictionary <string, object>();
                        childRowdata.Add("cat", arrdept);
                        parentRowdata.Add(childRowdata);
                        parentRow.Add(parentRowSeries);
                        parentRow.Add(parentRowdata);
                    }
                }
            }
            catch (Exception ec)
            {
            }

            return(jsSerializer.Serialize(parentRow));
        }
コード例 #29
0
        public static string GetLeveWise()
        {
            JavaScriptSerializer jsSerializer = new JavaScriptSerializer();
            string qry = " [dbo].SP_GetRptORGPyramid " + HttpContext.Current.Session["orgid"].ToString();

            MyCLS.clsExecuteStoredProcSql clsESPSql = new MyCLS.clsExecuteStoredProcSql();
            DataTable dt = clsESPSql.ExecQuery(qry);
            List <List <Dictionary <string, object> > > parentRow = new List <List <Dictionary <string, object> > >();
            //List<List<Dictionary<string, object>>> parentRow = new List<List<Dictionary<string, object>>>();
            List <Dictionary <string, object> > parentRowSeries = new List <Dictionary <string, object> >();

            try
            {
                if (dt != null)
                {
                    if (dt.Rows.Count > 0)
                    {
                        Dictionary <string, object> childRowdept;

                        ArrayList arrdept = new ArrayList();



                        //foreach (DataRow row in dtage_range.Rows)

                        ArrayList arrdata  = new ArrayList();
                        ArrayList arrdata1 = new ArrayList();
                        foreach (DataRow row1 in dt.Rows)
                        {
                            string deptname = row1["grade"].ToString();

                            arrdept.Add(deptname);

                            int i = -Convert.ToInt32(row1["cnt"]);
                            arrdata.Add(row1["cnt"]);
                            arrdata1.Add(i);
                        }

                        Dictionary <string, object> childRow1 = new Dictionary <string, object>();

                        childRow1.Add("name", "Headcount");

                        childRow1.Add("data", arrdata);
                        parentRowSeries.Add(childRow1);

                        Dictionary <string, object> childRow2 = new Dictionary <string, object>();
                        childRow2.Add("name", "Headcount");

                        childRow2.Add("data", arrdata1);
                        //arryear.Add(row["cnt"]);
                        parentRowSeries.Add(childRow2);

                        List <Dictionary <string, object> > parentRowdata = new List <Dictionary <string, object> >();
                        Dictionary <string, object>         childRowdata  = new Dictionary <string, object>();
                        childRowdata.Add("cat", arrdept);
                        parentRowdata.Add(childRowdata);
                        parentRow.Add(parentRowSeries);
                        parentRow.Add(parentRowdata);
                    }
                }
            }
            catch (Exception ec)
            {
            }

            return(jsSerializer.Serialize(parentRow));
        }
コード例 #30
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                Guid           newUserId = new Guid(Session["ID"].ToString());
                MembershipUser newUser   = Membership.GetUser(newUserId);


                if (newUser == null)
                {
                    lblMessage.Text = "User Account not found";
                }
                else
                {
                    newUser.IsApproved = true;

                    Membership.UpdateUser(newUser);

                    // string strpwd = newUser.GetPassword();
                    bool isValid = true;
                    if (isValid)
                    {
                        try
                        {
                            if (Roles.IsUserInRole(newUser.UserName, "Admin"))
                            {
                                Response.Redirect("~/Admin/Default.aspx");
                            }
                            else if (Roles.IsUserInRole(newUser.UserName, "Manager"))
                            {
                                DataTable ds = new DataTable();
                                ds = clsESPSql.ExecQuery("select * from tblOrgBasicInfo where username= '******'");
                                if (ds.Rows.Count > 0)
                                {
                                    //IdentityHelper.SignIn(manager, user, isPersistent: false);
                                    //IdentityHelper.RedirectToReturnUrl(Request.QueryString["ReturnUrl"], Response);

                                    Session["orgid"] = ds.Rows[0]["id"].ToString();
                                }
                                FormsAuthentication.RedirectFromLoginPage(newUser.UserName.ToString(), true);
                                AuthenticateEventArgs auth = new AuthenticateEventArgs();
                                auth.Authenticated = true;
                                LoginUser_Authenticate(this, auth);


                                //if (Page.User.Identity.IsAuthenticated)
                                //{
                                //    // Roles.AddUserToRole(newUser.UserName, "Manager");

                                //    Response.Redirect("~/Manager/DataEntry1.aspx");
                                //}
                            }
                            else
                            {
                                lblMessage.Text = "User Account not found";
                            }
                        }
                        catch (Exception ex)
                        {
                        }
                    }
                    else
                    {
                        lblMessage.Text = "User Account not found";
                    }
                    //Membership.v
                    //FormsAuthentication.SignOut();
                    //Roles.DeleteCookie();
                    //Session.Clear();
                    //FormsAuthentication.RedirectToLoginPage();
                }
            }
            catch (Exception ex)
            {
                lblMessage.Text = "User Account not found";
            }
        }