Exemple #1
0
        protected void gvDataBind()
        {
            DataSet ds  = TechMaScoreInfo.getTechds();
            DataSet ds1 = TechMaScoreInfo.getMarketds();

            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);
            }
        }
        protected void PageInit()
        {
            int             TesId = Convert.ToInt32(Request["TechMaScoreId"].ToString());
            TechMaScoreInfo tms   = new TechMaScoreInfo(TesId);

            strbind1  = tms.SelfScore1.ToString();
            strbind2  = tms.SelfScore2.ToString();
            strbind3  = tms.SelfScore3.ToString();
            strbind4  = tms.SelfScore4.ToString();
            strbind5  = tms.SelfScore5.ToString();
            strbind6  = tms.SelfScore6.ToString();
            strbind7  = tms.SelfScore7.ToString();
            strbind8  = tms.SelfScore8.ToString();
            strbind9  = tms.SelfScore9.ToString();
            strbind10 = tms.SelfScore10.ToString();
            strbind11 = tms.SelfScore11.ToString();
            strbind12 = tms.SelfScore12.ToString();
            strbind13 = tms.SelfScore13.ToString();

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

            EmployeeInfo em = new EmployeeInfo(Convert.ToInt32(tms.EmployeeId));

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

            lblPosition.Text = position.PositionName;
        }
        protected void PageInit()
        {
            int             tmsid = Convert.ToInt32(Request["TechMaScoreId"].ToString());
            TechMaScoreInfo tms   = new TechMaScoreInfo(tmsid);

            lblSelfProject1.Text  = tms.SelfScore1.ToString();
            lblSelfProject2.Text  = tms.SelfScore2.ToString();
            lblSelfProject3.Text  = tms.SelfScore3.ToString();
            lblSelfProject4.Text  = tms.SelfScore4.ToString();
            lblSelfProject5.Text  = tms.SelfScore5.ToString();
            lblSelfProject6.Text  = tms.SelfScore6.ToString();
            lblSelfProject7.Text  = tms.SelfScore7.ToString();
            lblSelfProject8.Text  = tms.SelfScore8.ToString();
            lblSelfProject9.Text  = tms.SelfScore9.ToString();
            lblSelfProject10.Text = tms.SelfScore10.ToString();
            lblSelfProject11.Text = tms.SelfScore11.ToString();
            lblSelfProject12.Text = tms.SelfScore12.ToString();
            lblSelfProject13.Text = tms.SelfScore13.ToString();

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

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

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

            EmployeeInfo em = new EmployeeInfo(Convert.ToInt32(tms.EmployeeId));

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

            lblPosition.Text = position.PositionName;
        }
        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (IsPageValid())
            {
                int             TesId = Convert.ToInt32(Request["TechMaScoreId"].ToString());
                TechMaScoreInfo tms   = new TechMaScoreInfo(TesId);

                tms.DateSpan    = ddlYear.SelectedItem.Text + "年" + ddlMonth.SelectedItem.Text + "月";
                tms.YearId      = Convert.ToInt32(ddlYear.SelectedValue.ToString());
                tms.MonthId     = Convert.ToInt32(ddlMonth.SelectedValue.ToString());
                tms.SelfScore1  = Request.Form["Project1"].ToString();
                tms.SelfScore2  = Request.Form["Project2"].ToString();
                tms.SelfScore3  = Request.Form["Project3"].ToString();
                tms.SelfScore4  = Request.Form["Project4"].ToString();
                tms.SelfScore5  = Request.Form["Project5"].ToString();
                tms.SelfScore6  = Request.Form["Project6"].ToString();
                tms.SelfScore7  = Request.Form["Project7"].ToString();
                tms.SelfScore8  = Request.Form["Project8"].ToString();
                tms.SelfScore9  = Request.Form["Project9"].ToString();
                tms.SelfScore10 = Request.Form["Project10"].ToString();
                tms.SelfScore11 = Request.Form["Project11"].ToString();
                tms.SelfScore12 = Request.Form["Project12"].ToString();
                tms.SelfScore13 = Request.Form["Project13"].ToString();
                tms.Save();
                Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('保存成功!');</script>");
            }
        }
 protected void btnSave_Click(object sender, EventArgs e)
 {
     if (ddlYear.SelectedValue == "" || ddlMonth.SelectedValue == "")
     {
         Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('请选择评价时间!');</script>");
     }
     else
     {
         int             emid = Convert.ToInt32(Session["EmployeeId"]);
         TechMaScoreInfo tms  = new TechMaScoreInfo();
         tms.EmployeeId      = emid;
         tms.DateSpan        = ddlYear.SelectedItem.Text + "年" + ddlMonth.SelectedItem.Text + "月";
         tms.YearId          = Convert.ToInt32(ddlYear.SelectedValue.ToString());
         tms.MonthId         = Convert.ToInt32(ddlMonth.SelectedValue.ToString());
         tms.SelfScore1      = Request.Form["Project1"].ToString();
         tms.SelfScore2      = Request.Form["Project2"].ToString();
         tms.SelfScore3      = Request.Form["Project3"].ToString();
         tms.SelfScore4      = Request.Form["Project4"].ToString();
         tms.SelfScore5      = Request.Form["Project5"].ToString();
         tms.SelfScore6      = Request.Form["Project6"].ToString();
         tms.SelfScore7      = Request.Form["Project7"].ToString();
         tms.SelfScore8      = Request.Form["Project8"].ToString();
         tms.SelfScore9      = Request.Form["Project9"].ToString();
         tms.SelfScore10     = Request.Form["Project10"].ToString();
         tms.SelfScore11     = Request.Form["Project11"].ToString();
         tms.SelfScore12     = Request.Form["Project12"].ToString();
         tms.SelfScore13     = Request.Form["Project13"].ToString();
         tms.EvaluateLevelId = 6;
         tms.IsSubmit        = 0;
         tms.Save();
         Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('保存成功!');</script>");
     }
 }
        protected void gvScore_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            int TechMaScoreId = Convert.ToInt32(gvScore.DataKeys[e.RowIndex].Value);

            TechMaScoreInfo.DelTechMaScore(TechMaScoreId);
            gvDataBind();
        }
        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);
                    TechMaScoreInfo tes   = new TechMaScoreInfo(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;
                    }
                }
            }
        }
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            int             TechMaScoreId = Convert.ToInt32(((Button)sender).CommandArgument.ToString());
            TechMaScoreInfo tms           = new TechMaScoreInfo(TechMaScoreId);

            tms.IsSubmit = 1;
            int          recvid = Convert.ToInt32(Common.getEmployeeIdOfManager());
            EmployeeInfo em     = new EmployeeInfo(Convert.ToInt32(tms.EmployeeId));
            EmployeeInfo ems    = new EmployeeInfo(recvid);

            MessageInfo.Msgs1(recvid, tms.TechMaScoreId, "~/Score/TechMaScoreApprove.aspx", em.EmployeeName + "绩效考核申请", em.EmployeeName, "daiban", em.EmployeeName + "绩效考核申请");
            //MessageInfo.SendMail(ems.Qq, "绩效考核申请", em.EmployeeName + "绩效考核申请");
            tms.Save();
            gvDataBind();
        }
        protected void gvDataBind()
        {
            int       emid = Convert.ToInt32(Session["EmployeeId"]);
            DataTable dt   = TechMaScoreInfo.getTechMaGv(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);
            }
        }
Exemple #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);
            }
        }
Exemple #11
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("lbtnName") as LinkButton;
                Button     btnSubmit = e.Row.FindControl("btnSubmit") as Button;
                if (lbtName.Text == "马斌")
                {
                    int             basid = Convert.ToInt32(gvScore.DataKeys[e.Row.RowIndex]["TechMaScoreId"].ToString());
                    TechMaScoreInfo bas   = new TechMaScoreInfo(basid);
                    if (bas.IsSubmit == 2)
                    {
                        btnSubmit.Enabled = false;
                    }
                }
                else if (lbtName.Text == "何春")
                {
                    int             fid = Convert.ToInt32(gvScore.DataKeys[e.Row.RowIndex]["MarketScoreId"].ToString());
                    MarketScoreInfo ma  = new MarketScoreInfo(fid);
                    if (ma.IsSubmit == 2)
                    {
                        btnSubmit.Enabled = false;
                    }
                }

                //}
            }
        }
Exemple #12
0
        protected void PageInit()
        {
            int             TesId = Convert.ToInt32(Request["TechMaScoreId"].ToString());
            TechMaScoreInfo tms   = new TechMaScoreInfo(TesId);

            lblSelfScore1.Text  = tms.SelfScore1.ToString();
            lblSelfScore2.Text  = tms.SelfScore2.ToString();
            lblSelfScore3.Text  = tms.SelfScore3.ToString();
            lblSelfScore4.Text  = tms.SelfScore4.ToString();
            lblSelfScore5.Text  = tms.SelfScore5.ToString();
            lblSelfScore6.Text  = tms.SelfScore6.ToString();
            lblSelfScore7.Text  = tms.SelfScore7.ToString();
            lblSelfScore8.Text  = tms.SelfScore8.ToString();
            lblSelfScore9.Text  = tms.SelfScore9.ToString();
            lblSelfScore10.Text = tms.SelfScore10.ToString();
            lblSelfScore11.Text = tms.SelfScore11.ToString();
            lblSelfScore12.Text = tms.SelfScore12.ToString();
            lblSelfScore13.Text = tms.SelfScore13.ToString();

            lblUpScore1.Text  = tms.UpScore1.ToString();
            lblUpScore2.Text  = tms.UpScore2.ToString();
            lblUpScore3.Text  = tms.UpScore3.ToString();
            lblUpScore4.Text  = tms.UpScore4.ToString();
            lblUpScore5.Text  = tms.UpScore5.ToString();
            lblUpScore6.Text  = tms.UpScore6.ToString();
            lblUpScore7.Text  = tms.UpScore7.ToString();
            lblUpScore8.Text  = tms.UpScore8.ToString();
            lblUpScore9.Text  = tms.UpScore9.ToString();
            lblUpScore10.Text = tms.UpScore10.ToString();
            lblUpScore11.Text = tms.UpScore11.ToString();
            lblUpScore12.Text = tms.UpScore12.ToString();
            lblUpScore13.Text = tms.UpScore13.ToString();


            lblSectScore1.Text  = tms.SectScore1.ToString();
            lblSectScore2.Text  = tms.SectScore2.ToString();
            lblSectScore3.Text  = tms.SectScore3.ToString();
            lblSectScore4.Text  = tms.SectScore4.ToString();
            lblSectScore5.Text  = tms.SectScore5.ToString();
            lblSectScore6.Text  = tms.SectScore6.ToString();
            lblSectScore7.Text  = tms.SectScore7.ToString();
            lblSectScore8.Text  = tms.SectScore8.ToString();
            lblSectScore9.Text  = tms.SectScore9.ToString();
            lblSectScore10.Text = tms.SectScore10.ToString();
            lblSectScore11.Text = tms.SectScore11.ToString();
            lblSectScore12.Text = tms.SectScore12.ToString();
            lblSectScore13.Text = tms.SectScore13.ToString();

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

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

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

            EmployeeInfo em = new EmployeeInfo(Convert.ToInt32(tms.EmployeeId));

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

            lblPosition.Text = position.PositionName;


            lblSumScore.Text = tms.TotalScore.ToString();
            lblViews.Text    = tms.UpView.ToString();
            if (tms.EvaluateLevelId.ToString() != "")
            {
                EvaluateLevelInfo ev = new EvaluateLevelInfo(Convert.ToInt32(tms.EvaluateLevelId));
                lblLevel.Text = ev.EvaluateName.ToString();
            }
            else
            {
                lblLevel.Text = "";
            }
        }
        protected void btnSave_Click(object sender, EventArgs e)
        {
            int             tmsid = Convert.ToInt32(Request["TechMaScoreId"].ToString());
            TechMaScoreInfo tms   = new TechMaScoreInfo(tmsid);

            tms.UpScore1  = Request.Form["project1"].ToString();
            tms.UpScore2  = Request.Form["project2"].ToString();
            tms.UpScore3  = Request.Form["project3"].ToString();
            tms.UpScore4  = Request.Form["project4"].ToString();
            tms.UpScore5  = Request.Form["project5"].ToString();
            tms.UpScore6  = Request.Form["project6"].ToString();
            tms.UpScore7  = Request.Form["project7"].ToString();
            tms.UpScore8  = Request.Form["project8"].ToString();
            tms.UpScore9  = Request.Form["project9"].ToString();
            tms.UpScore10 = Request.Form["project10"].ToString();
            tms.UpScore11 = Request.Form["project11"].ToString();
            tms.UpScore12 = Request.Form["project12"].ToString();
            tms.UpScore13 = Request.Form["project13"].ToString();


            tms.SectScore1  = Convert.ToString(Math.Round(float.Parse(lblSelfProject1.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["project1"].ToString()), 2) * 0.6);
            tms.SectScore2  = Convert.ToString(Math.Round(float.Parse(lblSelfProject2.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["project2"].ToString()), 2) * 0.6);
            tms.SectScore3  = Convert.ToString(Math.Round(float.Parse(lblSelfProject3.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["project3"].ToString()), 2) * 0.6);
            tms.SectScore4  = Convert.ToString(Math.Round(float.Parse(lblSelfProject4.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["project4"].ToString()), 2) * 0.6);
            tms.SectScore5  = Convert.ToString(Math.Round(float.Parse(lblSelfProject5.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["project5"].ToString()), 2) * 0.6);
            tms.SectScore6  = Convert.ToString(Math.Round(float.Parse(lblSelfProject6.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["project6"].ToString()), 2) * 0.6);
            tms.SectScore7  = Convert.ToString(Math.Round(float.Parse(lblSelfProject7.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["project7"].ToString()), 2) * 0.6);
            tms.SectScore8  = Convert.ToString(Math.Round(float.Parse(lblSelfProject8.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["project8"].ToString()), 2) * 0.6);
            tms.SectScore9  = Convert.ToString(Math.Round(float.Parse(lblSelfProject9.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["project9"].ToString()), 2) * 0.6);
            tms.SectScore10 = Convert.ToString(Math.Round(float.Parse(lblSelfProject10.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["project10"].ToString()), 2) * 0.6);
            tms.SectScore11 = Convert.ToString(Math.Round(float.Parse(lblSelfProject11.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["project11"].ToString()), 2) * 0.6);
            tms.SectScore12 = Convert.ToString(Math.Round(float.Parse(lblSelfProject12.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["project12"].ToString()), 2) * 0.6);
            tms.SectScore13 = Convert.ToString(Math.Round(float.Parse(lblSelfProject13.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["project13"].ToString()), 2) * 0.6);


            tms.TotalScore = Request.Form["hid"].ToString();
            tms.UpView     = Request.Form["tViews"].ToString();


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

            if (Score > 90)
            {
                tms.EvaluateLevelId = 2;
            }
            else if (Score > 75 && Score < 90)
            {
                tms.EvaluateLevelId = 3;
            }
            else if (Score > 60 && Score < 75)
            {
                tms.EvaluateLevelId = 4;
            }
            else if (Score < 60)
            {
                tms.EvaluateLevelId = 5;
            }
            tms.IsSubmit = 2;
            tms.Save();
            Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('保存成功!');</script>");
        }