Exemplo n.º 1
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (IsPageValid())
            {
                int             TesId = Convert.ToInt32(Request["TechEmScoreId"].ToString());
                TechEmScoreInfo tes   = new TechEmScoreInfo(TesId);

                tes.DateSpan        = ddlYear.SelectedItem.Text + "年" + ddlMonth.SelectedItem.Text + "月";
                tes.YearId          = Convert.ToInt32(ddlYear.SelectedValue.ToString());
                tes.MonthId         = Convert.ToInt32(ddlMonth.SelectedValue.ToString());
                tes.SelfPlan        = Request.Form["SelfPlan"].ToString();
                tes.SelfWorkTotal   = Request.Form["SelfWorkTotal"].ToString();
                tes.SelfWorkSpeed   = Request.Form["SelfWorkSpeed"].ToString();
                tes.SelfCommunicate = Request.Form["SelfCommunicate"].ToString();
                tes.SelfDescipline  = Request.Form["SelfDescipline"].ToString();
                tes.SelfExecute     = Request.Form["SelfExecute"].ToString();
                tes.SelfRoute       = Request.Form["SelfRoute"].ToString();
                tes.SelfProfession  = Request.Form["SelfProfession"].ToString();
                tes.SelfAttitude    = Request.Form["SelfAttitude"].ToString();
                tes.SelfComplex     = Request.Form["SelfComplex"].ToString();
                tes.SelfSpeciality  = Request.Form["SelfSpeciality"].ToString();
                tes.Save();
                Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('保存成功!');</script>");
            }
        }
Exemplo n.º 2
0
 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"]);
         TechEmScoreInfo tes  = new TechEmScoreInfo();
         tes.EmployeeId      = emid;
         tes.DateSpan        = ddlYear.SelectedItem.Text + "年" + ddlMonth.SelectedItem.Text + "月";
         tes.SelfPlan        = Request.Form["SelfPlan"].ToString();
         tes.SelfWorkTotal   = Request.Form["SelfWorkTotal"].ToString();
         tes.SelfWorkSpeed   = Request.Form["SelfWorkSpeed"].ToString();
         tes.SelfCommunicate = Request.Form["SelfCommunicate"].ToString();
         tes.SelfDescipline  = Request.Form["SelfDescipline"].ToString();
         tes.SelfExecute     = Request.Form["SelfExecute"].ToString();
         tes.SelfRoute       = Request.Form["SelfRoute"].ToString();
         tes.SelfProfession  = Request.Form["SelfProfession"].ToString();
         tes.SelfAttitude    = Request.Form["SelfAttitude"].ToString();
         tes.SelfComplex     = Request.Form["SelfComplex"].ToString();
         tes.SelfSpeciality  = Request.Form["SelfSpeciality"].ToString();
         tes.YearId          = Convert.ToInt32(ddlYear.SelectedValue.ToString());
         tes.MonthId         = Convert.ToInt32(ddlMonth.SelectedValue.ToString());
         tes.EvaluateLevelId = 6;
         tes.TotalScore      = "待评";
         tes.IsSubmit        = 0;
         tes.Save();
         Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('保存成功!');</script>");
     }
 }
Exemplo n.º 3
0
        public void PageInit()
        {
            int             TesId = Convert.ToInt32(Request["TechEmScoreId"].ToString());
            TechEmScoreInfo tes   = new TechEmScoreInfo(TesId);

            selfplan               = tes.SelfPlan.ToString();
            selfworktotal          = tes.SelfWorkTotal.ToString();
            selfworkspeed          = tes.SelfWorkSpeed.ToString();
            selfcommunicate        = tes.SelfCommunicate.ToString();
            selfdescipline         = tes.SelfDescipline.ToString();
            selfexecute            = tes.SelfExecute.ToString();
            selfroute              = tes.SelfRoute.ToString();
            selfprofession         = tes.SelfProfession.ToString();
            selfattitude           = tes.SelfAttitude.ToString();
            selfcomplex            = tes.SelfComplex.ToString();
            selfspeciality         = tes.SelfSpeciality.ToString();
            ddlYear.SelectedValue  = tes.YearId.ToString();
            ddlMonth.SelectedValue = tes.MonthId.ToString();

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

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

            lblPosition.Text = position.PositionName;
        }
Exemplo n.º 4
0
        protected void gvScore_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            int TechEmScoreId = Convert.ToInt32(gvScore.DataKeys[e.RowIndex].Value);

            TechEmScoreInfo.DelTechEmScore(TechEmScoreId);
            gvDataBind();
        }
Exemplo n.º 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);
             TechEmScoreInfo tes   = new TechEmScoreInfo(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;
             }
         }
     }
 }
Exemplo n.º 6
0
        protected void PageInit()
        {
            int             tmsid = Convert.ToInt32(Request["TechEmScoreId"].ToString());
            TechEmScoreInfo tms   = new TechEmScoreInfo(tmsid);

            lblSelfPlan.Text        = tms.SelfPlan.ToString();
            lblSelfWorkTotal.Text   = tms.SelfWorkTotal.ToString();
            lblSelfWorkSpeed.Text   = tms.SelfWorkSpeed.ToString();
            lblSelfCommunicate.Text = tms.SelfCommunicate.ToString();
            lblSelfDescipline.Text  = tms.SelfDescipline.ToString();
            lblSelfExecute.Text     = tms.SelfExecute.ToString();
            lblSelfRoute.Text       = tms.SelfRoute.ToString();
            lblSelfProfession.Text  = tms.SelfProfession.ToString();
            lblSelfAttitude.Text    = tms.SelfAttitude.ToString();
            lblSelfComplex.Text     = tms.SelfComplex.ToString();
            lblSelfSpeciality.Text  = tms.SelfSpeciality.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;
            rblAddScore.SelectedValue = "0";
        }
Exemplo n.º 7
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            int             TechEmScoreId = Convert.ToInt32(((Button)sender).CommandArgument.ToString());
            TechEmScoreInfo tes           = new TechEmScoreInfo(TechEmScoreId);

            tes.IsSubmit = 1;

            int          recvid = Convert.ToInt32(Common.getEmployeeIdOfTechManager());
            EmployeeInfo em     = new EmployeeInfo(Convert.ToInt32(tes.EmployeeId));
            EmployeeInfo ems    = new EmployeeInfo(recvid);

            MessageInfo.Msgs1(recvid, tes.TechEmScoreId, "~/Score/TechEmApprove.aspx", em.EmployeeName + "绩效考核申请", em.EmployeeName, "daiban", em.EmployeeName + "绩效考核申请");
            MessageInfo.SendMail(ems.Qq, "绩效考核申请", em.EmployeeName + "绩效考核申请");
            tes.Save();
            gvDataBind();
        }
Exemplo n.º 8
0
        protected void gvDataBind()
        {
            DataTable dt   = TechEmScoreInfo.getTechgv("技术部");
            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);
            }
        }
Exemplo n.º 9
0
        protected void gvDataBind()
        {
            int       emid = Convert.ToInt32(Session["EmployeeId"]);
            DataTable dt   = TechEmScoreInfo.getTechEmScoreGv(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);
            }
        }
Exemplo n.º 10
0
        protected void ddlDataBind()
        {
            DataTable dt = TechEmScoreInfo.getYearddl();

            ddlYear.DataSource     = dt;
            ddlYear.DataTextField  = "YearName";
            ddlYear.DataValueField = "YearId";
            DataRow row = dt.NewRow();

            row["YearName"] = "请选择年份";
            dt.Rows.InsertAt(row, 0);
            ddlYear.DataBind();

            DataTable dt1 = TechEmScoreInfo.getMonthddl();

            ddlMonth.DataSource     = dt1;
            ddlMonth.DataTextField  = "MonthNames";
            ddlMonth.DataValueField = "MonthId";
            DataRow row1 = dt1.NewRow();

            row1["MonthNames"] = "请选择月份";
            dt1.Rows.InsertAt(row1, 0);
            ddlMonth.DataBind();
        }
Exemplo n.º 11
0
        protected void PageInit()
        {
            int             TesId = Convert.ToInt32(Request["TechEmScoreId"].ToString());
            TechEmScoreInfo tes   = new TechEmScoreInfo(TesId);

            lblSelfPlan.Text        = tes.SelfPlan.ToString();
            lblSelfWorkTotal.Text   = tes.SelfWorkTotal.ToString();
            lblSelfWorkSpeed.Text   = tes.SelfWorkSpeed.ToString();
            lblSelfCommunicate.Text = tes.SelfCommunicate.ToString();
            lblSelfDescipline.Text  = tes.SelfDescipline.ToString();
            lblSelfExecute.Text     = tes.SelfExecute.ToString();
            lblSelfRoute.Text       = tes.SelfRoute.ToString();
            lblSelfProfession.Text  = tes.SelfProfession.ToString();
            lblSelfAttitude.Text    = tes.SelfAttitude.ToString();
            lblSelfComplex.Text     = tes.SelfComplex.ToString();
            lblSelfSpeciality.Text  = tes.SelfSpeciality.ToString();

            lblUpPlan.Text        = tes.UpPlan.ToString();
            lblUpWorkTotal.Text   = tes.UpWorkTotal.ToString();
            lblUpWorkSpeed.Text   = tes.UpWorkSpeed.ToString();
            lblUpCommunicate.Text = tes.UpCommunicate.ToString();
            lblUpDescipline.Text  = tes.UpDescipline.ToString();
            lblUpExecute.Text     = tes.UpExecute.ToString();
            lblUpRoute.Text       = tes.UpRoute.ToString();
            lblUpProfession.Text  = tes.UpProfession.ToString();
            lblUpAttitude.Text    = tes.UpAttitude.ToString();
            lblUpComplex.Text     = tes.UpComplex.ToString();
            lblUpSpeciality.Text  = tes.UpSpeciality.ToString();

            lblSecPlan.Text        = tes.SectPlan.ToString();
            lblSecWorkTotal.Text   = tes.SectWorkTotal.ToString();
            lblSecWorkSpeed.Text   = tes.SectWorkSpeed.ToString();
            lblSecCommunicate.Text = tes.SectCommunicate.ToString();
            lblSecDescipline.Text  = tes.SectDescipline.ToString();
            lblSecExecute.Text     = tes.SectExecute.ToString();
            lblSecRoute.Text       = tes.SectRoute.ToString();
            lblSecProfession.Text  = tes.SectProfession.ToString();
            lblSecAttitude.Text    = tes.SectAttitude.ToString();
            lblSecComplex.Text     = tes.SectComplex.ToString();
            lblSecSpeciality.Text  = tes.SectSpeciality.ToString();

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

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

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

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

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

            lblPosition.Text = position.PositionName;

            lblReason.Text        = tes.Reason.ToString();
            lblAddMinusScore.Text = tes.AddMinusSocre.ToString();
            lblSumScore.Text      = tes.TotalScore.ToString();
            lblViews.Text         = tes.UpViews.ToString();
            EvaluateLevelInfo el = new EvaluateLevelInfo(Convert.ToInt32(tes.EvaluateLevelId));

            lblLevels.Text = el.EvaluateName.ToString();

            lblPlan.Text    = tes.PlanFinish.ToString();
            lblActual.Text  = tes.ActualFinish.ToString();
            lblPercent.Text = tes.FinishRate.ToString();
            lblUp.Text      = tes.FinishScore.ToString();
            lblUp1.Text     = tes.FinishScore.ToString();
        }
Exemplo n.º 12
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            int             tmsid = Convert.ToInt32(Request["TechEmScoreId"].ToString());
            TechEmScoreInfo tms   = new TechEmScoreInfo(tmsid);

            tms.PlanFinish   = Request.Form["iPlanFinish"].ToString();
            tms.ActualFinish = Request.Form["iActualFinish"].ToString();
            tms.FinishRate   = Convert.ToString(float.Parse(Request.Form["iActualFinish"].ToString()) / float.Parse(Request.Form["iPlanFinish"].ToString()));

            tms.FinishScore   = Request.Form["iUp"].ToString();
            tms.UpPlan        = Request.Form["Upplan"].ToString();
            tms.UpWorkTotal   = Request.Form["UpWorkTotal"].ToString();
            tms.UpWorkSpeed   = Request.Form["UpWorkSpeed"].ToString();
            tms.UpCommunicate = Request.Form["UpCommunicate"].ToString();
            tms.UpDescipline  = Request.Form["UpDescipline"].ToString();
            tms.UpExecute     = Request.Form["UpExecute"].ToString();
            tms.UpRoute       = Request.Form["UpRoute"].ToString();
            tms.UpProfession  = Request.Form["UpProfession"].ToString();
            tms.UpAttitude    = Request.Form["UpAttitude"].ToString();
            tms.UpComplex     = Request.Form["UpComplex"].ToString();
            tms.UpSpeciality  = Request.Form["UpSpeciality"].ToString();

            tms.SectPlan        = Convert.ToString(Math.Round(float.Parse(lblSelfPlan.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upplan"].ToString()), 2) * 0.6);
            tms.SectWorkTotal   = Convert.ToString(Math.Round(float.Parse(lblSelfWorkTotal.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["UpWorkTotal"].ToString()), 2) * 0.6);
            tms.SectWorkSpeed   = Convert.ToString(Math.Round(float.Parse(lblSelfWorkSpeed.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["UpWorkSpeed"].ToString()), 2) * 0.6);
            tms.SectCommunicate = Convert.ToString(Math.Round(float.Parse(lblSelfCommunicate.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["UpCommunicate"].ToString()), 2) * 0.6);
            tms.SectDescipline  = Convert.ToString(Math.Round(float.Parse(lblSelfDescipline.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["UpDescipline"].ToString()), 2) * 0.6);
            tms.SectExecute     = Convert.ToString(Math.Round(float.Parse(lblSelfExecute.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["UpExecute"].ToString()), 2) * 0.6);
            tms.SectRoute       = Convert.ToString(Math.Round(float.Parse(lblSelfRoute.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["UpRoute"].ToString()), 2) * 0.6);
            tms.SectProfession  = Convert.ToString(Math.Round(float.Parse(lblSelfProfession.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["UpProfession"].ToString()), 2) * 0.6);
            tms.SectAttitude    = Convert.ToString(Math.Round(float.Parse(lblSelfAttitude.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["UpAttitude"].ToString()), 2) * 0.6);
            tms.SectComplex     = Convert.ToString(Math.Round(float.Parse(lblSelfComplex.Text.ToString()), 2) * 0.4 * 0.4 + Math.Round(float.Parse(Request.Form["UpComplex"].ToString()), 2) * 0.6);
            tms.SectSpeciality  = Convert.ToString(Math.Round(float.Parse(lblSelfSpeciality.Text.ToString()), 2) * 0.4 * 0.4 + Math.Round(float.Parse(Request.Form["UpSpeciality"].ToString()), 2) * 0.6);

            tms.Reason        = Request.Form["iReason"].ToString();
            tms.AddMinusSocre = Request.Form["iAddMinusScore"].ToString();
            tms.TotalScore    = lblSumScore.Text.ToString();
            tms.UpViews       = Request.Form["tViews"].ToString();
            tms.TotalScore    = Request.Form["hid"].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>");
        }