示例#1
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     if (IsPageValid())
     {
         int            emid = Convert.ToInt32(Session["EmployeeId"]);
         BasEmScoreInfo bes  = new BasEmScoreInfo();
         bes.EmployeeId      = emid;
         bes.DateSpan        = ddlYear.SelectedItem.Text + "年" + ddlMonth.SelectedItem.Text + "月";
         bes.YearId          = Convert.ToInt32(ddlYear.SelectedValue);
         bes.MonthId         = Convert.ToInt32(ddlMonth.SelectedValue);
         bes.EvaluateLevelId = 6;
         bes.TotalScore      = "待评";
         bes.IsSubmit        = 0;
         bes.Selfbas1        = Request.Form["iSelfbas1"].ToString();
         bes.Selfbas2        = Request.Form["iSelfbas2"].ToString();
         bes.Selfbas3        = Request.Form["iSelfbas3"].ToString();
         bes.Selfbas4        = Request.Form["iSelfbas4"].ToString();
         bes.Selfbas5        = Request.Form["iSelfbas5"].ToString();
         bes.Selfbas6        = Request.Form["iSelfbas6"].ToString();
         bes.Selfbas7        = Request.Form["iSelfbas7"].ToString();
         bes.Selfbas8        = Request.Form["iSelfbas8"].ToString();
         bes.Selfbas9        = Request.Form["iSelfbas9"].ToString();
         bes.Selfbas10       = Request.Form["iSelfbas10"].ToString();
         bes.Selfbas11       = Request.Form["iSelfbas11"].ToString();
         bes.Selfbas12       = Request.Form["iSelfbas12"].ToString();
         bes.Selfbas13       = Request.Form["iSelfbas13"].ToString();
         bes.Selfbas14       = Request.Form["iSelfbas14"].ToString();
         bes.Selfbas15       = Request.Form["iSelfbas15"].ToString();
         bes.Selfbas16       = Request.Form["iSelfbas16"].ToString();
         bes.Selfbas17       = Request.Form["iSelfbas17"].ToString();
         bes.Save();
         Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('保存成功!');</script>");
     }
 }
示例#2
0
        protected void PageInit()
        {
            int            besid = Convert.ToInt32(Request["BasEmScoreId"].ToString());
            BasEmScoreInfo bes   = new BasEmScoreInfo(besid);
            EmployeeInfo   em    = new EmployeeInfo(Convert.ToInt32(bes.EmployeeId));

            lblName.Text = em.EmployeeName.ToString();
            PositionInfo position = new PositionInfo(Convert.ToInt32(em.PositionId));

            lblPosition.Text = position.PositionName.ToString();
            DepartInfo depart = new DepartInfo(Convert.ToInt32(em.DepartId));

            lblDepart.Text = depart.DepartName.ToString();

            ddlYear.SelectedValue  = bes.YearId.ToString();
            ddlMonth.SelectedValue = bes.MonthId.ToString();

            Selfbas1  = bes.Selfbas1.ToString();
            Selfbas2  = bes.Selfbas2.ToString();
            Selfbas3  = bes.Selfbas3.ToString();
            Selfbas4  = bes.Selfbas4.ToString();
            Selfbas5  = bes.Selfbas5.ToString();
            Selfbas6  = bes.Selfbas6.ToString();
            Selfbas7  = bes.Selfbas7.ToString();
            Selfbas8  = bes.Selfbas8.ToString();
            Selfbas9  = bes.Selfbas9.ToString();
            Selfbas10 = bes.Selfbas10.ToString();
            Selfbas11 = bes.Selfbas11.ToString();
            Selfbas12 = bes.Selfbas12.ToString();
            Selfbas13 = bes.Selfbas13.ToString();
            Selfbas14 = bes.Selfbas14.ToString();
            Selfbas15 = bes.Selfbas15.ToString();
            Selfbas16 = bes.Selfbas16.ToString();
            Selfbas17 = bes.Selfbas17.ToString();
        }
示例#3
0
        protected void gvScore_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            int DsScoreId = Convert.ToInt32(gvScore.DataKeys[e.RowIndex].Value);

            BasEmScoreInfo.DelDsScore(DsScoreId);
            gvDataBind();
        }
示例#4
0
        protected void gvDataBind()
        {
            DataSet ds  = BasEmScoreInfo.getDriveds();
            DataSet ds1 = BasEmScoreInfo.getNurseds();

            ds.Merge(ds1);

            DataView view = ds.Tables[0].DefaultView;
            string   sort = (string)ViewState["SortExpression"] + " " + (string)ViewState["SortDir"];

            view.Sort = sort;

            DataTable dt = ds.Tables[0];

            if (dt.Rows.Count == 0)
            {
                dt.Rows.Add(dt.NewRow());
                UI.BindCtrl(dt.DefaultView, gvScore, AspNetPager1);
                gvScore.Rows[0].Visible = false;
            }
            else
            {
                UI.BindCtrl(dt.DefaultView, gvScore, AspNetPager1);
            }
        }
示例#5
0
 protected void gvScore_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         //鼠标移动到每项时颜色交替效果
         e.Row.Attributes.Add("onmouseover", "e=this.style.backgroundColor; this.style.backgroundColor='#c1ebff'");
         e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=e");
         //设置悬浮鼠标指针形状为"小手"
         e.Row.Attributes["style"] = "Cursor:hand";
         if (!Convert.IsDBNull(gvScore.DataKeys[e.Row.RowIndex].Value))
         {
             int            tesid = Convert.ToInt32(gvScore.DataKeys[e.Row.RowIndex].Value);
             BasEmScoreInfo tes   = new BasEmScoreInfo(tesid);
             if (tes.IsSubmit != 0)
             {
                 Button btnSubmit = e.Row.FindControl("btnSubmit") as Button;
                 Button btnEdit   = e.Row.FindControl("btnEdit") as Button;
                 Button btnDelete = e.Row.FindControl("btnDelete") as Button;
                 btnSubmit.Enabled = false;
                 btnEdit.Enabled   = false;
                 btnDelete.Enabled = false;
             }
         }
     }
 }
示例#6
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            int            BasEmScoreId = Convert.ToInt32(((Button)sender).CommandArgument.ToString());
            BasEmScoreInfo bas          = new BasEmScoreInfo(BasEmScoreId);

            bas.IsSubmit = 1;

            int          recvid = Convert.ToInt32(Common.getEmployeeIdOfMarketManager());
            EmployeeInfo em     = new EmployeeInfo(Convert.ToInt32(bas.EmployeeId));
            EmployeeInfo ems    = new EmployeeInfo(recvid);

            MessageInfo.Msgs1(recvid, bas.BasEmScoreId, "~/Score/BASEmApprove.aspx", em.EmployeeName + "绩效考核申请", em.EmployeeName, "daiban", em.EmployeeName + "绩效考核申请");
            MessageInfo.SendMail(ems.Qq, "绩效考核申请", em.EmployeeName + "绩效考核申请");

            bas.Save();
            gvDataBind();
        }
示例#7
0
        protected void gvScore_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                //鼠标移动到每项时颜色交替效果
                e.Row.Attributes.Add("onmouseover", "e=this.style.backgroundColor; this.style.backgroundColor='#c1ebff'");
                e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=e");
                //设置悬浮鼠标指针形状为"小手"
                e.Row.Attributes["style"] = "Cursor:hand";

                // if (!Convert.IsDBNull(gvScore.DataKeys[e.Row.RowIndex].Value))
                //{
                LinkButton lbtName   = e.Row.FindControl("lbtnEmployeeName") as LinkButton;
                Button     btnSubmit = e.Row.FindControl("btnSubmit") as Button;
                if (lbtName.Text == "王娇")
                {
                    int            basid = Convert.ToInt32(gvScore.DataKeys[e.Row.RowIndex]["BasEmScoreId"].ToString());
                    BasEmScoreInfo bas   = new BasEmScoreInfo(basid);
                    if (bas.IsSubmit == 2)
                    {
                        btnSubmit.Enabled = false;
                    }
                }
                else if (lbtName.Text == "马琪")
                {
                    int            fid   = Convert.ToInt32(gvScore.DataKeys[e.Row.RowIndex]["FrontScoreId"].ToString());
                    FrontScoreInfo front = new FrontScoreInfo(fid);
                    if (front.IsSubmit == 2)
                    {
                        btnSubmit.Enabled = false;
                    }
                }

                else if (lbtName.Text == "白杨")
                {
                    int aid = Convert.ToInt32(gvScore.DataKeys[e.Row.RowIndex]["AssistantScoreId"].ToString());
                    AssistantScoreInfo ass = new AssistantScoreInfo(aid);
                    if (ass.IsSubmit == 2)
                    {
                        btnSubmit.Enabled = false;
                    }
                }
                // }
            }
        }
示例#8
0
        protected void gvDataBind()
        {
            int       emid = Convert.ToInt32(Session["EmployeeId"]);
            DataTable dt   = BasEmScoreInfo.getDriverScore(emid);
            DataView  view = dt.DefaultView;
            string    sort = (string)ViewState["SortExpression"] + " " + (string)ViewState["SortDir"];

            view.Sort = sort;

            if (dt.Rows.Count == 0)
            {
                dt.Rows.Add(dt.NewRow());
                UI.BindCtrl(dt.DefaultView, gvScore, AspNetPager1);
                gvScore.Rows[0].Visible = false;
            }
            else
            {
                UI.BindCtrl(dt.DefaultView, gvScore, AspNetPager1);
            }
        }
示例#9
0
        protected void PageInit()
        {
            int            basid = Convert.ToInt32(Request["BasEmScoreId"].ToString());
            BasEmScoreInfo bas   = new BasEmScoreInfo(basid);
            EmployeeInfo   em    = new EmployeeInfo(Convert.ToInt32(bas.EmployeeId));

            lblName.Text = em.EmployeeName.ToString();
            PositionInfo position = new PositionInfo(Convert.ToInt32(em.PositionId));

            lblPosition.Text = position.PositionName.ToString();
            DepartInfo depart = new DepartInfo(Convert.ToInt32(em.DepartId));

            lblDepart.Text = depart.DepartName.ToString();

            //ddlYear.SelectedValue = bas.YearId.ToString();
            //ddlMonth.SelectedValue = bas.MonthId.ToString();

            YearInfo  year  = new YearInfo(Convert.ToInt32(bas.YearId));
            MonthInfo month = new MonthInfo(Convert.ToInt32(bas.MonthId));

            lblDate.Text = year.YearName + "年" + month.MonthNames + "月";

            lblSelfbas1.Text  = bas.Selfbas1.ToString();
            lblSelfbas2.Text  = bas.Selfbas2.ToString();
            lblSelfbas3.Text  = bas.Selfbas3.ToString();
            lblSelfbas4.Text  = bas.Selfbas4.ToString();
            lblSelfbas5.Text  = bas.Selfbas5.ToString();
            lblSelfbas6.Text  = bas.Selfbas6.ToString();
            lblSelfbas7.Text  = bas.Selfbas7.ToString();
            lblSelfbas8.Text  = bas.Selfbas8.ToString();
            lblSelfbas9.Text  = bas.Selfbas9.ToString();
            lblSelfbas10.Text = bas.Selfbas10.ToString();
            lblSelfbas11.Text = bas.Selfbas11.ToString();
            lblSelfbas12.Text = bas.Selfbas12.ToString();
            lblSelfbas13.Text = bas.Selfbas13.ToString();
            lblSelfbas14.Text = bas.Selfbas14.ToString();
            lblSelfbas15.Text = bas.Selfbas15.ToString();
            lblSelfbas16.Text = bas.Selfbas16.ToString();
            lblSelfbas17.Text = bas.Selfbas17.ToString();
        }
示例#10
0
        protected void gvDataBind()
        {
            DataSet ds  = BasEmScoreInfo.getBasM();      //市场助理
            DataSet ds1 = BasEmScoreInfo.getFrontM();    //前台
            DataSet ds2 = BasEmScoreInfo.getAssisM();    //行政助理
            DataSet ds3 = BasEmScoreInfo.getNurseds();   //后勤
            DataSet ds4 = BasEmScoreInfo.getDriveds();   //司机
            DataSet ds5 = TechMaScoreInfo.getMarketds(); //市场部经理
            DataSet ds6 = TechMaScoreInfo.getTechds();   //技术部经理
            DataSet ds7 = TechMaScoreInfo.getTechEmds(); //技术部员工


            ds.Merge(ds1);
            ds.Merge(ds2);
            ds.Merge(ds3);
            ds.Merge(ds4);
            ds.Merge(ds5);
            ds.Merge(ds6);
            ds.Merge(ds7);

            DataView view = ds.Tables[0].DefaultView;
            string   sort = (string)ViewState["SortExpression"] + " " + (string)ViewState["SortDir"];

            view.Sort = sort;

            DataTable dt = ds.Tables[0];

            if (dt.Rows.Count == 0)
            {
                dt.Rows.Add(dt.NewRow());
                UI.BindCtrl(dt.DefaultView, gvScore, AspNetPager1);
                gvScore.Rows[0].Visible = false;
            }
            else
            {
                UI.BindCtrl(dt.DefaultView, gvScore, AspNetPager1);
            }
        }
示例#11
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            int            basid = Convert.ToInt32(Request["BasEmScoreId"].ToString());
            BasEmScoreInfo bas   = new BasEmScoreInfo(basid);

            bas.Upbas1  = Request.Form["Upbas1"].ToString();
            bas.Upbas2  = Request.Form["Upbas2"].ToString();
            bas.Upbas3  = Request.Form["Upbas3"].ToString();
            bas.Upbas4  = Request.Form["Upbas4"].ToString();
            bas.Upbas5  = Request.Form["Upbas5"].ToString();
            bas.Upbas6  = Request.Form["Upbas6"].ToString();
            bas.Upbas7  = Request.Form["Upbas7"].ToString();
            bas.Upbas8  = Request.Form["Upbas8"].ToString();
            bas.Upbas9  = Request.Form["Upbas9"].ToString();
            bas.Upbas10 = Request.Form["Upbas10"].ToString();
            bas.Upbas11 = Request.Form["Upbas11"].ToString();
            bas.Upbas12 = Request.Form["Upbas12"].ToString();
            bas.Upbas13 = Request.Form["Upbas13"].ToString();
            bas.Upbas14 = Request.Form["Upbas14"].ToString();
            bas.Upbas15 = Request.Form["Upbas15"].ToString();
            bas.Upbas16 = Request.Form["Upbas16"].ToString();
            bas.Upbas17 = Request.Form["Upbas17"].ToString();

            bas.Secbas1  = Convert.ToString(Math.Round(float.Parse(lblSelfbas1.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upbas1"].ToString()), 2) * 0.6);
            bas.Secbas2  = Convert.ToString(Math.Round(float.Parse(lblSelfbas2.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upbas2"].ToString()), 2) * 0.6);
            bas.Secbas3  = Convert.ToString(Math.Round(float.Parse(lblSelfbas3.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upbas3"].ToString()), 2) * 0.6);
            bas.Secbas4  = Convert.ToString(Math.Round(float.Parse(lblSelfbas4.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upbas4"].ToString()), 2) * 0.6);
            bas.Secbas5  = Convert.ToString(Math.Round(float.Parse(lblSelfbas5.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upbas5"].ToString()), 2) * 0.6);
            bas.Secbas6  = Convert.ToString(Math.Round(float.Parse(lblSelfbas6.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upbas6"].ToString()), 2) * 0.6);
            bas.Secbas7  = Convert.ToString(Math.Round(float.Parse(lblSelfbas7.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upbas7"].ToString()), 2) * 0.6);
            bas.Secbas8  = Convert.ToString(Math.Round(float.Parse(lblSelfbas8.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upbas8"].ToString()), 2) * 0.6);
            bas.Secbas9  = Convert.ToString(Math.Round(float.Parse(lblSelfbas9.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upbas9"].ToString()), 2) * 0.6);
            bas.Secbas10 = Convert.ToString(Math.Round(float.Parse(lblSelfbas10.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upbas10"].ToString()), 2) * 0.6);
            bas.Secbas11 = Convert.ToString(Math.Round(float.Parse(lblSelfbas11.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upbas11"].ToString()), 2) * 0.6);
            bas.Secbas12 = Convert.ToString(Math.Round(float.Parse(lblSelfbas12.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upbas12"].ToString()), 2) * 0.6);
            bas.Secbas13 = Convert.ToString(Math.Round(float.Parse(lblSelfbas13.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upbas13"].ToString()), 2) * 0.6);
            bas.Secbas14 = Convert.ToString(Math.Round(float.Parse(lblSelfbas14.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upbas14"].ToString()), 2) * 0.6);
            bas.Secbas15 = Convert.ToString(Math.Round(float.Parse(lblSelfbas15.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upbas15"].ToString()), 2) * 0.6);
            bas.Secbas16 = Convert.ToString(Math.Round(float.Parse(lblSelfbas16.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upbas16"].ToString()), 2) * 0.6);
            bas.Secbas17 = Convert.ToString(Math.Round(float.Parse(lblSelfbas17.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upbas17"].ToString()), 2) * 0.6);

            bas.TotalScore = Request.Form["hid"].ToString();

            float Score = float.Parse(Request.Form["hid"].ToString());

            if (Score > 90)
            {
                bas.EvaluateLevelId = 2;
            }
            else if (Score > 75 && Score < 90)
            {
                bas.EvaluateLevelId = 3;
            }
            else if (Score > 60 && Score < 75)
            {
                bas.EvaluateLevelId = 4;
            }
            else if (Score < 60)
            {
                bas.EvaluateLevelId = 5;
            }
            bas.IsSubmit = 2;
            bas.UpViews  = Request.Form["UpViews"].ToString();
            bas.Save();
            Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('保存成功!');</script>");
        }
示例#12
0
        protected void PageInit()
        {
            EmployeeInfo em = (EmployeeInfo)Session["Employee"];

            lblName.Text = em.EmployeeName.ToString();
            PositionInfo position = new PositionInfo(Convert.ToInt32(em.PositionId));

            lblPosition.Text = position.PositionName.ToString();
            DepartInfo depart = new DepartInfo(Convert.ToInt32(em.DepartId));

            lblDepart.Text = depart.DepartName.ToString();

            int            basid = Convert.ToInt32(Request["BasEmScoreId"].ToString());
            BasEmScoreInfo bas   = new BasEmScoreInfo(basid);


            YearInfo  year  = new YearInfo(Convert.ToInt32(bas.YearId));
            MonthInfo month = new MonthInfo(Convert.ToInt32(bas.MonthId));

            lblDate.Text = year.YearName + "Äê" + month.MonthNames + "ÔÂ";

            lblSelfbas1.Text  = bas.Selfbas1.ToString();
            lblSelfbas2.Text  = bas.Selfbas2.ToString();
            lblSelfbas3.Text  = bas.Selfbas3.ToString();
            lblSelfbas4.Text  = bas.Selfbas4.ToString();
            lblSelfbas5.Text  = bas.Selfbas5.ToString();
            lblSelfbas6.Text  = bas.Selfbas6.ToString();
            lblSelfbas7.Text  = bas.Selfbas7.ToString();
            lblSelfbas8.Text  = bas.Selfbas8.ToString();
            lblSelfbas9.Text  = bas.Selfbas9.ToString();
            lblSelfbas10.Text = bas.Selfbas10.ToString();
            lblSelfbas11.Text = bas.Selfbas11.ToString();
            lblSelfbas12.Text = bas.Selfbas12.ToString();
            lblSelfbas13.Text = bas.Selfbas13.ToString();
            lblSelfbas14.Text = bas.Selfbas14.ToString();
            lblSelfbas15.Text = bas.Selfbas15.ToString();
            lblSelfbas16.Text = bas.Selfbas16.ToString();
            lblSelfbas17.Text = bas.Selfbas17.ToString();

            lblUpbas1.Text  = bas.Upbas1.ToString();
            lblUpbas2.Text  = bas.Upbas2.ToString();
            lblUpbas3.Text  = bas.Upbas3.ToString();
            lblUpbas4.Text  = bas.Upbas4.ToString();
            lblUpbas5.Text  = bas.Upbas5.ToString();
            lblUpbas6.Text  = bas.Upbas6.ToString();
            lblUpbas7.Text  = bas.Upbas7.ToString();
            lblUpbas8.Text  = bas.Upbas8.ToString();
            lblUpbas9.Text  = bas.Upbas9.ToString();
            lblUpbas10.Text = bas.Upbas10.ToString();
            lblUpbas11.Text = bas.Upbas11.ToString();
            lblUpbas12.Text = bas.Upbas12.ToString();
            lblUpbas13.Text = bas.Upbas13.ToString();
            lblUpbas14.Text = bas.Upbas14.ToString();
            lblUpbas15.Text = bas.Upbas15.ToString();
            lblUpbas16.Text = bas.Upbas16.ToString();
            lblUpbas17.Text = bas.Upbas17.ToString();

            lblSecbas1.Text  = bas.Secbas1.ToString();
            lblSecbas2.Text  = bas.Secbas2.ToString();
            lblSecbas3.Text  = bas.Secbas3.ToString();
            lblSecbas4.Text  = bas.Secbas4.ToString();
            lblSecbas5.Text  = bas.Secbas5.ToString();
            lblSecbas6.Text  = bas.Secbas6.ToString();
            lblSecbas7.Text  = bas.Secbas7.ToString();
            lblSecbas8.Text  = bas.Secbas8.ToString();
            lblSecbas9.Text  = bas.Secbas9.ToString();
            lblSecbas10.Text = bas.Secbas10.ToString();
            lblSecbas11.Text = bas.Secbas11.ToString();
            lblSecbas12.Text = bas.Secbas12.ToString();
            lblSecbas13.Text = bas.Secbas13.ToString();
            lblSecbas14.Text = bas.Secbas14.ToString();
            lblSecbas15.Text = bas.Secbas15.ToString();
            lblSecbas16.Text = bas.Secbas16.ToString();
            lblSecbas17.Text = bas.Secbas17.ToString();

            lblTotalScore.Text = bas.TotalScore.ToString();
            if (bas.EvaluateLevelId.ToString() != "")
            {
                EvaluateLevelInfo le = new EvaluateLevelInfo(Convert.ToInt32(bas.EvaluateLevelId));
                lblLevel.Text = le.EvaluateName.ToString();
            }
            else
            {
                lblLevel.Text = "";
            }
            lblViews.Text = bas.UpViews.ToString();
        }