Exemple #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";


                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;
                    }
                }
            }
        }
Exemple #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";
         if (!Convert.IsDBNull(gvScore.DataKeys[e.Row.RowIndex].Value))
         {
             int            tesid = Convert.ToInt32(gvScore.DataKeys[e.Row.RowIndex].Value);
             NurseScoreInfo ds    = new NurseScoreInfo(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;
             }
         }
     }
 }
Exemple #3
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            int            NsScoreId = Convert.ToInt32(((Button)sender).CommandArgument.ToString());
            NurseScoreInfo ns        = new NurseScoreInfo(NsScoreId);

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

            MessageInfo.Msgs1(recvid, ns.NurseScoreId, "~/Score/NurseScoreApprove.aspx", em.EmployeeName + "绩效考核申请", em.EmployeeName, "daiban", em.EmployeeName + "绩效考核申请");
            MessageInfo.SendMail(ems.Qq, "绩效考核申请", em.EmployeeName + "绩效考核申请");
            ns.Save();
            gvDataBind();
        }
Exemple #4
0
        public NurseScoreInfo GetNurseScoreInfoById(int NurseScoreId)
        {
            NurseScoreInfo nurseScoreInfo = null;             //

            try
            {
                nurseScoreInfo = new NurseScoreInfo(NurseScoreId);
            }
            catch (AppException)
            {
                return(null);
            }

            return(nurseScoreInfo);
        }
        protected void PageInit()
        {
            int            nsid = Convert.ToInt32(Request["NurseScoreId"].ToString());
            NurseScoreInfo ns   = new NurseScoreInfo(nsid);
            EmployeeInfo   em   = new EmployeeInfo(Convert.ToInt32(ns.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 = ns.YearId.ToString();
            //ddlMonth.SelectedValue = ns.MonthId.ToString();
            YearInfo  year  = new YearInfo(Convert.ToInt32(ns.YearId));
            MonthInfo month = new MonthInfo(Convert.ToInt32(ns.MonthId));

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

            lblSelfns1.Text  = ns.Selfns1.ToString();
            lblSelfns2.Text  = ns.Selfns2.ToString();
            lblSelfns3.Text  = ns.Selfns3.ToString();
            lblSelfns4.Text  = ns.Selfns4.ToString();
            lblSelfns5.Text  = ns.Selfns5.ToString();
            lblSelfns6.Text  = ns.Selfns6.ToString();
            lblSelfns7.Text  = ns.Selfns7.ToString();
            lblSelfns8.Text  = ns.Selfns8.ToString();
            lblSelfns9.Text  = ns.Selfns9.ToString();
            lblSelfns10.Text = ns.Selfns10.ToString();
            lblSelfns11.Text = ns.Selfns11.ToString();
            lblSelfns12.Text = ns.Selfns12.ToString();
            lblSelfns13.Text = ns.Selfns13.ToString();
            lblSelfns14.Text = ns.Selfns14.ToString();
            lblSelfns15.Text = ns.Selfns15.ToString();
            lblSelfns16.Text = ns.Selfns16.ToString();
            lblSelfns17.Text = ns.Selfns17.ToString();
            lblSelfns18.Text = ns.Selfns18.ToString();
            lblSelfns19.Text = ns.Selfns19.ToString();
            lblSelfns20.Text = ns.Selfns20.ToString();
            lblSelfns21.Text = ns.Selfns21.ToString();
            lblSelfns22.Text = ns.Selfns22.ToString();
            lblSelfns23.Text = ns.Selfns23.ToString();
        }
        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (IsPageValid())
            {
                int            emid = Convert.ToInt32(Session["EmployeeId"]);
                NurseScoreInfo ns   = new NurseScoreInfo();
                ns.EmployeeId      = emid;
                ns.YearId          = Convert.ToInt32(ddlYear.SelectedValue);
                ns.MonthId         = Convert.ToInt32(ddlMonth.SelectedValue);
                ns.DateSpan        = ddlYear.SelectedItem.Text + "年" + ddlMonth.SelectedItem.Text + "月";
                ns.EvaluateLevelId = 6;
                ns.TotalScore      = "待评";
                ns.IsSubmit        = 0;

                ns.Selfns1  = Request.Form["Selfns1"].ToString();
                ns.Selfns2  = Request.Form["Selfns2"].ToString();
                ns.Selfns3  = Request.Form["Selfns3"].ToString();
                ns.Selfns4  = Request.Form["Selfns4"].ToString();
                ns.Selfns5  = Request.Form["Selfns5"].ToString();
                ns.Selfns6  = Request.Form["Selfns6"].ToString();
                ns.Selfns7  = Request.Form["Selfns7"].ToString();
                ns.Selfns8  = Request.Form["Selfns8"].ToString();
                ns.Selfns9  = Request.Form["Selfns9"].ToString();
                ns.Selfns10 = Request.Form["Selfns10"].ToString();
                ns.Selfns11 = Request.Form["Selfns11"].ToString();
                ns.Selfns12 = Request.Form["Selfns12"].ToString();
                ns.Selfns13 = Request.Form["Selfns13"].ToString();
                ns.Selfns14 = Request.Form["Selfns14"].ToString();
                ns.Selfns15 = Request.Form["Selfns15"].ToString();
                ns.Selfns16 = Request.Form["Selfns16"].ToString();
                ns.Selfns17 = Request.Form["Selfns17"].ToString();
                ns.Selfns18 = Request.Form["Selfns18"].ToString();
                ns.Selfns19 = Request.Form["Selfns19"].ToString();
                ns.Selfns20 = Request.Form["Selfns20"].ToString();
                ns.Selfns21 = Request.Form["Selfns21"].ToString();
                ns.Selfns22 = Request.Form["Selfns22"].ToString();
                ns.Selfns23 = Request.Form["Selfns23"].ToString();
                ns.Save();
                Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('保存成功!');</script>");
            }
        }
        protected void PageInit()
        {
            int            nsid = Convert.ToInt32(Request["NsScoreId"].ToString());
            NurseScoreInfo ns   = new NurseScoreInfo(nsid);
            EmployeeInfo   em   = new EmployeeInfo(Convert.ToInt32(ns.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  = ns.YearId.ToString();
            ddlMonth.SelectedValue = ns.MonthId.ToString();

            Selfns1  = ns.Selfns1.ToString();
            Selfns2  = ns.Selfns2.ToString();
            Selfns3  = ns.Selfns3.ToString();
            Selfns4  = ns.Selfns4.ToString();
            Selfns5  = ns.Selfns5.ToString();
            Selfns6  = ns.Selfns6.ToString();
            Selfns7  = ns.Selfns7.ToString();
            Selfns8  = ns.Selfns8.ToString();
            Selfns9  = ns.Selfns9.ToString();
            Selfns10 = ns.Selfns10.ToString();
            Selfns11 = ns.Selfns11.ToString();
            Selfns12 = ns.Selfns12.ToString();
            Selfns13 = ns.Selfns13.ToString();
            Selfns14 = ns.Selfns14.ToString();
            Selfns15 = ns.Selfns15.ToString();
            Selfns16 = ns.Selfns16.ToString();
            Selfns17 = ns.Selfns17.ToString();
            Selfns18 = ns.Selfns18.ToString();
            Selfns19 = ns.Selfns19.ToString();
            Selfns20 = ns.Selfns20.ToString();
            Selfns21 = ns.Selfns21.ToString();
            Selfns22 = ns.Selfns22.ToString();
            Selfns23 = ns.Selfns23.ToString();
        }
        protected void btnSave_Click(object sender, EventArgs e)
        {
            int            nsid = Convert.ToInt32(Request["NurseScoreId"].ToString());
            NurseScoreInfo ns   = new NurseScoreInfo(nsid);

            ns.Upns1  = Request.Form["Upns1"].ToString();
            ns.Upns2  = Request.Form["Upns2"].ToString();
            ns.Upns3  = Request.Form["Upns3"].ToString();
            ns.Upns4  = Request.Form["Upns4"].ToString();
            ns.Upns5  = Request.Form["Upns5"].ToString();
            ns.Upns6  = Request.Form["Upns6"].ToString();
            ns.Upns7  = Request.Form["Upns7"].ToString();
            ns.Upns8  = Request.Form["Upns8"].ToString();
            ns.Upns9  = Request.Form["Upns9"].ToString();
            ns.Upns10 = Request.Form["Upns10"].ToString();
            ns.Upns11 = Request.Form["Upns11"].ToString();
            ns.Upns12 = Request.Form["Upns12"].ToString();
            ns.Upns13 = Request.Form["Upns13"].ToString();
            ns.Upns14 = Request.Form["Upns14"].ToString();
            ns.Upns15 = Request.Form["Upns15"].ToString();
            ns.Upns16 = Request.Form["Upns16"].ToString();
            ns.Upns17 = Request.Form["Upns17"].ToString();
            ns.Upns18 = Request.Form["Upns18"].ToString();
            ns.Upns19 = Request.Form["Upns19"].ToString();
            ns.Upns20 = Request.Form["Upns20"].ToString();
            ns.Upns21 = Request.Form["Upns21"].ToString();
            ns.Upns22 = Request.Form["Upns22"].ToString();
            ns.Upns23 = Request.Form["Upns23"].ToString();

            ns.Secns1  = Convert.ToString(Math.Round(float.Parse(lblSelfns1.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upns1"].ToString()), 2) * 0.6);
            ns.Secns2  = Convert.ToString(Math.Round(float.Parse(lblSelfns2.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upns2"].ToString()), 2) * 0.6);
            ns.Secns3  = Convert.ToString(Math.Round(float.Parse(lblSelfns3.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upns3"].ToString()), 2) * 0.6);
            ns.Secns4  = Convert.ToString(Math.Round(float.Parse(lblSelfns4.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upns4"].ToString()), 2) * 0.6);
            ns.Secns5  = Convert.ToString(Math.Round(float.Parse(lblSelfns5.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upns5"].ToString()), 2) * 0.6);
            ns.Secns6  = Convert.ToString(Math.Round(float.Parse(lblSelfns6.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upns6"].ToString()), 2) * 0.6);
            ns.Secns7  = Convert.ToString(Math.Round(float.Parse(lblSelfns7.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upns7"].ToString()), 2) * 0.6);
            ns.Secns8  = Convert.ToString(Math.Round(float.Parse(lblSelfns8.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upns8"].ToString()), 2) * 0.6);
            ns.Secns9  = Convert.ToString(Math.Round(float.Parse(lblSelfns9.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upns9"].ToString()), 2) * 0.6);
            ns.Secns10 = Convert.ToString(Math.Round(float.Parse(lblSelfns10.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upns10"].ToString()), 2) * 0.6);
            ns.Secns11 = Convert.ToString(Math.Round(float.Parse(lblSelfns11.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upns11"].ToString()), 2) * 0.6);
            ns.Secns12 = Convert.ToString(Math.Round(float.Parse(lblSelfns12.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upns12"].ToString()), 2) * 0.6);
            ns.Secns13 = Convert.ToString(Math.Round(float.Parse(lblSelfns13.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upns13"].ToString()), 2) * 0.6);
            ns.Secns14 = Convert.ToString(Math.Round(float.Parse(lblSelfns14.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upns14"].ToString()), 2) * 0.6);
            ns.Secns15 = Convert.ToString(Math.Round(float.Parse(lblSelfns15.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upns15"].ToString()), 2) * 0.6);
            ns.Secns16 = Convert.ToString(Math.Round(float.Parse(lblSelfns16.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upns16"].ToString()), 2) * 0.6);
            ns.Secns17 = Convert.ToString(Math.Round(float.Parse(lblSelfns17.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upns17"].ToString()), 2) * 0.6);
            ns.Secns18 = Convert.ToString(Math.Round(float.Parse(lblSelfns18.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upns18"].ToString()), 2) * 0.6);
            ns.Secns19 = Convert.ToString(Math.Round(float.Parse(lblSelfns19.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upns19"].ToString()), 2) * 0.6);
            ns.Secns20 = Convert.ToString(Math.Round(float.Parse(lblSelfns20.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upns20"].ToString()), 2) * 0.6);
            ns.Secns21 = Convert.ToString(Math.Round(float.Parse(lblSelfns21.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upns21"].ToString()), 2) * 0.6);
            ns.Secns22 = Convert.ToString(Math.Round(float.Parse(lblSelfns22.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upns22"].ToString()), 2) * 0.6);
            ns.Secns23 = Convert.ToString(Math.Round(float.Parse(lblSelfns23.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upns23"].ToString()), 2) * 0.6);

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

            if (Score > 90)
            {
                ns.EvaluateLevelId = 2;
            }
            else if (Score > 75 && Score < 90)
            {
                ns.EvaluateLevelId = 3;
            }
            else if (Score > 60 && Score < 75)
            {
                ns.EvaluateLevelId = 4;
            }
            else if (Score < 60)
            {
                ns.EvaluateLevelId = 5;
            }
            ns.TotalScore = Request.Form["hid"].ToString();
            ns.IsSubmit   = 2;
            ns.UpViews    = Request.Form["UpViews"].ToString();
            ns.Save();
            Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('保存成功!');</script>");
        }
Exemple #9
0
 public object  SaveNurseScoreInfo(NurseScoreInfo nurseScoreInfo)
 {
     nurseScoreInfo.Save();
     return(nurseScoreInfo.NurseScoreId);
 }
Exemple #10
0
 public List <NurseScoreInfo> GetPagedList(int pPageIndex, int pPageSize, SortDirection pOrderBy, string pSortExpression, out int pRecordCount)
 {
     return(NurseScoreInfo.GetPagedList(pPageIndex, pPageSize, pOrderBy, pSortExpression, out pRecordCount));
 }
Exemple #11
0
 public List <NurseScoreInfo> GetNurseScoreInfoList()
 {
     return(NurseScoreInfo.GetList());
 }
Exemple #12
0
        public void DeleteById(NurseScoreInfo pNurseScoreInfo)
        {
            NurseScoreInfo nurseScoreInfo = new NurseScoreInfo(pNurseScoreInfo.NurseScoreId);

            nurseScoreInfo.Delete();
        }