Exemplo n.º 1
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);
             DriverScoreInfo ds    = new DriverScoreInfo(tesid);
             if (ds.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.º 2
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";


                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]["DriverScoreId"].ToString());
                    DriverScoreInfo ds    = new DriverScoreInfo(basid);
                    if (ds.IsSubmit == 2)
                    {
                        btnSubmit.Enabled = false;
                    }
                }
                else if (lbtName.Text == "张彩")
                {
                    int            fid = Convert.ToInt32(gvScore.DataKeys[e.Row.RowIndex]["NurseScoreId"].ToString());
                    NurseScoreInfo ma  = new NurseScoreInfo(fid);
                    if (ma.IsSubmit == 2)
                    {
                        btnSubmit.Enabled = false;
                    }
                }
            }
        }
Exemplo n.º 3
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            int             DsScoreId = Convert.ToInt32(((Button)sender).CommandArgument.ToString());
            DriverScoreInfo ds        = new DriverScoreInfo(DsScoreId);

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

            MessageInfo.Msgs1(recvid, ds.DriverScoreId, "~/Score/DriveScoreApprove.aspx", em.EmployeeName + "绩效考核申请", em.EmployeeName, "daiban", em.EmployeeName + "绩效考核申请");
            MessageInfo.SendMail(ems.Qq, "绩效考核申请", em.EmployeeName + "绩效考核申请");
            ds.Save();
            gvDataBind();
        }
Exemplo n.º 4
0
        public DriverScoreInfo GetDriverScoreInfoById(int DriverScoreId)
        {
            DriverScoreInfo driverScoreInfo = null;             //

            try
            {
                driverScoreInfo = new DriverScoreInfo(DriverScoreId);
            }
            catch (AppException)
            {
                return(null);
            }

            return(driverScoreInfo);
        }
Exemplo n.º 5
0
        protected void PageInit()
        {
            int             dsid = Convert.ToInt32(Request["DriverScoreId"].ToString());
            DriverScoreInfo ds   = new DriverScoreInfo(dsid);
            EmployeeInfo    em   = new EmployeeInfo(Convert.ToInt32(ds.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 = ds.YearId.ToString();
            //ddlMonth.SelectedValue = ds.MonthId.ToString();

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

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

            lblSelfds1.Text  = ds.Selfds1.ToString();
            lblSelfds2.Text  = ds.Selfds2.ToString();
            lblSelfds3.Text  = ds.Selfds3.ToString();
            lblSelfds4.Text  = ds.Selfds4.ToString();
            lblSelfds5.Text  = ds.Selfds5.ToString();
            lblSelfds6.Text  = ds.Selfds6.ToString();
            lblSelfds7.Text  = ds.Selfds7.ToString();
            lblSelfds8.Text  = ds.Selfds8.ToString();
            lblSelfds9.Text  = ds.Selfds9.ToString();
            lblSelfds10.Text = ds.Selfds10.ToString();
            lblSelfds11.Text = ds.Selfds11.ToString();
            lblSelfds12.Text = ds.Selfds12.ToString();
            lblSelfds13.Text = ds.Selfds13.ToString();
            lblSelfds14.Text = ds.Selfds14.ToString();
            lblSelfds15.Text = ds.Selfds15.ToString();
            lblSelfds16.Text = ds.Selfds16.ToString();
            lblSelfds17.Text = ds.Selfds17.ToString();
            lblSelfds18.Text = ds.Selfds18.ToString();
            lblSelfds19.Text = ds.Selfds19.ToString();
            lblSelfds20.Text = ds.Selfds20.ToString();
            lblSelfds21.Text = ds.Selfds21.ToString();
            lblSelfds22.Text = ds.Selfds22.ToString();
            lblSelfds23.Text = ds.Selfds23.ToString();
        }
Exemplo n.º 6
0
        protected void PageInit()
        {
            int             dsid = Convert.ToInt32(Request["DsScoreId"].ToString());
            DriverScoreInfo ds   = new DriverScoreInfo(dsid);

            EmployeeInfo em = new EmployeeInfo(Convert.ToInt32(ds.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  = ds.YearId.ToString();
            ddlMonth.SelectedValue = ds.MonthId.ToString();

            Selfds1  = ds.Selfds1.ToString();
            Selfds2  = ds.Selfds2.ToString();
            Selfds3  = ds.Selfds3.ToString();
            Selfds4  = ds.Selfds4.ToString();
            Selfds5  = ds.Selfds5.ToString();
            Selfds6  = ds.Selfds6.ToString();
            Selfds7  = ds.Selfds7.ToString();
            Selfds8  = ds.Selfds8.ToString();
            Selfds9  = ds.Selfds9.ToString();
            Selfds10 = ds.Selfds10.ToString();
            Selfds11 = ds.Selfds11.ToString();
            Selfds12 = ds.Selfds12.ToString();
            Selfds13 = ds.Selfds13.ToString();
            Selfds14 = ds.Selfds14.ToString();
            Selfds15 = ds.Selfds15.ToString();
            Selfds16 = ds.Selfds16.ToString();
            Selfds17 = ds.Selfds17.ToString();
            Selfds18 = ds.Selfds18.ToString();
            Selfds19 = ds.Selfds19.ToString();
            Selfds20 = ds.Selfds20.ToString();
            Selfds21 = ds.Selfds21.ToString();
            Selfds22 = ds.Selfds22.ToString();
            Selfds23 = ds.Selfds23.ToString();
        }
Exemplo n.º 7
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (IsPageValid())
            {
                int             emid = Convert.ToInt32(Session["EmployeeId"]);
                DriverScoreInfo ds   = new DriverScoreInfo();
                ds.EmployeeId      = emid;
                ds.YearId          = Convert.ToInt32(ddlYear.SelectedValue);
                ds.MonthId         = Convert.ToInt32(ddlMonth.SelectedValue);
                ds.DateSpan        = ddlYear.SelectedItem.Text + "年" + ddlMonth.SelectedItem.Text + "月";
                ds.EvaluateLevelId = 6;
                ds.TotalScore      = "待评";
                ds.IsSubmit        = 0;

                ds.Selfds1  = Request.Form["Selfds1"].ToString();
                ds.Selfds2  = Request.Form["Selfds2"].ToString();
                ds.Selfds3  = Request.Form["Selfds3"].ToString();
                ds.Selfds4  = Request.Form["Selfds4"].ToString();
                ds.Selfds5  = Request.Form["Selfds5"].ToString();
                ds.Selfds6  = Request.Form["Selfds6"].ToString();
                ds.Selfds7  = Request.Form["Selfds7"].ToString();
                ds.Selfds8  = Request.Form["Selfds8"].ToString();
                ds.Selfds9  = Request.Form["Selfds9"].ToString();
                ds.Selfds10 = Request.Form["Selfds10"].ToString();
                ds.Selfds11 = Request.Form["Selfds11"].ToString();
                ds.Selfds12 = Request.Form["Selfds12"].ToString();
                ds.Selfds13 = Request.Form["Selfds13"].ToString();
                ds.Selfds14 = Request.Form["Selfds14"].ToString();
                ds.Selfds15 = Request.Form["Selfds15"].ToString();
                ds.Selfds16 = Request.Form["Selfds16"].ToString();
                ds.Selfds17 = Request.Form["Selfds17"].ToString();
                ds.Selfds18 = Request.Form["Selfds18"].ToString();
                ds.Selfds19 = Request.Form["Selfds19"].ToString();
                ds.Selfds20 = Request.Form["Selfds20"].ToString();
                ds.Selfds21 = Request.Form["Selfds21"].ToString();
                ds.Selfds22 = Request.Form["Selfds22"].ToString();
                ds.Selfds23 = Request.Form["Selfds23"].ToString();
                ds.Save();
                Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('保存成功!');</script>");
            }
        }
Exemplo n.º 8
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            int             dsid = Convert.ToInt32(Request["DriverScoreId"].ToString());
            DriverScoreInfo ds   = new DriverScoreInfo(dsid);

            ds.Upds1  = Request.Form["Upds1"].ToString();
            ds.Upds2  = Request.Form["Upds2"].ToString();
            ds.Upds3  = Request.Form["Upds3"].ToString();
            ds.Upds4  = Request.Form["Upds4"].ToString();
            ds.Upds5  = Request.Form["Upds5"].ToString();
            ds.Upds6  = Request.Form["Upds6"].ToString();
            ds.Upds7  = Request.Form["Upds7"].ToString();
            ds.Upds8  = Request.Form["Upds8"].ToString();
            ds.Upds9  = Request.Form["Upds9"].ToString();
            ds.Upds10 = Request.Form["Upds10"].ToString();
            ds.Upds11 = Request.Form["Upds11"].ToString();
            ds.Upds12 = Request.Form["Upds12"].ToString();
            ds.Upds13 = Request.Form["Upds13"].ToString();
            ds.Upds14 = Request.Form["Upds14"].ToString();
            ds.Upds15 = Request.Form["Upds15"].ToString();
            ds.Upds16 = Request.Form["Upds16"].ToString();
            ds.Upds17 = Request.Form["Upds17"].ToString();
            ds.Upds18 = Request.Form["Upds18"].ToString();
            ds.Upds19 = Request.Form["Upds19"].ToString();
            ds.Upds20 = Request.Form["Upds20"].ToString();
            ds.Upds21 = Request.Form["Upds21"].ToString();
            ds.Upds22 = Request.Form["Upds22"].ToString();
            ds.Upds23 = Request.Form["Upds23"].ToString();

            ds.Secds1  = Convert.ToString(Math.Round(float.Parse(lblSelfds1.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upds1"].ToString()), 2) * 0.6);
            ds.Secds2  = Convert.ToString(Math.Round(float.Parse(lblSelfds2.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upds2"].ToString()), 2) * 0.6);
            ds.Secds3  = Convert.ToString(Math.Round(float.Parse(lblSelfds3.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upds3"].ToString()), 2) * 0.6);
            ds.Secds4  = Convert.ToString(Math.Round(float.Parse(lblSelfds4.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upds4"].ToString()), 2) * 0.6);
            ds.Secds5  = Convert.ToString(Math.Round(float.Parse(lblSelfds5.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upds5"].ToString()), 2) * 0.6);
            ds.Secds6  = Convert.ToString(Math.Round(float.Parse(lblSelfds6.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upds6"].ToString()), 2) * 0.6);
            ds.Secds7  = Convert.ToString(Math.Round(float.Parse(lblSelfds7.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upds7"].ToString()), 2) * 0.6);
            ds.Secds8  = Convert.ToString(Math.Round(float.Parse(lblSelfds8.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upds8"].ToString()), 2) * 0.6);
            ds.Secds9  = Convert.ToString(Math.Round(float.Parse(lblSelfds9.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upds9"].ToString()), 2) * 0.6);
            ds.Secds10 = Convert.ToString(Math.Round(float.Parse(lblSelfds10.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upds10"].ToString()), 2) * 0.6);
            ds.Secds11 = Convert.ToString(Math.Round(float.Parse(lblSelfds11.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upds11"].ToString()), 2) * 0.6);
            ds.Secds12 = Convert.ToString(Math.Round(float.Parse(lblSelfds12.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upds12"].ToString()), 2) * 0.6);
            ds.Secds13 = Convert.ToString(Math.Round(float.Parse(lblSelfds13.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upds13"].ToString()), 2) * 0.6);
            ds.Secds14 = Convert.ToString(Math.Round(float.Parse(lblSelfds14.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upds14"].ToString()), 2) * 0.6);
            ds.Secds15 = Convert.ToString(Math.Round(float.Parse(lblSelfds15.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upds15"].ToString()), 2) * 0.6);
            ds.Secds16 = Convert.ToString(Math.Round(float.Parse(lblSelfds16.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upds16"].ToString()), 2) * 0.6);
            ds.Secds17 = Convert.ToString(Math.Round(float.Parse(lblSelfds17.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upds17"].ToString()), 2) * 0.6);
            ds.Secds18 = Convert.ToString(Math.Round(float.Parse(lblSelfds18.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upds18"].ToString()), 2) * 0.6);
            ds.Secds19 = Convert.ToString(Math.Round(float.Parse(lblSelfds19.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upds19"].ToString()), 2) * 0.6);
            ds.Secds20 = Convert.ToString(Math.Round(float.Parse(lblSelfds20.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upds20"].ToString()), 2) * 0.6);
            ds.Secds21 = Convert.ToString(Math.Round(float.Parse(lblSelfds21.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upds21"].ToString()), 2) * 0.6);
            ds.Secds22 = Convert.ToString(Math.Round(float.Parse(lblSelfds22.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upds22"].ToString()), 2) * 0.6);
            ds.Secds23 = Convert.ToString(Math.Round(float.Parse(lblSelfds23.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upds23"].ToString()), 2) * 0.6);

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

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

            if (Score > 90)
            {
                ds.EvaluateLevelId = 2;
            }
            else if (Score > 75 && Score < 90)
            {
                ds.EvaluateLevelId = 3;
            }
            else if (Score > 60 && Score < 75)
            {
                ds.EvaluateLevelId = 4;
            }
            else if (Score < 60)
            {
                ds.EvaluateLevelId = 5;
            }
            ds.IsSubmit = 2;
            ds.UpViews  = Request.Form["UpViews"].ToString();
            ds.Save();
            Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('保存成功!');</script>");
        }
Exemplo n.º 9
0
 public object  SaveDriverScoreInfo(DriverScoreInfo driverScoreInfo)
 {
     driverScoreInfo.Save();
     return(driverScoreInfo.DriverScoreId);
 }
Exemplo n.º 10
0
 public List <DriverScoreInfo> GetPagedList(int pPageIndex, int pPageSize, SortDirection pOrderBy, string pSortExpression, out int pRecordCount)
 {
     return(DriverScoreInfo.GetPagedList(pPageIndex, pPageSize, pOrderBy, pSortExpression, out pRecordCount));
 }
Exemplo n.º 11
0
 public List <DriverScoreInfo> GetDriverScoreInfoList()
 {
     return(DriverScoreInfo.GetList());
 }
Exemplo n.º 12
0
        public void DeleteById(DriverScoreInfo pDriverScoreInfo)
        {
            DriverScoreInfo driverScoreInfo = new DriverScoreInfo(pDriverScoreInfo.DriverScoreId);

            driverScoreInfo.Delete();
        }