示例#1
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();
 }
        public NurseScoreInfo GetNurseScoreInfoById(int NurseScoreId)
        {
            NurseScoreInfo nurseScoreInfo  = null;//
            try
            {
                 nurseScoreInfo = new NurseScoreInfo(NurseScoreId);

            }
            catch (AppException)
            {
                return null;
            }

            return  nurseScoreInfo;
        }
示例#3
0
        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>");
            }
        }
示例#4
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;
                        }

                    }
                }
        }
示例#5
0
        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();
        }
示例#6
0
        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();

            lblUpns1.Text = ns.Upns1.ToString();
            lblUpns2.Text = ns.Upns2.ToString();
            lblUpns3.Text = ns.Upns3.ToString();
            lblUpns4.Text = ns.Upns4.ToString();
            lblUpns5.Text = ns.Upns5.ToString();
            lblUpns6.Text = ns.Upns6.ToString();
            lblUpns7.Text = ns.Upns7.ToString();
            lblUpns8.Text = ns.Upns8.ToString();
            lblUpns9.Text = ns.Upns9.ToString();
            lblUpns10.Text = ns.Upns10.ToString();
            lblUpns11.Text = ns.Upns11.ToString();
            lblUpns12.Text = ns.Upns12.ToString();
            lblUpns13.Text = ns.Upns13.ToString();
            lblUpns14.Text = ns.Upns14.ToString();
            lblUpns15.Text = ns.Upns15.ToString();
            lblUpns16.Text = ns.Upns16.ToString();
            lblUpns17.Text = ns.Upns17.ToString();
            lblUpns18.Text = ns.Upns18.ToString();
            lblUpns19.Text = ns.Upns19.ToString();
            lblUpns20.Text = ns.Upns20.ToString();
            lblUpns21.Text = ns.Upns21.ToString();
            lblUpns22.Text = ns.Upns22.ToString();
            lblUpns23.Text = ns.Upns23.ToString();

            lblSectns1.Text = ns.Secns1.ToString();
            lblSectns2.Text = ns.Secns2.ToString();
            lblSectns3.Text = ns.Secns3.ToString();
            lblSectns4.Text = ns.Secns4.ToString();
            lblSectns5.Text = ns.Secns5.ToString();
            lblSectns6.Text = ns.Secns6.ToString();
            lblSectns7.Text = ns.Secns7.ToString();
            lblSectns8.Text = ns.Secns8.ToString();
            lblSectns9.Text = ns.Secns9.ToString();
            lblSectns10.Text = ns.Secns10.ToString();
            lblSectns11.Text = ns.Secns11.ToString();
            lblSectns12.Text = ns.Secns12.ToString();
            lblSectns13.Text = ns.Secns13.ToString();
            lblSectns14.Text = ns.Secns14.ToString();
            lblSectns15.Text = ns.Secns15.ToString();
            lblSectns16.Text = ns.Secns16.ToString();
            lblSectns17.Text = ns.Secns17.ToString();
            lblSectns18.Text = ns.Secns18.ToString();
            lblSectns19.Text = ns.Secns19.ToString();
            lblSectns20.Text = ns.Secns20.ToString();
            lblSectns21.Text = ns.Secns21.ToString();
            lblSectns22.Text = ns.Secns22.ToString();
            lblSectns23.Text = ns.Secns23.ToString();

            lblTotalScore.Text = ns.TotalScore.ToString();
        }
 public object SaveNurseScoreInfo(NurseScoreInfo nurseScoreInfo)
 {
     nurseScoreInfo.Save();
     return nurseScoreInfo . NurseScoreId;
 }
示例#8
0
 /// <summary>
 /// 复制一个对象,采用硬编码的方式,避免反射的低效
 /// </summary>
 /// <param name="pIndustryTypeInfoFrom"></param>
 /// <param name="pIndustryTypeInfoTo"></param>
 public static void Copy(NurseScoreInfo pNurseScoreInfoFrom, NurseScoreInfo pNurseScoreInfoTo)
 {
     pNurseScoreInfoTo.NurseScoreId = pNurseScoreInfoFrom.nurseScoreId;
      		pNurseScoreInfoTo.DateSpan = pNurseScoreInfoFrom.dateSpan;
      		pNurseScoreInfoTo.EvaluateLevelId = pNurseScoreInfoFrom.evaluateLevelId;
      		pNurseScoreInfoTo.TotalScore = pNurseScoreInfoFrom.totalScore;
      		pNurseScoreInfoTo.UpViews = pNurseScoreInfoFrom.upViews;
      		pNurseScoreInfoTo.YearId = pNurseScoreInfoFrom.yearId;
      		pNurseScoreInfoTo.MonthId = pNurseScoreInfoFrom.monthId;
      		pNurseScoreInfoTo.EmployeeId = pNurseScoreInfoFrom.employeeId;
      		pNurseScoreInfoTo.IsSubmit = pNurseScoreInfoFrom.isSubmit;
      		pNurseScoreInfoTo.Selfns1 = pNurseScoreInfoFrom.selfns1;
      		pNurseScoreInfoTo.Selfns2 = pNurseScoreInfoFrom.selfns2;
      		pNurseScoreInfoTo.Selfns3 = pNurseScoreInfoFrom.selfns3;
      		pNurseScoreInfoTo.Selfns4 = pNurseScoreInfoFrom.selfns4;
      		pNurseScoreInfoTo.Selfns5 = pNurseScoreInfoFrom.selfns5;
      		pNurseScoreInfoTo.Selfns6 = pNurseScoreInfoFrom.selfns6;
      		pNurseScoreInfoTo.Selfns7 = pNurseScoreInfoFrom.selfns7;
      		pNurseScoreInfoTo.Selfns8 = pNurseScoreInfoFrom.selfns8;
      		pNurseScoreInfoTo.Selfns9 = pNurseScoreInfoFrom.selfns9;
      		pNurseScoreInfoTo.Selfns10 = pNurseScoreInfoFrom.selfns10;
      		pNurseScoreInfoTo.Selfns11 = pNurseScoreInfoFrom.selfns11;
      		pNurseScoreInfoTo.Selfns12 = pNurseScoreInfoFrom.selfns12;
      		pNurseScoreInfoTo.Selfns13 = pNurseScoreInfoFrom.selfns13;
      		pNurseScoreInfoTo.Selfns14 = pNurseScoreInfoFrom.selfns14;
      		pNurseScoreInfoTo.Selfns15 = pNurseScoreInfoFrom.selfns15;
      		pNurseScoreInfoTo.Selfns16 = pNurseScoreInfoFrom.selfns16;
      		pNurseScoreInfoTo.Selfns17 = pNurseScoreInfoFrom.selfns17;
      		pNurseScoreInfoTo.Selfns18 = pNurseScoreInfoFrom.selfns18;
      		pNurseScoreInfoTo.Selfns19 = pNurseScoreInfoFrom.selfns19;
      		pNurseScoreInfoTo.Selfns20 = pNurseScoreInfoFrom.selfns20;
      		pNurseScoreInfoTo.Selfns21 = pNurseScoreInfoFrom.selfns21;
      		pNurseScoreInfoTo.Selfns22 = pNurseScoreInfoFrom.selfns22;
      		pNurseScoreInfoTo.Selfns23 = pNurseScoreInfoFrom.selfns23;
      		pNurseScoreInfoTo.Upns1 = pNurseScoreInfoFrom.upns1;
      		pNurseScoreInfoTo.Upns2 = pNurseScoreInfoFrom.upns2;
      		pNurseScoreInfoTo.Upns3 = pNurseScoreInfoFrom.upns3;
      		pNurseScoreInfoTo.Upns4 = pNurseScoreInfoFrom.upns4;
      		pNurseScoreInfoTo.Upns5 = pNurseScoreInfoFrom.upns5;
      		pNurseScoreInfoTo.Upns6 = pNurseScoreInfoFrom.upns6;
      		pNurseScoreInfoTo.Upns7 = pNurseScoreInfoFrom.upns7;
      		pNurseScoreInfoTo.Upns8 = pNurseScoreInfoFrom.upns8;
      		pNurseScoreInfoTo.Upns9 = pNurseScoreInfoFrom.upns9;
      		pNurseScoreInfoTo.Upns10 = pNurseScoreInfoFrom.upns10;
      		pNurseScoreInfoTo.Upns11 = pNurseScoreInfoFrom.upns11;
      		pNurseScoreInfoTo.Upns12 = pNurseScoreInfoFrom.upns12;
      		pNurseScoreInfoTo.Upns13 = pNurseScoreInfoFrom.upns13;
      		pNurseScoreInfoTo.Upns14 = pNurseScoreInfoFrom.upns14;
      		pNurseScoreInfoTo.Upns15 = pNurseScoreInfoFrom.upns15;
      		pNurseScoreInfoTo.Upns16 = pNurseScoreInfoFrom.upns16;
      		pNurseScoreInfoTo.Upns17 = pNurseScoreInfoFrom.upns17;
      		pNurseScoreInfoTo.Upns18 = pNurseScoreInfoFrom.upns18;
      		pNurseScoreInfoTo.Upns19 = pNurseScoreInfoFrom.upns19;
      		pNurseScoreInfoTo.Upns20 = pNurseScoreInfoFrom.upns20;
      		pNurseScoreInfoTo.Upns21 = pNurseScoreInfoFrom.upns21;
      		pNurseScoreInfoTo.Upns22 = pNurseScoreInfoFrom.upns22;
      		pNurseScoreInfoTo.Upns23 = pNurseScoreInfoFrom.upns23;
      		pNurseScoreInfoTo.Secns1 = pNurseScoreInfoFrom.secns1;
      		pNurseScoreInfoTo.Secns2 = pNurseScoreInfoFrom.secns2;
      		pNurseScoreInfoTo.Secns3 = pNurseScoreInfoFrom.secns3;
      		pNurseScoreInfoTo.Secns4 = pNurseScoreInfoFrom.secns4;
      		pNurseScoreInfoTo.Secns5 = pNurseScoreInfoFrom.secns5;
      		pNurseScoreInfoTo.Secns6 = pNurseScoreInfoFrom.secns6;
      		pNurseScoreInfoTo.Secns7 = pNurseScoreInfoFrom.secns7;
      		pNurseScoreInfoTo.Secns8 = pNurseScoreInfoFrom.secns8;
      		pNurseScoreInfoTo.Secns9 = pNurseScoreInfoFrom.secns9;
      		pNurseScoreInfoTo.Secns10 = pNurseScoreInfoFrom.secns10;
      		pNurseScoreInfoTo.Secns11 = pNurseScoreInfoFrom.secns11;
      		pNurseScoreInfoTo.Secns12 = pNurseScoreInfoFrom.secns12;
      		pNurseScoreInfoTo.Secns13 = pNurseScoreInfoFrom.secns13;
      		pNurseScoreInfoTo.Secns14 = pNurseScoreInfoFrom.secns14;
      		pNurseScoreInfoTo.Secns15 = pNurseScoreInfoFrom.secns15;
      		pNurseScoreInfoTo.Secns16 = pNurseScoreInfoFrom.secns16;
      		pNurseScoreInfoTo.Secns17 = pNurseScoreInfoFrom.secns17;
      		pNurseScoreInfoTo.Secns18 = pNurseScoreInfoFrom.secns18;
      		pNurseScoreInfoTo.Secns19 = pNurseScoreInfoFrom.secns19;
      		pNurseScoreInfoTo.Secns20 = pNurseScoreInfoFrom.secns20;
      		pNurseScoreInfoTo.Secns21 = pNurseScoreInfoFrom.secns21;
      		pNurseScoreInfoTo.Secns22 = pNurseScoreInfoFrom.secns22;
      		pNurseScoreInfoTo.Secns23 = pNurseScoreInfoFrom.secns23;
     pNurseScoreInfoTo.Loaded=pNurseScoreInfoFrom.Loaded;
 }
示例#9
0
 //数据持久化
 internal static void SaveToDb(NurseScoreInfo pNurseScoreInfo, NurseScore  pNurseScore,bool pIsNew)
 {
     pNurseScore.NurseScoreId = pNurseScoreInfo.nurseScoreId;
      		pNurseScore.DateSpan = pNurseScoreInfo.dateSpan;
      		pNurseScore.EvaluateLevelId = pNurseScoreInfo.evaluateLevelId;
      		pNurseScore.TotalScore = pNurseScoreInfo.totalScore;
      		pNurseScore.UpViews = pNurseScoreInfo.upViews;
      		pNurseScore.YearId = pNurseScoreInfo.yearId;
      		pNurseScore.MonthId = pNurseScoreInfo.monthId;
      		pNurseScore.EmployeeId = pNurseScoreInfo.employeeId;
      		pNurseScore.IsSubmit = pNurseScoreInfo.isSubmit;
      		pNurseScore.Selfns1 = pNurseScoreInfo.selfns1;
      		pNurseScore.Selfns2 = pNurseScoreInfo.selfns2;
      		pNurseScore.Selfns3 = pNurseScoreInfo.selfns3;
      		pNurseScore.Selfns4 = pNurseScoreInfo.selfns4;
      		pNurseScore.Selfns5 = pNurseScoreInfo.selfns5;
      		pNurseScore.Selfns6 = pNurseScoreInfo.selfns6;
      		pNurseScore.Selfns7 = pNurseScoreInfo.selfns7;
      		pNurseScore.Selfns8 = pNurseScoreInfo.selfns8;
      		pNurseScore.Selfns9 = pNurseScoreInfo.selfns9;
      		pNurseScore.Selfns10 = pNurseScoreInfo.selfns10;
      		pNurseScore.Selfns11 = pNurseScoreInfo.selfns11;
      		pNurseScore.Selfns12 = pNurseScoreInfo.selfns12;
      		pNurseScore.Selfns13 = pNurseScoreInfo.selfns13;
      		pNurseScore.Selfns14 = pNurseScoreInfo.selfns14;
      		pNurseScore.Selfns15 = pNurseScoreInfo.selfns15;
      		pNurseScore.Selfns16 = pNurseScoreInfo.selfns16;
      		pNurseScore.Selfns17 = pNurseScoreInfo.selfns17;
      		pNurseScore.Selfns18 = pNurseScoreInfo.selfns18;
      		pNurseScore.Selfns19 = pNurseScoreInfo.selfns19;
      		pNurseScore.Selfns20 = pNurseScoreInfo.selfns20;
      		pNurseScore.Selfns21 = pNurseScoreInfo.selfns21;
      		pNurseScore.Selfns22 = pNurseScoreInfo.selfns22;
      		pNurseScore.Selfns23 = pNurseScoreInfo.selfns23;
      		pNurseScore.Upns1 = pNurseScoreInfo.upns1;
      		pNurseScore.Upns2 = pNurseScoreInfo.upns2;
      		pNurseScore.Upns3 = pNurseScoreInfo.upns3;
      		pNurseScore.Upns4 = pNurseScoreInfo.upns4;
      		pNurseScore.Upns5 = pNurseScoreInfo.upns5;
      		pNurseScore.Upns6 = pNurseScoreInfo.upns6;
      		pNurseScore.Upns7 = pNurseScoreInfo.upns7;
      		pNurseScore.Upns8 = pNurseScoreInfo.upns8;
      		pNurseScore.Upns9 = pNurseScoreInfo.upns9;
      		pNurseScore.Upns10 = pNurseScoreInfo.upns10;
      		pNurseScore.Upns11 = pNurseScoreInfo.upns11;
      		pNurseScore.Upns12 = pNurseScoreInfo.upns12;
      		pNurseScore.Upns13 = pNurseScoreInfo.upns13;
      		pNurseScore.Upns14 = pNurseScoreInfo.upns14;
      		pNurseScore.Upns15 = pNurseScoreInfo.upns15;
      		pNurseScore.Upns16 = pNurseScoreInfo.upns16;
      		pNurseScore.Upns17 = pNurseScoreInfo.upns17;
      		pNurseScore.Upns18 = pNurseScoreInfo.upns18;
      		pNurseScore.Upns19 = pNurseScoreInfo.upns19;
      		pNurseScore.Upns20 = pNurseScoreInfo.upns20;
      		pNurseScore.Upns21 = pNurseScoreInfo.upns21;
      		pNurseScore.Upns22 = pNurseScoreInfo.upns22;
      		pNurseScore.Upns23 = pNurseScoreInfo.upns23;
      		pNurseScore.Secns1 = pNurseScoreInfo.secns1;
      		pNurseScore.Secns2 = pNurseScoreInfo.secns2;
      		pNurseScore.Secns3 = pNurseScoreInfo.secns3;
      		pNurseScore.Secns4 = pNurseScoreInfo.secns4;
      		pNurseScore.Secns5 = pNurseScoreInfo.secns5;
      		pNurseScore.Secns6 = pNurseScoreInfo.secns6;
      		pNurseScore.Secns7 = pNurseScoreInfo.secns7;
      		pNurseScore.Secns8 = pNurseScoreInfo.secns8;
      		pNurseScore.Secns9 = pNurseScoreInfo.secns9;
      		pNurseScore.Secns10 = pNurseScoreInfo.secns10;
      		pNurseScore.Secns11 = pNurseScoreInfo.secns11;
      		pNurseScore.Secns12 = pNurseScoreInfo.secns12;
      		pNurseScore.Secns13 = pNurseScoreInfo.secns13;
      		pNurseScore.Secns14 = pNurseScoreInfo.secns14;
      		pNurseScore.Secns15 = pNurseScoreInfo.secns15;
      		pNurseScore.Secns16 = pNurseScoreInfo.secns16;
      		pNurseScore.Secns17 = pNurseScoreInfo.secns17;
      		pNurseScore.Secns18 = pNurseScoreInfo.secns18;
      		pNurseScore.Secns19 = pNurseScoreInfo.secns19;
      		pNurseScore.Secns20 = pNurseScoreInfo.secns20;
      		pNurseScore.Secns21 = pNurseScoreInfo.secns21;
      		pNurseScore.Secns22 = pNurseScoreInfo.secns22;
      		pNurseScore.Secns23 = pNurseScoreInfo.secns23;
     pNurseScore.IsNew=pIsNew;
     string UserName = SubsonicHelper.GetUserName();
     try
     {
         pNurseScore.Save(UserName);
     }
     catch(Exception ex)
     {
         LogManager.getInstance().getLogger(typeof(NurseScoreInfo)).Error(ex);
         if(ex.Message.Contains("插入重复键"))//违反了唯一键
         {
             throw new AppException("此对象已经存在");//此处等待优化可以从唯一约束中直接取出提示来,如果没有的话,默认为原始的出错提示
         }
         throw new AppException("保存失败");
     }
     pNurseScoreInfo.nurseScoreId = pNurseScore.NurseScoreId;
     //如果缓存存在,更新缓存
     if (CachedEntityCommander.IsTypeRegistered(typeof(NurseScoreInfo)))
     {
         ResetCache();
     }
 }
示例#10
0
 /// <summary>
 /// 批量装载
 /// </summary>
 internal static void LoadFromDALPatch(List< NurseScoreInfo> pList, NurseScoreCollection pCollection)
 {
     foreach (NurseScore nurseScore in pCollection)
     {
         NurseScoreInfo nurseScoreInfo = new NurseScoreInfo();
         LoadFromDAL(nurseScoreInfo, nurseScore );
         pList.Add(nurseScoreInfo);
     }
 }
示例#11
0
 //从后台获取数据
 internal static void LoadFromDAL(NurseScoreInfo pNurseScoreInfo, NurseScore  pNurseScore)
 {
     pNurseScoreInfo.nurseScoreId = pNurseScore.NurseScoreId;
      		pNurseScoreInfo.dateSpan = pNurseScore.DateSpan;
      		pNurseScoreInfo.evaluateLevelId = pNurseScore.EvaluateLevelId;
      		pNurseScoreInfo.totalScore = pNurseScore.TotalScore;
      		pNurseScoreInfo.upViews = pNurseScore.UpViews;
      		pNurseScoreInfo.yearId = pNurseScore.YearId;
      		pNurseScoreInfo.monthId = pNurseScore.MonthId;
      		pNurseScoreInfo.employeeId = pNurseScore.EmployeeId;
      		pNurseScoreInfo.isSubmit = pNurseScore.IsSubmit;
      		pNurseScoreInfo.selfns1 = pNurseScore.Selfns1;
      		pNurseScoreInfo.selfns2 = pNurseScore.Selfns2;
      		pNurseScoreInfo.selfns3 = pNurseScore.Selfns3;
      		pNurseScoreInfo.selfns4 = pNurseScore.Selfns4;
      		pNurseScoreInfo.selfns5 = pNurseScore.Selfns5;
      		pNurseScoreInfo.selfns6 = pNurseScore.Selfns6;
      		pNurseScoreInfo.selfns7 = pNurseScore.Selfns7;
      		pNurseScoreInfo.selfns8 = pNurseScore.Selfns8;
      		pNurseScoreInfo.selfns9 = pNurseScore.Selfns9;
      		pNurseScoreInfo.selfns10 = pNurseScore.Selfns10;
      		pNurseScoreInfo.selfns11 = pNurseScore.Selfns11;
      		pNurseScoreInfo.selfns12 = pNurseScore.Selfns12;
      		pNurseScoreInfo.selfns13 = pNurseScore.Selfns13;
      		pNurseScoreInfo.selfns14 = pNurseScore.Selfns14;
      		pNurseScoreInfo.selfns15 = pNurseScore.Selfns15;
      		pNurseScoreInfo.selfns16 = pNurseScore.Selfns16;
      		pNurseScoreInfo.selfns17 = pNurseScore.Selfns17;
      		pNurseScoreInfo.selfns18 = pNurseScore.Selfns18;
      		pNurseScoreInfo.selfns19 = pNurseScore.Selfns19;
      		pNurseScoreInfo.selfns20 = pNurseScore.Selfns20;
      		pNurseScoreInfo.selfns21 = pNurseScore.Selfns21;
      		pNurseScoreInfo.selfns22 = pNurseScore.Selfns22;
      		pNurseScoreInfo.selfns23 = pNurseScore.Selfns23;
      		pNurseScoreInfo.upns1 = pNurseScore.Upns1;
      		pNurseScoreInfo.upns2 = pNurseScore.Upns2;
      		pNurseScoreInfo.upns3 = pNurseScore.Upns3;
      		pNurseScoreInfo.upns4 = pNurseScore.Upns4;
      		pNurseScoreInfo.upns5 = pNurseScore.Upns5;
      		pNurseScoreInfo.upns6 = pNurseScore.Upns6;
      		pNurseScoreInfo.upns7 = pNurseScore.Upns7;
      		pNurseScoreInfo.upns8 = pNurseScore.Upns8;
      		pNurseScoreInfo.upns9 = pNurseScore.Upns9;
      		pNurseScoreInfo.upns10 = pNurseScore.Upns10;
      		pNurseScoreInfo.upns11 = pNurseScore.Upns11;
      		pNurseScoreInfo.upns12 = pNurseScore.Upns12;
      		pNurseScoreInfo.upns13 = pNurseScore.Upns13;
      		pNurseScoreInfo.upns14 = pNurseScore.Upns14;
      		pNurseScoreInfo.upns15 = pNurseScore.Upns15;
      		pNurseScoreInfo.upns16 = pNurseScore.Upns16;
      		pNurseScoreInfo.upns17 = pNurseScore.Upns17;
      		pNurseScoreInfo.upns18 = pNurseScore.Upns18;
      		pNurseScoreInfo.upns19 = pNurseScore.Upns19;
      		pNurseScoreInfo.upns20 = pNurseScore.Upns20;
      		pNurseScoreInfo.upns21 = pNurseScore.Upns21;
      		pNurseScoreInfo.upns22 = pNurseScore.Upns22;
      		pNurseScoreInfo.upns23 = pNurseScore.Upns23;
      		pNurseScoreInfo.secns1 = pNurseScore.Secns1;
      		pNurseScoreInfo.secns2 = pNurseScore.Secns2;
      		pNurseScoreInfo.secns3 = pNurseScore.Secns3;
      		pNurseScoreInfo.secns4 = pNurseScore.Secns4;
      		pNurseScoreInfo.secns5 = pNurseScore.Secns5;
      		pNurseScoreInfo.secns6 = pNurseScore.Secns6;
      		pNurseScoreInfo.secns7 = pNurseScore.Secns7;
      		pNurseScoreInfo.secns8 = pNurseScore.Secns8;
      		pNurseScoreInfo.secns9 = pNurseScore.Secns9;
      		pNurseScoreInfo.secns10 = pNurseScore.Secns10;
      		pNurseScoreInfo.secns11 = pNurseScore.Secns11;
      		pNurseScoreInfo.secns12 = pNurseScore.Secns12;
      		pNurseScoreInfo.secns13 = pNurseScore.Secns13;
      		pNurseScoreInfo.secns14 = pNurseScore.Secns14;
      		pNurseScoreInfo.secns15 = pNurseScore.Secns15;
      		pNurseScoreInfo.secns16 = pNurseScore.Secns16;
      		pNurseScoreInfo.secns17 = pNurseScore.Secns17;
      		pNurseScoreInfo.secns18 = pNurseScore.Secns18;
      		pNurseScoreInfo.secns19 = pNurseScore.Secns19;
      		pNurseScoreInfo.secns20 = pNurseScore.Secns20;
      		pNurseScoreInfo.secns21 = pNurseScore.Secns21;
      		pNurseScoreInfo.secns22 = pNurseScore.Secns22;
      		pNurseScoreInfo.secns23 = pNurseScore.Secns23;
     pNurseScoreInfo.Loaded=true;
 }
示例#12
0
 /// <summary>
 /// 复制为另一个对象
 /// </summary>
 /// <param name="pIndustryTypeInfoTo"></param>
 public void CopyTo(NurseScoreInfo pNurseScoreInfoTo)
 {
     Copy(this,  pNurseScoreInfoTo);
 }
示例#13
0
        /// <summary>
        /// 获得分页列表,无论是否是缓存实体都从数据库直接拿取数据
        /// </summary>
        /// <param name="pPageIndex">页数</param>
        /// <param name="pPageSize">每页列表</param>
        /// <param name="pOrderBy">排序</param>
        /// <param name="pSortExpression">排序字段</param>
        /// <param name="pRecordCount">列表行数</param>
        /// <returns>数据分页</returns>
        public static List<NurseScoreInfo> GetPagedList(int pPageIndex,int pPageSize,SortDirection pOrderBy,string pSortExpression,out int pRecordCount)
        {
            if(pPageIndex<=1)
            pPageIndex=1;
            List< NurseScoreInfo> list = new List< NurseScoreInfo>();

            Query q = NurseScore .CreateQuery();
            q.PageIndex = pPageIndex;
            q.PageSize = pPageSize;
            q.ORDER_BY(pSortExpression,pOrderBy.ToString());
            NurseScoreCollection  collection=new  NurseScoreCollection();
             	collection.LoadAndCloseReader(q.ExecuteReader());

            foreach (NurseScore  nurseScore  in collection)
            {
                NurseScoreInfo nurseScoreInfo = new NurseScoreInfo();
                LoadFromDAL(nurseScoreInfo,   nurseScore);
                list.Add(nurseScoreInfo);
            }
            pRecordCount=q.GetRecordCount();

            return list;
        }
示例#14
0
 /// <summary>
 /// 获得数据列表
 /// </summary>
 /// <returns></returns>
 public static List<NurseScoreInfo> GetList()
 {
     string cacheKey = GetCacheKey();
     //本实体已经注册成缓存实体,并且缓存存在的时候,直接从缓存取
     if (CachedEntityCommander.IsTypeRegistered(typeof(NurseScoreInfo)) && CachedEntityCommander.GetCache(cacheKey) != null)
     {
         return CachedEntityCommander.GetCache(cacheKey) as List< NurseScoreInfo>;
     }
     else
     {
         List< NurseScoreInfo>  list =new List< NurseScoreInfo>();
         NurseScoreCollection  collection=new  NurseScoreCollection();
         Query qry = new Query(NurseScore.Schema);
         collection.LoadAndCloseReader(qry.ExecuteReader());
         foreach(NurseScore nurseScore in collection)
         {
             NurseScoreInfo nurseScoreInfo= new NurseScoreInfo();
             LoadFromDAL(nurseScoreInfo,nurseScore);
             list.Add(nurseScoreInfo);
         }
       	//生成缓存
         if (CachedEntityCommander.IsTypeRegistered(typeof(NurseScoreInfo)))
         {
             CachedEntityCommander.SetCache(cacheKey, list);
         }
         return list;
     }
 }
示例#15
0
 public void DeleteById(NurseScoreInfo pNurseScoreInfo)
 {
     NurseScoreInfo nurseScoreInfo = new NurseScoreInfo(pNurseScoreInfo.NurseScoreId);
     nurseScoreInfo.Delete();
 }
示例#16
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;

                    }
                }
            }
        }
示例#17
0
        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>");
        }