Пример #1
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (IsPageValid())
            {
                int fsid = Convert.ToInt32(Request.Form["AsScoreId"].ToString());
                AssistantScoreInfo fs = new AssistantScoreInfo(fsid);
                fs.YearId = Convert.ToInt32(ddlYear.SelectedValue);
                fs.MonthId = Convert.ToInt32(ddlMonth.SelectedValue);
                fs.DateSpan = ddlYear.SelectedItem.Text + "��" + ddlMonth.SelectedItem.Text + "��";

                fs.Selfas1 = Request.Form["Selfas1"].ToString();
                fs.Selfas2 = Request.Form["Selfas2"].ToString();
                fs.Selfas3 = Request.Form["Selfas3"].ToString();
                fs.Selfas4 = Request.Form["Selfas4"].ToString();
                fs.Selfas5 = Request.Form["Selfas5"].ToString();
                fs.Selfas6 = Request.Form["Selfas6"].ToString();
                fs.Selfas7 = Request.Form["Selfas7"].ToString();
                fs.Selfas8 = Request.Form["Selfas8"].ToString();
                fs.Selfas9 = Request.Form["Selfas9"].ToString();
                fs.Selfas10 = Request.Form["Selfas10"].ToString();
                fs.Selfas11 = Request.Form["Selfas11"].ToString();
                fs.Selfas12 = Request.Form["Selfas12"].ToString();
                fs.Selfas13 = Request.Form["Selfas13"].ToString();
                fs.Selfas14 = Request.Form["Selfas14"].ToString();
                fs.Selfas15 = Request.Form["Selfas15"].ToString();
                fs.Selfas16 = Request.Form["Selfas16"].ToString();
                fs.Selfas17 = Request.Form["Selfas17"].ToString();
                fs.Selfas18 = Request.Form["Selfas18"].ToString();
                fs.Selfas19 = Request.Form["Selfas19"].ToString();
                fs.Save();
                Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('����ɹ���');</script>");
            }
        }
Пример #2
0
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     int AsScoreId = Convert.ToInt32(((Button)sender).CommandArgument.ToString());
     AssistantScoreInfo at = new AssistantScoreInfo(AsScoreId);
     at.IsSubmit = 1;
     int recvid = Convert.ToInt32(Common.getEmployeeIdOfMarketManager());
     EmployeeInfo em = new EmployeeInfo(Convert.ToInt32(at.EmployeeId));
     EmployeeInfo ems = new EmployeeInfo(recvid);
     MessageInfo.Msgs1(recvid, at.AssistantScoreId, "~/Score/AsistantScoreApprove.aspx", em.EmployeeName + "����������", em.EmployeeName, "daiban", em.EmployeeName + "����������");
     MessageInfo.SendMail(ems.Qq, "����������", em.EmployeeName + "����������");
     at.Save();
     gvDataBind();
 }
        public AssistantScoreInfo GetAssistantScoreInfoById(int AssistantScoreId)
        {
            AssistantScoreInfo assistantScoreInfo  = null;//
            try
            {
                 assistantScoreInfo = new AssistantScoreInfo(AssistantScoreId);

            }
            catch (AppException)
            {
                return null;
            }

            return  assistantScoreInfo;
        }
Пример #4
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (IsPageValid())
            {
                int emid = Convert.ToInt32(Session["EmployeeId"]);
                AssistantScoreInfo at = new AssistantScoreInfo();
                at.EmployeeId = emid;
                at.YearId = Convert.ToInt32(ddlYear.SelectedValue);
                at.MonthId = Convert.ToInt32(ddlMonth.SelectedValue);
                at.DateSpan = ddlYear.SelectedItem.Text + "��" + ddlMonth.SelectedItem.Text + "��";
                at.EvaluateLevelId = 6;
                at.TotalScore = "����";
                at.IsSubmit = 0;

                at.Selfas1 = Request.Form["Selfas1"].ToString();
                at.Selfas2 = Request.Form["Selfas2"].ToString();
                at.Selfas3 = Request.Form["Selfas3"].ToString();
                at.Selfas4 = Request.Form["Selfas4"].ToString();
                at.Selfas5 = Request.Form["Selfas5"].ToString();
                at.Selfas6 = Request.Form["Selfas6"].ToString();
                at.Selfas7 = Request.Form["Selfas7"].ToString();
                at.Selfas8 = Request.Form["Selfas8"].ToString();
                at.Selfas9 = Request.Form["Selfas9"].ToString();
                at.Selfas10 = Request.Form["Selfas10"].ToString();
                at.Selfas11 = Request.Form["Selfas11"].ToString();
                at.Selfas12 = Request.Form["Selfas12"].ToString();
                at.Selfas13 = Request.Form["Selfas13"].ToString();
                at.Selfas14 = Request.Form["Selfas14"].ToString();
                at.Selfas15 = Request.Form["Selfas15"].ToString();
                at.Selfas16 = Request.Form["Selfas16"].ToString();
                at.Selfas17 = Request.Form["Selfas17"].ToString();
                at.Selfas18 = Request.Form["Selfas18"].ToString();
                at.Selfas19 = Request.Form["Selfas19"].ToString();
                at.Save();
                Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('����ɹ���');</script>");
            }
        }
Пример #5
0
 /// <summary>
 /// 批量装载
 /// </summary>
 internal static void LoadFromDALPatch(List< AssistantScoreInfo> pList, AssistantScoreCollection pCollection)
 {
     foreach (AssistantScore assistantScore in pCollection)
     {
         AssistantScoreInfo assistantScoreInfo = new AssistantScoreInfo();
         LoadFromDAL(assistantScoreInfo, assistantScore );
         pList.Add(assistantScoreInfo);
     }
 }
Пример #6
0
 //从后台获取数据
 internal static void LoadFromDAL(AssistantScoreInfo pAssistantScoreInfo, AssistantScore  pAssistantScore)
 {
     pAssistantScoreInfo.assistantScoreId = pAssistantScore.AssistantScoreId;
      		pAssistantScoreInfo.dateSpan = pAssistantScore.DateSpan;
      		pAssistantScoreInfo.evaluateLevelId = pAssistantScore.EvaluateLevelId;
      		pAssistantScoreInfo.totalScore = pAssistantScore.TotalScore;
      		pAssistantScoreInfo.upViews = pAssistantScore.UpViews;
      		pAssistantScoreInfo.yearId = pAssistantScore.YearId;
      		pAssistantScoreInfo.monthId = pAssistantScore.MonthId;
      		pAssistantScoreInfo.employeeId = pAssistantScore.EmployeeId;
      		pAssistantScoreInfo.isSubmit = pAssistantScore.IsSubmit;
      		pAssistantScoreInfo.selfas1 = pAssistantScore.Selfas1;
      		pAssistantScoreInfo.selfas2 = pAssistantScore.Selfas2;
      		pAssistantScoreInfo.selfas3 = pAssistantScore.Selfas3;
      		pAssistantScoreInfo.selfas4 = pAssistantScore.Selfas4;
      		pAssistantScoreInfo.selfas5 = pAssistantScore.Selfas5;
      		pAssistantScoreInfo.selfas6 = pAssistantScore.Selfas6;
      		pAssistantScoreInfo.selfas7 = pAssistantScore.Selfas7;
      		pAssistantScoreInfo.selfas8 = pAssistantScore.Selfas8;
      		pAssistantScoreInfo.selfas9 = pAssistantScore.Selfas9;
      		pAssistantScoreInfo.selfas10 = pAssistantScore.Selfas10;
      		pAssistantScoreInfo.selfas11 = pAssistantScore.Selfas11;
      		pAssistantScoreInfo.selfas12 = pAssistantScore.Selfas12;
      		pAssistantScoreInfo.selfas13 = pAssistantScore.Selfas13;
      		pAssistantScoreInfo.selfas14 = pAssistantScore.Selfas14;
      		pAssistantScoreInfo.selfas15 = pAssistantScore.Selfas15;
      		pAssistantScoreInfo.selfas16 = pAssistantScore.Selfas16;
      		pAssistantScoreInfo.selfas17 = pAssistantScore.Selfas17;
      		pAssistantScoreInfo.selfas18 = pAssistantScore.Selfas18;
      		pAssistantScoreInfo.selfas19 = pAssistantScore.Selfas19;
      		pAssistantScoreInfo.upas1 = pAssistantScore.Upas1;
      		pAssistantScoreInfo.upas2 = pAssistantScore.Upas2;
      		pAssistantScoreInfo.upas3 = pAssistantScore.Upas3;
      		pAssistantScoreInfo.upas4 = pAssistantScore.Upas4;
      		pAssistantScoreInfo.upas5 = pAssistantScore.Upas5;
      		pAssistantScoreInfo.upas6 = pAssistantScore.Upas6;
      		pAssistantScoreInfo.upas7 = pAssistantScore.Upas7;
      		pAssistantScoreInfo.upas8 = pAssistantScore.Upas8;
      		pAssistantScoreInfo.upas9 = pAssistantScore.Upas9;
      		pAssistantScoreInfo.upas10 = pAssistantScore.Upas10;
      		pAssistantScoreInfo.upas11 = pAssistantScore.Upas11;
      		pAssistantScoreInfo.upas12 = pAssistantScore.Upas12;
      		pAssistantScoreInfo.upas13 = pAssistantScore.Upas13;
      		pAssistantScoreInfo.upas14 = pAssistantScore.Upas14;
      		pAssistantScoreInfo.upas15 = pAssistantScore.Upas15;
      		pAssistantScoreInfo.upas16 = pAssistantScore.Upas16;
      		pAssistantScoreInfo.upas17 = pAssistantScore.Upas17;
      		pAssistantScoreInfo.upas18 = pAssistantScore.Upas18;
      		pAssistantScoreInfo.upas19 = pAssistantScore.Upas19;
      		pAssistantScoreInfo.secas1 = pAssistantScore.Secas1;
      		pAssistantScoreInfo.secas2 = pAssistantScore.Secas2;
      		pAssistantScoreInfo.secas3 = pAssistantScore.Secas3;
      		pAssistantScoreInfo.secas4 = pAssistantScore.Secas4;
      		pAssistantScoreInfo.secas5 = pAssistantScore.Secas5;
      		pAssistantScoreInfo.secas6 = pAssistantScore.Secas6;
      		pAssistantScoreInfo.secas7 = pAssistantScore.Secas7;
      		pAssistantScoreInfo.secas8 = pAssistantScore.Secas8;
      		pAssistantScoreInfo.secas9 = pAssistantScore.Secas9;
      		pAssistantScoreInfo.secas10 = pAssistantScore.Secas10;
      		pAssistantScoreInfo.secas11 = pAssistantScore.Secas11;
      		pAssistantScoreInfo.secas12 = pAssistantScore.Secas12;
      		pAssistantScoreInfo.secas13 = pAssistantScore.Secas13;
      		pAssistantScoreInfo.secas14 = pAssistantScore.Secas14;
      		pAssistantScoreInfo.secas15 = pAssistantScore.Secas15;
      		pAssistantScoreInfo.secas16 = pAssistantScore.Secas16;
      		pAssistantScoreInfo.secas17 = pAssistantScore.Secas17;
      		pAssistantScoreInfo.secas18 = pAssistantScore.Secas18;
      		pAssistantScoreInfo.secas19 = pAssistantScore.Secas19;
     pAssistantScoreInfo.Loaded=true;
 }
Пример #7
0
 /// <summary>
 /// 复制为另一个对象
 /// </summary>
 /// <param name="pIndustryTypeInfoTo"></param>
 public void CopyTo(AssistantScoreInfo pAssistantScoreInfoTo)
 {
     Copy(this,  pAssistantScoreInfoTo);
 }
Пример #8
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<AssistantScoreInfo> GetPagedList(int pPageIndex,int pPageSize,SortDirection pOrderBy,string pSortExpression,out int pRecordCount)
        {
            if(pPageIndex<=1)
            pPageIndex=1;
            List< AssistantScoreInfo> list = new List< AssistantScoreInfo>();

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

            foreach (AssistantScore  assistantScore  in collection)
            {
                AssistantScoreInfo assistantScoreInfo = new AssistantScoreInfo();
                LoadFromDAL(assistantScoreInfo,   assistantScore);
                list.Add(assistantScoreInfo);
            }
            pRecordCount=q.GetRecordCount();

            return list;
        }
Пример #9
0
 /// <summary>
 /// 获得数据列表
 /// </summary>
 /// <returns></returns>
 public static List<AssistantScoreInfo> GetList()
 {
     string cacheKey = GetCacheKey();
     //本实体已经注册成缓存实体,并且缓存存在的时候,直接从缓存取
     if (CachedEntityCommander.IsTypeRegistered(typeof(AssistantScoreInfo)) && CachedEntityCommander.GetCache(cacheKey) != null)
     {
         return CachedEntityCommander.GetCache(cacheKey) as List< AssistantScoreInfo>;
     }
     else
     {
         List< AssistantScoreInfo>  list =new List< AssistantScoreInfo>();
         AssistantScoreCollection  collection=new  AssistantScoreCollection();
         Query qry = new Query(AssistantScore.Schema);
         collection.LoadAndCloseReader(qry.ExecuteReader());
         foreach(AssistantScore assistantScore in collection)
         {
             AssistantScoreInfo assistantScoreInfo= new AssistantScoreInfo();
             LoadFromDAL(assistantScoreInfo,assistantScore);
             list.Add(assistantScoreInfo);
         }
       	//生成缓存
         if (CachedEntityCommander.IsTypeRegistered(typeof(AssistantScoreInfo)))
         {
             CachedEntityCommander.SetCache(cacheKey, list);
         }
         return list;
     }
 }
Пример #10
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);
                    AssistantScoreInfo ds = new AssistantScoreInfo(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;

                    }
                }
            }
        }
Пример #11
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            int asid = Convert.ToInt32(Request["AssistantScoreId"].ToString());
            AssistantScoreInfo at = new AssistantScoreInfo(asid);

            at.Upas1 = Request.Form["Upas1"].ToString();
            at.Upas2 = Request.Form["Upas2"].ToString();
            at.Upas3 = Request.Form["Upas3"].ToString();
            at.Upas4 = Request.Form["Upas4"].ToString();
            at.Upas5 = Request.Form["Upas5"].ToString();
            at.Upas6 = Request.Form["Upas6"].ToString();
            at.Upas7 = Request.Form["Upas7"].ToString();
            at.Upas8 = Request.Form["Upas8"].ToString();
            at.Upas9 = Request.Form["Upas9"].ToString();
            at.Upas10 = Request.Form["Upas10"].ToString();
            at.Upas11 = Request.Form["Upas11"].ToString();
            at.Upas12 = Request.Form["Upas12"].ToString();
            at.Upas13 = Request.Form["Upas13"].ToString();
            at.Upas14 = Request.Form["Upas14"].ToString();
            at.Upas15 = Request.Form["Upas15"].ToString();
            at.Upas16 = Request.Form["Upas16"].ToString();
            at.Upas17 = Request.Form["Upas17"].ToString();
            at.Upas18 = Request.Form["Upas18"].ToString();
            at.Upas19 = Request.Form["Upas19"].ToString();

            at.Secas1 = Convert.ToString(Math.Round(float.Parse(lblSelfas1.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upas1"].ToString()), 2) * 0.6);
            at.Secas2 = Convert.ToString(Math.Round(float.Parse(lblSelfas2.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upas2"].ToString()), 2) * 0.6);
            at.Secas3 = Convert.ToString(Math.Round(float.Parse(lblSelfas3.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upas3"].ToString()), 2) * 0.6);
            at.Secas4 = Convert.ToString(Math.Round(float.Parse(lblSelfas4.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upas4"].ToString()), 2) * 0.6);
            at.Secas5 = Convert.ToString(Math.Round(float.Parse(lblSelfas5.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upas5"].ToString()), 2) * 0.6);
            at.Secas6 = Convert.ToString(Math.Round(float.Parse(lblSelfas6.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upas6"].ToString()), 2) * 0.6);
            at.Secas7 = Convert.ToString(Math.Round(float.Parse(lblSelfas7.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upas7"].ToString()), 2) * 0.6);
            at.Secas8 = Convert.ToString(Math.Round(float.Parse(lblSelfas8.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upas8"].ToString()), 2) * 0.6);
            at.Secas9 = Convert.ToString(Math.Round(float.Parse(lblSelfas9.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upas9"].ToString()), 2) * 0.6);
            at.Secas10 = Convert.ToString(Math.Round(float.Parse(lblSelfas10.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upas10"].ToString()), 2) * 0.6);
            at.Secas11 = Convert.ToString(Math.Round(float.Parse(lblSelfas11.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upas11"].ToString()), 2) * 0.6);
            at.Secas12 = Convert.ToString(Math.Round(float.Parse(lblSelfas12.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upas12"].ToString()), 2) * 0.6);
            at.Secas13 = Convert.ToString(Math.Round(float.Parse(lblSelfas13.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upas13"].ToString()), 2) * 0.6);
            at.Secas14 = Convert.ToString(Math.Round(float.Parse(lblSelfas14.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upas14"].ToString()), 2) * 0.6);
            at.Secas15 = Convert.ToString(Math.Round(float.Parse(lblSelfas15.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upas15"].ToString()), 2) * 0.6);
            at.Secas16 = Convert.ToString(Math.Round(float.Parse(lblSelfas16.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upas16"].ToString()), 2) * 0.6);
            at.Secas17 = Convert.ToString(Math.Round(float.Parse(lblSelfas17.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upas17"].ToString()), 2) * 0.6);
            at.Secas18 = Convert.ToString(Math.Round(float.Parse(lblSelfas18.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upas18"].ToString()), 2) * 0.6);
            at.Secas19 = Convert.ToString(Math.Round(float.Parse(lblSelfas19.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upas19"].ToString()), 2) * 0.6);

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

            float Score = float.Parse(Request.Form["hid"].ToString());
            if (Score > 90)
            {
                at.EvaluateLevelId = 2;
            }
            else if (Score > 75 && Score < 90)
            {
                at.EvaluateLevelId = 3;
            }
            else if (Score > 60 && Score < 75)
            {
                at.EvaluateLevelId = 4;
            }
            else if (Score < 60)
            {
                at.EvaluateLevelId = 5;
            }
            at.IsSubmit = 2;
            at.UpViews = Request.Form["UpViews"].ToString();
            at.Save();
            Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('����ɹ���');</script>");
        }
Пример #12
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("lbtnEmployeeName") as LinkButton;
                    Button btnSubmit = e.Row.FindControl("btnSubmit") as Button;
                    if (lbtName.Text == "����")
                    {
                        int basid = Convert.ToInt32(gvScore.DataKeys[e.Row.RowIndex]["BasEmScoreId"].ToString());
                        BasEmScoreInfo bas = new BasEmScoreInfo(basid);
                        if (bas.IsSubmit == 2)
                        {
                            btnSubmit.Enabled = false;
                        }
                    }
                    else if (lbtName.Text == "����")
                    {
                        int fid = Convert.ToInt32(gvScore.DataKeys[e.Row.RowIndex]["FrontScoreId"].ToString());
                        FrontScoreInfo front = new FrontScoreInfo(fid);
                        if (front.IsSubmit == 2)
                        {
                            btnSubmit.Enabled = false;
                        }

                    }

                    else if (lbtName.Text == "����")
                    {
                        int aid = Convert.ToInt32(gvScore.DataKeys[e.Row.RowIndex]["AssistantScoreId"].ToString());
                        AssistantScoreInfo ass = new AssistantScoreInfo(aid);
                        if (ass.IsSubmit == 2)
                        {
                            btnSubmit.Enabled = false;
                        }
                    }
               // }
            }
        }
Пример #13
0
        protected void PageInit()
        {
            int asid = Convert.ToInt32(Request["AssistantScoreId"].ToString());
            AssistantScoreInfo at = new AssistantScoreInfo(asid);

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

            YearInfo year = new YearInfo(Convert.ToInt32(at.YearId));
            MonthInfo month = new MonthInfo(Convert.ToInt32(at.MonthId));
            lblDate.Text = year.YearName + "Äê" + month.MonthNames + "ÔÂ";

            lblSelfas1.Text = at.Selfas1.ToString();
            lblSelfas2.Text = at.Selfas2.ToString();
            lblSelfas3.Text = at.Selfas3.ToString();
            lblSelfas4.Text = at.Selfas4.ToString();
            lblSelfas5.Text = at.Selfas5.ToString();
            lblSelfas6.Text = at.Selfas6.ToString();
            lblSelfas7.Text = at.Selfas7.ToString();
            lblSelfas8.Text = at.Selfas8.ToString();
            lblSelfas9.Text = at.Selfas9.ToString();
            lblSelfas10.Text = at.Selfas10.ToString();
            lblSelfas11.Text = at.Selfas11.ToString();
            lblSelfas12.Text = at.Selfas12.ToString();
            lblSelfas13.Text = at.Selfas13.ToString();
            lblSelfas14.Text = at.Selfas14.ToString();
            lblSelfas15.Text = at.Selfas15.ToString();
            lblSelfas16.Text = at.Selfas16.ToString();
            lblSelfas17.Text = at.Selfas17.ToString();
            lblSelfas18.Text = at.Selfas18.ToString();
            lblSelfas19.Text = at.Selfas19.ToString();

            lblUpas1.Text = at.Upas1.ToString();
            lblUpas2.Text = at.Upas2.ToString();
            lblUpas3.Text = at.Upas3.ToString();
            lblUpas4.Text = at.Upas4.ToString();
            lblUpas5.Text = at.Upas5.ToString();
            lblUpas6.Text = at.Upas6.ToString();
            lblUpas7.Text = at.Upas7.ToString();
            lblUpas8.Text = at.Upas8.ToString();
            lblUpas9.Text = at.Upas9.ToString();
            lblUpas10.Text = at.Upas10.ToString();
            lblUpas11.Text = at.Upas11.ToString();
            lblUpas12.Text = at.Upas12.ToString();
            lblUpas13.Text = at.Upas13.ToString();
            lblUpas14.Text = at.Upas14.ToString();
            lblUpas15.Text = at.Upas15.ToString();
            lblUpas16.Text = at.Upas16.ToString();
            lblUpas17.Text = at.Upas17.ToString();
            lblUpas18.Text = at.Upas18.ToString();
            lblUpas19.Text = at.Upas19.ToString();

            lblSecas1.Text = at.Secas1.ToString();
            lblSecas2.Text = at.Secas2.ToString();
            lblSecas3.Text = at.Secas3.ToString();
            lblSecas4.Text = at.Secas4.ToString();
            lblSecas5.Text = at.Secas5.ToString();
            lblSecas6.Text = at.Secas6.ToString();
            lblSecas7.Text = at.Secas7.ToString();
            lblSecas8.Text = at.Secas8.ToString();
            lblSecas9.Text = at.Secas9.ToString();
            lblSecas10.Text = at.Secas10.ToString();
            lblSecas11.Text = at.Secas11.ToString();
            lblSecas12.Text = at.Secas12.ToString();
            lblSecas13.Text = at.Secas13.ToString();
            lblSecas14.Text = at.Secas14.ToString();
            lblSecas15.Text = at.Secas15.ToString();
            lblSecas16.Text = at.Secas16.ToString();
            lblSecas17.Text = at.Secas17.ToString();
            lblSecas18.Text = at.Secas18.ToString();
            lblSecas19.Text = at.Secas19.ToString();

            lblTotalScore.Text = at.TotalScore.ToString();
            if (at.EvaluateLevelId.ToString() != "")
            {
                EvaluateLevelInfo le = new EvaluateLevelInfo(Convert.ToInt32(at.EvaluateLevelId));
                lblLevel.Text = le.EvaluateName.ToString();
            }
            else
            {
                lblLevel.Text = "";
            }
            lblViews.Text = at.UpViews.ToString();
        }
Пример #14
0
        protected void PageInit()
        {
            int asid = Convert.ToInt32(Request["AsScoreId"].ToString());
            AssistantScoreInfo fs = new AssistantScoreInfo(asid);
            EmployeeInfo em = new EmployeeInfo(Convert.ToInt32(fs.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 = fs.YearId.ToString();
            ddlMonth.SelectedValue = fs.MonthId.ToString();

            Selfas1 = fs.Selfas1.ToString();
            Selfas2 = fs.Selfas2.ToString();
            Selfas3 = fs.Selfas3.ToString();
            Selfas4 = fs.Selfas4.ToString();
            Selfas5 = fs.Selfas5.ToString();
            Selfas6 = fs.Selfas6.ToString();
            Selfas7 = fs.Selfas7.ToString();
            Selfas8 = fs.Selfas8.ToString();
            Selfas9 = fs.Selfas9.ToString();
            Selfas10 = fs.Selfas10.ToString();
            Selfas11 = fs.Selfas11.ToString();
            Selfas12 = fs.Selfas12.ToString();
            Selfas13 = fs.Selfas13.ToString();
            Selfas14 = fs.Selfas14.ToString();
            Selfas15 = fs.Selfas15.ToString();
            Selfas16 = fs.Selfas16.ToString();
            Selfas17 = fs.Selfas17.ToString();
            Selfas18 = fs.Selfas18.ToString();
            Selfas19 = fs.Selfas19.ToString();
        }
Пример #15
0
 //数据持久化
 internal static void SaveToDb(AssistantScoreInfo pAssistantScoreInfo, AssistantScore  pAssistantScore,bool pIsNew)
 {
     pAssistantScore.AssistantScoreId = pAssistantScoreInfo.assistantScoreId;
      		pAssistantScore.DateSpan = pAssistantScoreInfo.dateSpan;
      		pAssistantScore.EvaluateLevelId = pAssistantScoreInfo.evaluateLevelId;
      		pAssistantScore.TotalScore = pAssistantScoreInfo.totalScore;
      		pAssistantScore.UpViews = pAssistantScoreInfo.upViews;
      		pAssistantScore.YearId = pAssistantScoreInfo.yearId;
      		pAssistantScore.MonthId = pAssistantScoreInfo.monthId;
      		pAssistantScore.EmployeeId = pAssistantScoreInfo.employeeId;
      		pAssistantScore.IsSubmit = pAssistantScoreInfo.isSubmit;
      		pAssistantScore.Selfas1 = pAssistantScoreInfo.selfas1;
      		pAssistantScore.Selfas2 = pAssistantScoreInfo.selfas2;
      		pAssistantScore.Selfas3 = pAssistantScoreInfo.selfas3;
      		pAssistantScore.Selfas4 = pAssistantScoreInfo.selfas4;
      		pAssistantScore.Selfas5 = pAssistantScoreInfo.selfas5;
      		pAssistantScore.Selfas6 = pAssistantScoreInfo.selfas6;
      		pAssistantScore.Selfas7 = pAssistantScoreInfo.selfas7;
      		pAssistantScore.Selfas8 = pAssistantScoreInfo.selfas8;
      		pAssistantScore.Selfas9 = pAssistantScoreInfo.selfas9;
      		pAssistantScore.Selfas10 = pAssistantScoreInfo.selfas10;
      		pAssistantScore.Selfas11 = pAssistantScoreInfo.selfas11;
      		pAssistantScore.Selfas12 = pAssistantScoreInfo.selfas12;
      		pAssistantScore.Selfas13 = pAssistantScoreInfo.selfas13;
      		pAssistantScore.Selfas14 = pAssistantScoreInfo.selfas14;
      		pAssistantScore.Selfas15 = pAssistantScoreInfo.selfas15;
      		pAssistantScore.Selfas16 = pAssistantScoreInfo.selfas16;
      		pAssistantScore.Selfas17 = pAssistantScoreInfo.selfas17;
      		pAssistantScore.Selfas18 = pAssistantScoreInfo.selfas18;
      		pAssistantScore.Selfas19 = pAssistantScoreInfo.selfas19;
      		pAssistantScore.Upas1 = pAssistantScoreInfo.upas1;
      		pAssistantScore.Upas2 = pAssistantScoreInfo.upas2;
      		pAssistantScore.Upas3 = pAssistantScoreInfo.upas3;
      		pAssistantScore.Upas4 = pAssistantScoreInfo.upas4;
      		pAssistantScore.Upas5 = pAssistantScoreInfo.upas5;
      		pAssistantScore.Upas6 = pAssistantScoreInfo.upas6;
      		pAssistantScore.Upas7 = pAssistantScoreInfo.upas7;
      		pAssistantScore.Upas8 = pAssistantScoreInfo.upas8;
      		pAssistantScore.Upas9 = pAssistantScoreInfo.upas9;
      		pAssistantScore.Upas10 = pAssistantScoreInfo.upas10;
      		pAssistantScore.Upas11 = pAssistantScoreInfo.upas11;
      		pAssistantScore.Upas12 = pAssistantScoreInfo.upas12;
      		pAssistantScore.Upas13 = pAssistantScoreInfo.upas13;
      		pAssistantScore.Upas14 = pAssistantScoreInfo.upas14;
      		pAssistantScore.Upas15 = pAssistantScoreInfo.upas15;
      		pAssistantScore.Upas16 = pAssistantScoreInfo.upas16;
      		pAssistantScore.Upas17 = pAssistantScoreInfo.upas17;
      		pAssistantScore.Upas18 = pAssistantScoreInfo.upas18;
      		pAssistantScore.Upas19 = pAssistantScoreInfo.upas19;
      		pAssistantScore.Secas1 = pAssistantScoreInfo.secas1;
      		pAssistantScore.Secas2 = pAssistantScoreInfo.secas2;
      		pAssistantScore.Secas3 = pAssistantScoreInfo.secas3;
      		pAssistantScore.Secas4 = pAssistantScoreInfo.secas4;
      		pAssistantScore.Secas5 = pAssistantScoreInfo.secas5;
      		pAssistantScore.Secas6 = pAssistantScoreInfo.secas6;
      		pAssistantScore.Secas7 = pAssistantScoreInfo.secas7;
      		pAssistantScore.Secas8 = pAssistantScoreInfo.secas8;
      		pAssistantScore.Secas9 = pAssistantScoreInfo.secas9;
      		pAssistantScore.Secas10 = pAssistantScoreInfo.secas10;
      		pAssistantScore.Secas11 = pAssistantScoreInfo.secas11;
      		pAssistantScore.Secas12 = pAssistantScoreInfo.secas12;
      		pAssistantScore.Secas13 = pAssistantScoreInfo.secas13;
      		pAssistantScore.Secas14 = pAssistantScoreInfo.secas14;
      		pAssistantScore.Secas15 = pAssistantScoreInfo.secas15;
      		pAssistantScore.Secas16 = pAssistantScoreInfo.secas16;
      		pAssistantScore.Secas17 = pAssistantScoreInfo.secas17;
      		pAssistantScore.Secas18 = pAssistantScoreInfo.secas18;
      		pAssistantScore.Secas19 = pAssistantScoreInfo.secas19;
     pAssistantScore.IsNew=pIsNew;
     string UserName = SubsonicHelper.GetUserName();
     try
     {
         pAssistantScore.Save(UserName);
     }
     catch(Exception ex)
     {
         LogManager.getInstance().getLogger(typeof(AssistantScoreInfo)).Error(ex);
         if(ex.Message.Contains("插入重复键"))//违反了唯一键
         {
             throw new AppException("此对象已经存在");//此处等待优化可以从唯一约束中直接取出提示来,如果没有的话,默认为原始的出错提示
         }
         throw new AppException("保存失败");
     }
     pAssistantScoreInfo.assistantScoreId = pAssistantScore.AssistantScoreId;
     //如果缓存存在,更新缓存
     if (CachedEntityCommander.IsTypeRegistered(typeof(AssistantScoreInfo)))
     {
         ResetCache();
     }
 }
 public void DeleteById(AssistantScoreInfo pAssistantScoreInfo)
 {
     AssistantScoreInfo assistantScoreInfo = new AssistantScoreInfo(pAssistantScoreInfo.AssistantScoreId);
     assistantScoreInfo.Delete();
 }
Пример #17
0
        protected void PageInit()
        {
            int asid = Convert.ToInt32(Request["AssistantScoreId"].ToString());
            AssistantScoreInfo at = new AssistantScoreInfo(asid);
            EmployeeInfo em = new EmployeeInfo(Convert.ToInt32(at.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();

            YearInfo year = new YearInfo(Convert.ToInt32(at.YearId));
            MonthInfo month = new MonthInfo(Convert.ToInt32(at.MonthId));
            lblDate.Text = year.YearName + "��" + month.MonthNames + "��";

            lblSelfas1.Text = at.Selfas1.ToString();
            lblSelfas2.Text = at.Selfas2.ToString();
            lblSelfas3.Text = at.Selfas3.ToString();
            lblSelfas4.Text = at.Selfas4.ToString();
            lblSelfas5.Text = at.Selfas5.ToString();
            lblSelfas6.Text = at.Selfas6.ToString();
            lblSelfas7.Text = at.Selfas7.ToString();
            lblSelfas8.Text = at.Selfas8.ToString();
            lblSelfas9.Text = at.Selfas9.ToString();
            lblSelfas10.Text = at.Selfas10.ToString();
            lblSelfas11.Text = at.Selfas11.ToString();
            lblSelfas12.Text = at.Selfas12.ToString();
            lblSelfas13.Text = at.Selfas13.ToString();
            lblSelfas14.Text = at.Selfas14.ToString();
            lblSelfas15.Text = at.Selfas15.ToString();
            lblSelfas16.Text = at.Selfas16.ToString();
            lblSelfas17.Text = at.Selfas17.ToString();
            lblSelfas18.Text = at.Selfas18.ToString();
            lblSelfas19.Text = at.Selfas19.ToString();
        }
 public object SaveAssistantScoreInfo(AssistantScoreInfo assistantScoreInfo)
 {
     assistantScoreInfo.Save();
     return assistantScoreInfo . AssistantScoreId;
 }
Пример #19
0
 /// <summary>
 /// 复制一个对象,采用硬编码的方式,避免反射的低效
 /// </summary>
 /// <param name="pIndustryTypeInfoFrom"></param>
 /// <param name="pIndustryTypeInfoTo"></param>
 public static void Copy(AssistantScoreInfo pAssistantScoreInfoFrom, AssistantScoreInfo pAssistantScoreInfoTo)
 {
     pAssistantScoreInfoTo.AssistantScoreId = pAssistantScoreInfoFrom.assistantScoreId;
      		pAssistantScoreInfoTo.DateSpan = pAssistantScoreInfoFrom.dateSpan;
      		pAssistantScoreInfoTo.EvaluateLevelId = pAssistantScoreInfoFrom.evaluateLevelId;
      		pAssistantScoreInfoTo.TotalScore = pAssistantScoreInfoFrom.totalScore;
      		pAssistantScoreInfoTo.UpViews = pAssistantScoreInfoFrom.upViews;
      		pAssistantScoreInfoTo.YearId = pAssistantScoreInfoFrom.yearId;
      		pAssistantScoreInfoTo.MonthId = pAssistantScoreInfoFrom.monthId;
      		pAssistantScoreInfoTo.EmployeeId = pAssistantScoreInfoFrom.employeeId;
      		pAssistantScoreInfoTo.IsSubmit = pAssistantScoreInfoFrom.isSubmit;
      		pAssistantScoreInfoTo.Selfas1 = pAssistantScoreInfoFrom.selfas1;
      		pAssistantScoreInfoTo.Selfas2 = pAssistantScoreInfoFrom.selfas2;
      		pAssistantScoreInfoTo.Selfas3 = pAssistantScoreInfoFrom.selfas3;
      		pAssistantScoreInfoTo.Selfas4 = pAssistantScoreInfoFrom.selfas4;
      		pAssistantScoreInfoTo.Selfas5 = pAssistantScoreInfoFrom.selfas5;
      		pAssistantScoreInfoTo.Selfas6 = pAssistantScoreInfoFrom.selfas6;
      		pAssistantScoreInfoTo.Selfas7 = pAssistantScoreInfoFrom.selfas7;
      		pAssistantScoreInfoTo.Selfas8 = pAssistantScoreInfoFrom.selfas8;
      		pAssistantScoreInfoTo.Selfas9 = pAssistantScoreInfoFrom.selfas9;
      		pAssistantScoreInfoTo.Selfas10 = pAssistantScoreInfoFrom.selfas10;
      		pAssistantScoreInfoTo.Selfas11 = pAssistantScoreInfoFrom.selfas11;
      		pAssistantScoreInfoTo.Selfas12 = pAssistantScoreInfoFrom.selfas12;
      		pAssistantScoreInfoTo.Selfas13 = pAssistantScoreInfoFrom.selfas13;
      		pAssistantScoreInfoTo.Selfas14 = pAssistantScoreInfoFrom.selfas14;
      		pAssistantScoreInfoTo.Selfas15 = pAssistantScoreInfoFrom.selfas15;
      		pAssistantScoreInfoTo.Selfas16 = pAssistantScoreInfoFrom.selfas16;
      		pAssistantScoreInfoTo.Selfas17 = pAssistantScoreInfoFrom.selfas17;
      		pAssistantScoreInfoTo.Selfas18 = pAssistantScoreInfoFrom.selfas18;
      		pAssistantScoreInfoTo.Selfas19 = pAssistantScoreInfoFrom.selfas19;
      		pAssistantScoreInfoTo.Upas1 = pAssistantScoreInfoFrom.upas1;
      		pAssistantScoreInfoTo.Upas2 = pAssistantScoreInfoFrom.upas2;
      		pAssistantScoreInfoTo.Upas3 = pAssistantScoreInfoFrom.upas3;
      		pAssistantScoreInfoTo.Upas4 = pAssistantScoreInfoFrom.upas4;
      		pAssistantScoreInfoTo.Upas5 = pAssistantScoreInfoFrom.upas5;
      		pAssistantScoreInfoTo.Upas6 = pAssistantScoreInfoFrom.upas6;
      		pAssistantScoreInfoTo.Upas7 = pAssistantScoreInfoFrom.upas7;
      		pAssistantScoreInfoTo.Upas8 = pAssistantScoreInfoFrom.upas8;
      		pAssistantScoreInfoTo.Upas9 = pAssistantScoreInfoFrom.upas9;
      		pAssistantScoreInfoTo.Upas10 = pAssistantScoreInfoFrom.upas10;
      		pAssistantScoreInfoTo.Upas11 = pAssistantScoreInfoFrom.upas11;
      		pAssistantScoreInfoTo.Upas12 = pAssistantScoreInfoFrom.upas12;
      		pAssistantScoreInfoTo.Upas13 = pAssistantScoreInfoFrom.upas13;
      		pAssistantScoreInfoTo.Upas14 = pAssistantScoreInfoFrom.upas14;
      		pAssistantScoreInfoTo.Upas15 = pAssistantScoreInfoFrom.upas15;
      		pAssistantScoreInfoTo.Upas16 = pAssistantScoreInfoFrom.upas16;
      		pAssistantScoreInfoTo.Upas17 = pAssistantScoreInfoFrom.upas17;
      		pAssistantScoreInfoTo.Upas18 = pAssistantScoreInfoFrom.upas18;
      		pAssistantScoreInfoTo.Upas19 = pAssistantScoreInfoFrom.upas19;
      		pAssistantScoreInfoTo.Secas1 = pAssistantScoreInfoFrom.secas1;
      		pAssistantScoreInfoTo.Secas2 = pAssistantScoreInfoFrom.secas2;
      		pAssistantScoreInfoTo.Secas3 = pAssistantScoreInfoFrom.secas3;
      		pAssistantScoreInfoTo.Secas4 = pAssistantScoreInfoFrom.secas4;
      		pAssistantScoreInfoTo.Secas5 = pAssistantScoreInfoFrom.secas5;
      		pAssistantScoreInfoTo.Secas6 = pAssistantScoreInfoFrom.secas6;
      		pAssistantScoreInfoTo.Secas7 = pAssistantScoreInfoFrom.secas7;
      		pAssistantScoreInfoTo.Secas8 = pAssistantScoreInfoFrom.secas8;
      		pAssistantScoreInfoTo.Secas9 = pAssistantScoreInfoFrom.secas9;
      		pAssistantScoreInfoTo.Secas10 = pAssistantScoreInfoFrom.secas10;
      		pAssistantScoreInfoTo.Secas11 = pAssistantScoreInfoFrom.secas11;
      		pAssistantScoreInfoTo.Secas12 = pAssistantScoreInfoFrom.secas12;
      		pAssistantScoreInfoTo.Secas13 = pAssistantScoreInfoFrom.secas13;
      		pAssistantScoreInfoTo.Secas14 = pAssistantScoreInfoFrom.secas14;
      		pAssistantScoreInfoTo.Secas15 = pAssistantScoreInfoFrom.secas15;
      		pAssistantScoreInfoTo.Secas16 = pAssistantScoreInfoFrom.secas16;
      		pAssistantScoreInfoTo.Secas17 = pAssistantScoreInfoFrom.secas17;
      		pAssistantScoreInfoTo.Secas18 = pAssistantScoreInfoFrom.secas18;
      		pAssistantScoreInfoTo.Secas19 = pAssistantScoreInfoFrom.secas19;
     pAssistantScoreInfoTo.Loaded=pAssistantScoreInfoFrom.Loaded;
 }