示例#1
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (IsPageValid())
            {
                int TesId = Convert.ToInt32(Request["TechMaScoreId"].ToString());
                TechMaScoreInfo tms = new TechMaScoreInfo(TesId);

                tms.DateSpan = ddlYear.SelectedItem.Text + "��" + ddlMonth.SelectedItem.Text + "��";
                tms.YearId = Convert.ToInt32(ddlYear.SelectedValue.ToString());
                tms.MonthId = Convert.ToInt32(ddlMonth.SelectedValue.ToString());
                tms.SelfScore1 = Request.Form["Project1"].ToString();
                tms.SelfScore2 = Request.Form["Project2"].ToString();
                tms.SelfScore3 = Request.Form["Project3"].ToString();
                tms.SelfScore4 = Request.Form["Project4"].ToString();
                tms.SelfScore5 = Request.Form["Project5"].ToString();
                tms.SelfScore6 = Request.Form["Project6"].ToString();
                tms.SelfScore7 = Request.Form["Project7"].ToString();
                tms.SelfScore8 = Request.Form["Project8"].ToString();
                tms.SelfScore9 = Request.Form["Project9"].ToString();
                tms.SelfScore10 = Request.Form["Project10"].ToString();
                tms.SelfScore11 = Request.Form["Project11"].ToString();
                tms.SelfScore12 = Request.Form["Project12"].ToString();
                tms.SelfScore13 = Request.Form["Project13"].ToString();
                tms.Save();
                Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('����ɹ���');</script>");
            }
        }
        protected void PageInit()
        {
            int tmsid = Convert.ToInt32(Request["TechMaScoreId"].ToString());
            TechMaScoreInfo tms = new TechMaScoreInfo(tmsid);

            lblSelfProject1.Text = tms.SelfScore1.ToString();
            lblSelfProject2.Text = tms.SelfScore2.ToString();
            lblSelfProject3.Text = tms.SelfScore3.ToString();
            lblSelfProject4.Text = tms.SelfScore4.ToString();
            lblSelfProject5.Text = tms.SelfScore5.ToString();
            lblSelfProject6.Text = tms.SelfScore6.ToString();
            lblSelfProject7.Text = tms.SelfScore7.ToString();
            lblSelfProject8.Text = tms.SelfScore8.ToString();
            lblSelfProject9.Text = tms.SelfScore9.ToString();
            lblSelfProject10.Text = tms.SelfScore10.ToString();
            lblSelfProject11.Text = tms.SelfScore11.ToString();
            lblSelfProject12.Text = tms.SelfScore12.ToString();
            lblSelfProject13.Text = tms.SelfScore13.ToString();

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

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

            EmployeeInfo em = new EmployeeInfo(Convert.ToInt32(tms.EmployeeId));
            lblName.Text = em.EmployeeName.ToString();
            PositionInfo position = new PositionInfo(Convert.ToInt32(Convert.ToInt32(em.PositionId)));
            lblPosition.Text = position.PositionName;
        }
示例#3
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 <TechMaScoreInfo> GetPagedList(int pPageIndex, int pPageSize, SortDirection pOrderBy, string pSortExpression, out int pRecordCount)
        {
            if (pPageIndex <= 1)
            {
                pPageIndex = 1;
            }
            List <TechMaScoreInfo> list = new List <TechMaScoreInfo>();

            Query q = TechMaScore.CreateQuery();

            q.PageIndex = pPageIndex;
            q.PageSize  = pPageSize;
            q.ORDER_BY(pSortExpression, pOrderBy.ToString());
            TechMaScoreCollection collection = new  TechMaScoreCollection();

            collection.LoadAndCloseReader(q.ExecuteReader());

            foreach (TechMaScore techMaScore  in collection)
            {
                TechMaScoreInfo techMaScoreInfo = new TechMaScoreInfo();
                LoadFromDAL(techMaScoreInfo, techMaScore);
                list.Add(techMaScoreInfo);
            }
            pRecordCount = q.GetRecordCount();

            return(list);
        }
示例#4
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        /// <returns></returns>
        public static List <TechMaScoreInfo> GetList()
        {
            string cacheKey = GetCacheKey();

            //本实体已经注册成缓存实体,并且缓存存在的时候,直接从缓存取
            if (CachedEntityCommander.IsTypeRegistered(typeof(TechMaScoreInfo)) && CachedEntityCommander.GetCache(cacheKey) != null)
            {
                return(CachedEntityCommander.GetCache(cacheKey) as List <TechMaScoreInfo>);
            }
            else
            {
                List <TechMaScoreInfo> list       = new List <TechMaScoreInfo>();
                TechMaScoreCollection  collection = new  TechMaScoreCollection();
                Query qry = new Query(TechMaScore.Schema);
                collection.LoadAndCloseReader(qry.ExecuteReader());
                foreach (TechMaScore techMaScore in collection)
                {
                    TechMaScoreInfo techMaScoreInfo = new TechMaScoreInfo();
                    LoadFromDAL(techMaScoreInfo, techMaScore);
                    list.Add(techMaScoreInfo);
                }
                //生成缓存
                if (CachedEntityCommander.IsTypeRegistered(typeof(TechMaScoreInfo)))
                {
                    CachedEntityCommander.SetCache(cacheKey, list);
                }
                return(list);
            }
        }
示例#5
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     if (ddlYear.SelectedValue == "" || ddlMonth.SelectedValue == "")
     {
         Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('��ѡ������ʱ�䣡');</script>");
     }
     else
     {
         int emid = Convert.ToInt32(Session["EmployeeId"]);
         TechMaScoreInfo tms = new TechMaScoreInfo();
         tms.EmployeeId = emid;
         tms.DateSpan = ddlYear.SelectedItem.Text + "��" + ddlMonth.SelectedItem.Text + "��";
         tms.YearId = Convert.ToInt32(ddlYear.SelectedValue.ToString());
         tms.MonthId = Convert.ToInt32(ddlMonth.SelectedValue.ToString());
         tms.SelfScore1 = Request.Form["Project1"].ToString();
         tms.SelfScore2 = Request.Form["Project2"].ToString();
         tms.SelfScore3 = Request.Form["Project3"].ToString();
         tms.SelfScore4 = Request.Form["Project4"].ToString();
         tms.SelfScore5 = Request.Form["Project5"].ToString();
         tms.SelfScore6 = Request.Form["Project6"].ToString();
         tms.SelfScore7 = Request.Form["Project7"].ToString();
         tms.SelfScore8 = Request.Form["Project8"].ToString();
         tms.SelfScore9 = Request.Form["Project9"].ToString();
         tms.SelfScore10 = Request.Form["Project10"].ToString();
         tms.SelfScore11 = Request.Form["Project11"].ToString();
         tms.SelfScore12 = Request.Form["Project12"].ToString();
         tms.SelfScore13 = Request.Form["Project13"].ToString();
         tms.EvaluateLevelId = 6;
         tms.IsSubmit = 0;
         tms.Save();
         Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('����ɹ���');</script>");
     }
 }
示例#6
0
 /// <summary>
 /// 批量装载
 /// </summary>
 internal static void LoadFromDALPatch(List <TechMaScoreInfo> pList, TechMaScoreCollection pCollection)
 {
     foreach (TechMaScore techMaScore in pCollection)
     {
         TechMaScoreInfo techMaScoreInfo = new TechMaScoreInfo();
         LoadFromDAL(techMaScoreInfo, techMaScore);
         pList.Add(techMaScoreInfo);
     }
 }
        protected void btnSave_Click(object sender, EventArgs e)
        {
            int tmsid = Convert.ToInt32(Request["TechMaScoreId"].ToString());
            TechMaScoreInfo tms = new TechMaScoreInfo(tmsid);

            tms.UpScore1 = Request.Form["project1"].ToString();
            tms.UpScore2 = Request.Form["project2"].ToString();
            tms.UpScore3 = Request.Form["project3"].ToString();
            tms.UpScore4 = Request.Form["project4"].ToString();
            tms.UpScore5 = Request.Form["project5"].ToString();
            tms.UpScore6 = Request.Form["project6"].ToString();
            tms.UpScore7 = Request.Form["project7"].ToString();
            tms.UpScore8 = Request.Form["project8"].ToString();
            tms.UpScore9 = Request.Form["project9"].ToString();
            tms.UpScore10 = Request.Form["project10"].ToString();
            tms.UpScore11 = Request.Form["project11"].ToString();
            tms.UpScore12 = Request.Form["project12"].ToString();
            tms.UpScore13 = Request.Form["project13"].ToString();

            tms.SectScore1 = Convert.ToString(Math.Round(float.Parse(lblSelfProject1.Text.ToString()),2) * 0.4 + Math.Round(float.Parse(Request.Form["project1"].ToString()), 2) * 0.6);
            tms.SectScore2 = Convert.ToString(Math.Round(float.Parse(lblSelfProject2.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["project2"].ToString()), 2) * 0.6);
            tms.SectScore3 = Convert.ToString(Math.Round(float.Parse(lblSelfProject3.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["project3"].ToString()), 2) * 0.6);
            tms.SectScore4 = Convert.ToString(Math.Round(float.Parse(lblSelfProject4.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["project4"].ToString()), 2) * 0.6);
            tms.SectScore5 = Convert.ToString(Math.Round(float.Parse(lblSelfProject5.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["project5"].ToString()), 2) * 0.6);
            tms.SectScore6 = Convert.ToString(Math.Round(float.Parse(lblSelfProject6.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["project6"].ToString()), 2) * 0.6);
            tms.SectScore7 = Convert.ToString(Math.Round(float.Parse(lblSelfProject7.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["project7"].ToString()), 2) * 0.6);
            tms.SectScore8 = Convert.ToString(Math.Round(float.Parse(lblSelfProject8.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["project8"].ToString()), 2) * 0.6);
            tms.SectScore9 = Convert.ToString(Math.Round(float.Parse(lblSelfProject9.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["project9"].ToString()), 2) * 0.6);
            tms.SectScore10 = Convert.ToString(Math.Round(float.Parse(lblSelfProject10.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["project10"].ToString()), 2) * 0.6);
            tms.SectScore11 = Convert.ToString(Math.Round(float.Parse(lblSelfProject11.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["project11"].ToString()), 2) * 0.6);
            tms.SectScore12 = Convert.ToString(Math.Round(float.Parse(lblSelfProject12.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["project12"].ToString()), 2) * 0.6);
            tms.SectScore13 = Convert.ToString(Math.Round(float.Parse(lblSelfProject13.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["project13"].ToString()), 2) * 0.6);

            tms.TotalScore = Request.Form["hid"].ToString();
            tms.UpView = Request.Form["tViews"].ToString();

            float Score =float.Parse(Request.Form["hid"].ToString());
            if (Score > 90)
            {
                tms.EvaluateLevelId = 2;
            }
            else if (Score > 75 && Score < 90)
            {
                tms.EvaluateLevelId = 3;
            }
            else if (Score > 60 && Score < 75)
            {
                tms.EvaluateLevelId = 4;
            }
            else if (Score < 60)
            {
                tms.EvaluateLevelId = 5;
            }
            tms.IsSubmit = 2;
            tms.Save();
            Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('����ɹ���');</script>");
        }
示例#8
0
 /// <summary>
 /// 复制一个对象,采用硬编码的方式,避免反射的低效
 /// </summary>
 /// <param name="pIndustryTypeInfoFrom"></param>
 /// <param name="pIndustryTypeInfoTo"></param>
 public static void Copy(TechMaScoreInfo pTechMaScoreInfoFrom, TechMaScoreInfo pTechMaScoreInfoTo)
 {
     pTechMaScoreInfoTo.TechMaScoreId   = pTechMaScoreInfoFrom.techMaScoreId;
     pTechMaScoreInfoTo.Reason          = pTechMaScoreInfoFrom.reason;
     pTechMaScoreInfoTo.AddMinusScore   = pTechMaScoreInfoFrom.addMinusScore;
     pTechMaScoreInfoTo.TotalScore      = pTechMaScoreInfoFrom.totalScore;
     pTechMaScoreInfoTo.UpView          = pTechMaScoreInfoFrom.upView;
     pTechMaScoreInfoTo.EvaluateLevelId = pTechMaScoreInfoFrom.evaluateLevelId;
     pTechMaScoreInfoTo.YearId          = pTechMaScoreInfoFrom.yearId;
     pTechMaScoreInfoTo.MonthId         = pTechMaScoreInfoFrom.monthId;
     pTechMaScoreInfoTo.DateSpan        = pTechMaScoreInfoFrom.dateSpan;
     pTechMaScoreInfoTo.EmployeeId      = pTechMaScoreInfoFrom.employeeId;
     pTechMaScoreInfoTo.IsSubmit        = pTechMaScoreInfoFrom.isSubmit;
     pTechMaScoreInfoTo.SelfScore1      = pTechMaScoreInfoFrom.selfScore1;
     pTechMaScoreInfoTo.SelfScore2      = pTechMaScoreInfoFrom.selfScore2;
     pTechMaScoreInfoTo.SelfScore3      = pTechMaScoreInfoFrom.selfScore3;
     pTechMaScoreInfoTo.SelfScore4      = pTechMaScoreInfoFrom.selfScore4;
     pTechMaScoreInfoTo.SelfScore5      = pTechMaScoreInfoFrom.selfScore5;
     pTechMaScoreInfoTo.SelfScore6      = pTechMaScoreInfoFrom.selfScore6;
     pTechMaScoreInfoTo.SelfScore7      = pTechMaScoreInfoFrom.selfScore7;
     pTechMaScoreInfoTo.SelfScore8      = pTechMaScoreInfoFrom.selfScore8;
     pTechMaScoreInfoTo.SelfScore9      = pTechMaScoreInfoFrom.selfScore9;
     pTechMaScoreInfoTo.SelfScore10     = pTechMaScoreInfoFrom.selfScore10;
     pTechMaScoreInfoTo.SelfScore11     = pTechMaScoreInfoFrom.selfScore11;
     pTechMaScoreInfoTo.SelfScore12     = pTechMaScoreInfoFrom.selfScore12;
     pTechMaScoreInfoTo.SelfScore13     = pTechMaScoreInfoFrom.selfScore13;
     pTechMaScoreInfoTo.UpScore1        = pTechMaScoreInfoFrom.upScore1;
     pTechMaScoreInfoTo.UpScore2        = pTechMaScoreInfoFrom.upScore2;
     pTechMaScoreInfoTo.UpScore3        = pTechMaScoreInfoFrom.upScore3;
     pTechMaScoreInfoTo.UpScore4        = pTechMaScoreInfoFrom.upScore4;
     pTechMaScoreInfoTo.UpScore5        = pTechMaScoreInfoFrom.upScore5;
     pTechMaScoreInfoTo.UpScore6        = pTechMaScoreInfoFrom.upScore6;
     pTechMaScoreInfoTo.UpScore7        = pTechMaScoreInfoFrom.upScore7;
     pTechMaScoreInfoTo.UpScore8        = pTechMaScoreInfoFrom.upScore8;
     pTechMaScoreInfoTo.UpScore9        = pTechMaScoreInfoFrom.upScore9;
     pTechMaScoreInfoTo.UpScore10       = pTechMaScoreInfoFrom.upScore10;
     pTechMaScoreInfoTo.UpScore11       = pTechMaScoreInfoFrom.upScore11;
     pTechMaScoreInfoTo.UpScore12       = pTechMaScoreInfoFrom.upScore12;
     pTechMaScoreInfoTo.UpScore13       = pTechMaScoreInfoFrom.upScore13;
     pTechMaScoreInfoTo.SectScore1      = pTechMaScoreInfoFrom.sectScore1;
     pTechMaScoreInfoTo.SectScore2      = pTechMaScoreInfoFrom.sectScore2;
     pTechMaScoreInfoTo.SectScore3      = pTechMaScoreInfoFrom.sectScore3;
     pTechMaScoreInfoTo.SectScore4      = pTechMaScoreInfoFrom.sectScore4;
     pTechMaScoreInfoTo.SectScore5      = pTechMaScoreInfoFrom.sectScore5;
     pTechMaScoreInfoTo.SectScore6      = pTechMaScoreInfoFrom.sectScore6;
     pTechMaScoreInfoTo.SectScore7      = pTechMaScoreInfoFrom.sectScore7;
     pTechMaScoreInfoTo.SectScore8      = pTechMaScoreInfoFrom.sectScore8;
     pTechMaScoreInfoTo.SectScore9      = pTechMaScoreInfoFrom.sectScore9;
     pTechMaScoreInfoTo.SectScore10     = pTechMaScoreInfoFrom.sectScore10;
     pTechMaScoreInfoTo.SectScore11     = pTechMaScoreInfoFrom.sectScore11;
     pTechMaScoreInfoTo.SectScore12     = pTechMaScoreInfoFrom.sectScore12;
     pTechMaScoreInfoTo.SectScore13     = pTechMaScoreInfoFrom.sectScore13;
     pTechMaScoreInfoTo.Loaded          = pTechMaScoreInfoFrom.Loaded;
 }
示例#9
0
 //从后台获取数据
 internal static void  LoadFromDAL(TechMaScoreInfo pTechMaScoreInfo, TechMaScore pTechMaScore)
 {
     pTechMaScoreInfo.techMaScoreId   = pTechMaScore.TechMaScoreId;
     pTechMaScoreInfo.reason          = pTechMaScore.Reason;
     pTechMaScoreInfo.addMinusScore   = pTechMaScore.AddMinusScore;
     pTechMaScoreInfo.totalScore      = pTechMaScore.TotalScore;
     pTechMaScoreInfo.upView          = pTechMaScore.UpView;
     pTechMaScoreInfo.evaluateLevelId = pTechMaScore.EvaluateLevelId;
     pTechMaScoreInfo.yearId          = pTechMaScore.YearId;
     pTechMaScoreInfo.monthId         = pTechMaScore.MonthId;
     pTechMaScoreInfo.dateSpan        = pTechMaScore.DateSpan;
     pTechMaScoreInfo.employeeId      = pTechMaScore.EmployeeId;
     pTechMaScoreInfo.isSubmit        = pTechMaScore.IsSubmit;
     pTechMaScoreInfo.selfScore1      = pTechMaScore.SelfScore1;
     pTechMaScoreInfo.selfScore2      = pTechMaScore.SelfScore2;
     pTechMaScoreInfo.selfScore3      = pTechMaScore.SelfScore3;
     pTechMaScoreInfo.selfScore4      = pTechMaScore.SelfScore4;
     pTechMaScoreInfo.selfScore5      = pTechMaScore.SelfScore5;
     pTechMaScoreInfo.selfScore6      = pTechMaScore.SelfScore6;
     pTechMaScoreInfo.selfScore7      = pTechMaScore.SelfScore7;
     pTechMaScoreInfo.selfScore8      = pTechMaScore.SelfScore8;
     pTechMaScoreInfo.selfScore9      = pTechMaScore.SelfScore9;
     pTechMaScoreInfo.selfScore10     = pTechMaScore.SelfScore10;
     pTechMaScoreInfo.selfScore11     = pTechMaScore.SelfScore11;
     pTechMaScoreInfo.selfScore12     = pTechMaScore.SelfScore12;
     pTechMaScoreInfo.selfScore13     = pTechMaScore.SelfScore13;
     pTechMaScoreInfo.upScore1        = pTechMaScore.UpScore1;
     pTechMaScoreInfo.upScore2        = pTechMaScore.UpScore2;
     pTechMaScoreInfo.upScore3        = pTechMaScore.UpScore3;
     pTechMaScoreInfo.upScore4        = pTechMaScore.UpScore4;
     pTechMaScoreInfo.upScore5        = pTechMaScore.UpScore5;
     pTechMaScoreInfo.upScore6        = pTechMaScore.UpScore6;
     pTechMaScoreInfo.upScore7        = pTechMaScore.UpScore7;
     pTechMaScoreInfo.upScore8        = pTechMaScore.UpScore8;
     pTechMaScoreInfo.upScore9        = pTechMaScore.UpScore9;
     pTechMaScoreInfo.upScore10       = pTechMaScore.UpScore10;
     pTechMaScoreInfo.upScore11       = pTechMaScore.UpScore11;
     pTechMaScoreInfo.upScore12       = pTechMaScore.UpScore12;
     pTechMaScoreInfo.upScore13       = pTechMaScore.UpScore13;
     pTechMaScoreInfo.sectScore1      = pTechMaScore.SectScore1;
     pTechMaScoreInfo.sectScore2      = pTechMaScore.SectScore2;
     pTechMaScoreInfo.sectScore3      = pTechMaScore.SectScore3;
     pTechMaScoreInfo.sectScore4      = pTechMaScore.SectScore4;
     pTechMaScoreInfo.sectScore5      = pTechMaScore.SectScore5;
     pTechMaScoreInfo.sectScore6      = pTechMaScore.SectScore6;
     pTechMaScoreInfo.sectScore7      = pTechMaScore.SectScore7;
     pTechMaScoreInfo.sectScore8      = pTechMaScore.SectScore8;
     pTechMaScoreInfo.sectScore9      = pTechMaScore.SectScore9;
     pTechMaScoreInfo.sectScore10     = pTechMaScore.SectScore10;
     pTechMaScoreInfo.sectScore11     = pTechMaScore.SectScore11;
     pTechMaScoreInfo.sectScore12     = pTechMaScore.SectScore12;
     pTechMaScoreInfo.sectScore13     = pTechMaScore.SectScore13;
     pTechMaScoreInfo.Loaded          = true;
 }
示例#10
0
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     int TechMaScoreId = Convert.ToInt32(((Button)sender).CommandArgument.ToString());
     TechMaScoreInfo tms = new TechMaScoreInfo(TechMaScoreId);
     tms.IsSubmit = 1;
     int recvid = Convert.ToInt32(Common.getEmployeeIdOfManager());
     EmployeeInfo em = new EmployeeInfo(Convert.ToInt32(tms.EmployeeId));
     EmployeeInfo ems = new EmployeeInfo(recvid);
     MessageInfo.Msgs1(recvid, tms.TechMaScoreId, "~/Score/TechMaScoreApprove.aspx", em.EmployeeName + "����������", em.EmployeeName, "daiban", em.EmployeeName + "����������");
     //MessageInfo.SendMail(ems.Qq, "����������", em.EmployeeName + "����������");
     tms.Save();
     gvDataBind();
 }
        public TechMaScoreInfo GetTechMaScoreInfoById(int TechMaScoreId)
        {
            TechMaScoreInfo techMaScoreInfo = null;             //

            try
            {
                techMaScoreInfo = new TechMaScoreInfo(TechMaScoreId);
            }
            catch (AppException)
            {
                return(null);
            }

            return(techMaScoreInfo);
        }
        public TechMaScoreInfo GetTechMaScoreInfoById(int TechMaScoreId)
        {
            TechMaScoreInfo techMaScoreInfo  = null;//
            try
            {
                 techMaScoreInfo = new TechMaScoreInfo(TechMaScoreId);

            }
            catch (AppException)
            {
                return null;
            }

            return  techMaScoreInfo;
        }
示例#13
0
 private void LoadFromId(int techMaScoreId)
 {
     if (CachedEntityCommander.IsTypeRegistered(typeof(TechMaScoreInfo)))
     {
         TechMaScoreInfo techMaScoreInfo = Find(GetList(), techMaScoreId);
         if (techMaScoreInfo == null)
         {
             throw new AppException("未能在缓存中找到相应的键值对象");
         }
         Copy(techMaScoreInfo, this);
     }
     else
     {
         TechMaScore techMaScore = new TechMaScore(techMaScoreId);
         if (techMaScore.IsNew)
         {
             throw new AppException("尚未初始化");
         }
         LoadFromDAL(this, techMaScore);
     }
 }
示例#14
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("lbtnName") as LinkButton;
                    Button btnSubmit = e.Row.FindControl("btnSubmit") as Button;
                    if (lbtName.Text == "���")
                    {
                        int basid = Convert.ToInt32(gvScore.DataKeys[e.Row.RowIndex]["TechMaScoreId"].ToString());
                        TechMaScoreInfo bas = new TechMaScoreInfo(basid);
                        if (bas.IsSubmit == 2)
                        {
                            btnSubmit.Enabled = false;
                        }
                    }
                    else if (lbtName.Text == "�δ�")
                    {
                        int fid = Convert.ToInt32(gvScore.DataKeys[e.Row.RowIndex]["MarketScoreId"].ToString());
                        MarketScoreInfo ma = new MarketScoreInfo(fid);
                        if (ma.IsSubmit == 2)
                        {
                            btnSubmit.Enabled = false;
                        }

                    }

                //}
               }
        }
 public object SaveTechMaScoreInfo(TechMaScoreInfo techMaScoreInfo)
 {
     techMaScoreInfo.Save();
     return techMaScoreInfo . TechMaScoreId;
 }
示例#16
0
 /// <summary>
 /// 批量装载
 /// </summary>
 internal static void LoadFromDALPatch(List< TechMaScoreInfo> pList, TechMaScoreCollection pCollection)
 {
     foreach (TechMaScore techMaScore in pCollection)
     {
         TechMaScoreInfo techMaScoreInfo = new TechMaScoreInfo();
         LoadFromDAL(techMaScoreInfo, techMaScore );
         pList.Add(techMaScoreInfo);
     }
 }
示例#17
0
 //数据持久化
 internal static void SaveToDb(TechMaScoreInfo pTechMaScoreInfo, TechMaScore  pTechMaScore,bool pIsNew)
 {
     pTechMaScore.TechMaScoreId = pTechMaScoreInfo.techMaScoreId;
      		pTechMaScore.Reason = pTechMaScoreInfo.reason;
      		pTechMaScore.AddMinusScore = pTechMaScoreInfo.addMinusScore;
      		pTechMaScore.TotalScore = pTechMaScoreInfo.totalScore;
      		pTechMaScore.UpView = pTechMaScoreInfo.upView;
      		pTechMaScore.EvaluateLevelId = pTechMaScoreInfo.evaluateLevelId;
      		pTechMaScore.YearId = pTechMaScoreInfo.yearId;
      		pTechMaScore.MonthId = pTechMaScoreInfo.monthId;
      		pTechMaScore.DateSpan = pTechMaScoreInfo.dateSpan;
      		pTechMaScore.EmployeeId = pTechMaScoreInfo.employeeId;
      		pTechMaScore.IsSubmit = pTechMaScoreInfo.isSubmit;
      		pTechMaScore.SelfScore1 = pTechMaScoreInfo.selfScore1;
      		pTechMaScore.SelfScore2 = pTechMaScoreInfo.selfScore2;
      		pTechMaScore.SelfScore3 = pTechMaScoreInfo.selfScore3;
      		pTechMaScore.SelfScore4 = pTechMaScoreInfo.selfScore4;
      		pTechMaScore.SelfScore5 = pTechMaScoreInfo.selfScore5;
      		pTechMaScore.SelfScore6 = pTechMaScoreInfo.selfScore6;
      		pTechMaScore.SelfScore7 = pTechMaScoreInfo.selfScore7;
      		pTechMaScore.SelfScore8 = pTechMaScoreInfo.selfScore8;
      		pTechMaScore.SelfScore9 = pTechMaScoreInfo.selfScore9;
      		pTechMaScore.SelfScore10 = pTechMaScoreInfo.selfScore10;
      		pTechMaScore.SelfScore11 = pTechMaScoreInfo.selfScore11;
      		pTechMaScore.SelfScore12 = pTechMaScoreInfo.selfScore12;
      		pTechMaScore.SelfScore13 = pTechMaScoreInfo.selfScore13;
      		pTechMaScore.UpScore1 = pTechMaScoreInfo.upScore1;
      		pTechMaScore.UpScore2 = pTechMaScoreInfo.upScore2;
      		pTechMaScore.UpScore3 = pTechMaScoreInfo.upScore3;
      		pTechMaScore.UpScore4 = pTechMaScoreInfo.upScore4;
      		pTechMaScore.UpScore5 = pTechMaScoreInfo.upScore5;
      		pTechMaScore.UpScore6 = pTechMaScoreInfo.upScore6;
      		pTechMaScore.UpScore7 = pTechMaScoreInfo.upScore7;
      		pTechMaScore.UpScore8 = pTechMaScoreInfo.upScore8;
      		pTechMaScore.UpScore9 = pTechMaScoreInfo.upScore9;
      		pTechMaScore.UpScore10 = pTechMaScoreInfo.upScore10;
      		pTechMaScore.UpScore11 = pTechMaScoreInfo.upScore11;
      		pTechMaScore.UpScore12 = pTechMaScoreInfo.upScore12;
      		pTechMaScore.UpScore13 = pTechMaScoreInfo.upScore13;
      		pTechMaScore.SectScore1 = pTechMaScoreInfo.sectScore1;
      		pTechMaScore.SectScore2 = pTechMaScoreInfo.sectScore2;
      		pTechMaScore.SectScore3 = pTechMaScoreInfo.sectScore3;
      		pTechMaScore.SectScore4 = pTechMaScoreInfo.sectScore4;
      		pTechMaScore.SectScore5 = pTechMaScoreInfo.sectScore5;
      		pTechMaScore.SectScore6 = pTechMaScoreInfo.sectScore6;
      		pTechMaScore.SectScore7 = pTechMaScoreInfo.sectScore7;
      		pTechMaScore.SectScore8 = pTechMaScoreInfo.sectScore8;
      		pTechMaScore.SectScore9 = pTechMaScoreInfo.sectScore9;
      		pTechMaScore.SectScore10 = pTechMaScoreInfo.sectScore10;
      		pTechMaScore.SectScore11 = pTechMaScoreInfo.sectScore11;
      		pTechMaScore.SectScore12 = pTechMaScoreInfo.sectScore12;
      		pTechMaScore.SectScore13 = pTechMaScoreInfo.sectScore13;
     pTechMaScore.IsNew=pIsNew;
     string UserName = SubsonicHelper.GetUserName();
     try
     {
         pTechMaScore.Save(UserName);
     }
     catch(Exception ex)
     {
         LogManager.getInstance().getLogger(typeof(TechMaScoreInfo)).Error(ex);
         if(ex.Message.Contains("插入重复键"))//违反了唯一键
         {
             throw new AppException("此对象已经存在");//此处等待优化可以从唯一约束中直接取出提示来,如果没有的话,默认为原始的出错提示
         }
         throw new AppException("保存失败");
     }
     pTechMaScoreInfo.techMaScoreId = pTechMaScore.TechMaScoreId;
     //如果缓存存在,更新缓存
     if (CachedEntityCommander.IsTypeRegistered(typeof(TechMaScoreInfo)))
     {
         ResetCache();
     }
 }
示例#18
0
 /// <summary>
 /// 复制一个对象,采用硬编码的方式,避免反射的低效
 /// </summary>
 /// <param name="pIndustryTypeInfoFrom"></param>
 /// <param name="pIndustryTypeInfoTo"></param>
 public static void Copy(TechMaScoreInfo pTechMaScoreInfoFrom, TechMaScoreInfo pTechMaScoreInfoTo)
 {
     pTechMaScoreInfoTo.TechMaScoreId = pTechMaScoreInfoFrom.techMaScoreId;
      		pTechMaScoreInfoTo.Reason = pTechMaScoreInfoFrom.reason;
      		pTechMaScoreInfoTo.AddMinusScore = pTechMaScoreInfoFrom.addMinusScore;
      		pTechMaScoreInfoTo.TotalScore = pTechMaScoreInfoFrom.totalScore;
      		pTechMaScoreInfoTo.UpView = pTechMaScoreInfoFrom.upView;
      		pTechMaScoreInfoTo.EvaluateLevelId = pTechMaScoreInfoFrom.evaluateLevelId;
      		pTechMaScoreInfoTo.YearId = pTechMaScoreInfoFrom.yearId;
      		pTechMaScoreInfoTo.MonthId = pTechMaScoreInfoFrom.monthId;
      		pTechMaScoreInfoTo.DateSpan = pTechMaScoreInfoFrom.dateSpan;
      		pTechMaScoreInfoTo.EmployeeId = pTechMaScoreInfoFrom.employeeId;
      		pTechMaScoreInfoTo.IsSubmit = pTechMaScoreInfoFrom.isSubmit;
      		pTechMaScoreInfoTo.SelfScore1 = pTechMaScoreInfoFrom.selfScore1;
      		pTechMaScoreInfoTo.SelfScore2 = pTechMaScoreInfoFrom.selfScore2;
      		pTechMaScoreInfoTo.SelfScore3 = pTechMaScoreInfoFrom.selfScore3;
      		pTechMaScoreInfoTo.SelfScore4 = pTechMaScoreInfoFrom.selfScore4;
      		pTechMaScoreInfoTo.SelfScore5 = pTechMaScoreInfoFrom.selfScore5;
      		pTechMaScoreInfoTo.SelfScore6 = pTechMaScoreInfoFrom.selfScore6;
      		pTechMaScoreInfoTo.SelfScore7 = pTechMaScoreInfoFrom.selfScore7;
      		pTechMaScoreInfoTo.SelfScore8 = pTechMaScoreInfoFrom.selfScore8;
      		pTechMaScoreInfoTo.SelfScore9 = pTechMaScoreInfoFrom.selfScore9;
      		pTechMaScoreInfoTo.SelfScore10 = pTechMaScoreInfoFrom.selfScore10;
      		pTechMaScoreInfoTo.SelfScore11 = pTechMaScoreInfoFrom.selfScore11;
      		pTechMaScoreInfoTo.SelfScore12 = pTechMaScoreInfoFrom.selfScore12;
      		pTechMaScoreInfoTo.SelfScore13 = pTechMaScoreInfoFrom.selfScore13;
      		pTechMaScoreInfoTo.UpScore1 = pTechMaScoreInfoFrom.upScore1;
      		pTechMaScoreInfoTo.UpScore2 = pTechMaScoreInfoFrom.upScore2;
      		pTechMaScoreInfoTo.UpScore3 = pTechMaScoreInfoFrom.upScore3;
      		pTechMaScoreInfoTo.UpScore4 = pTechMaScoreInfoFrom.upScore4;
      		pTechMaScoreInfoTo.UpScore5 = pTechMaScoreInfoFrom.upScore5;
      		pTechMaScoreInfoTo.UpScore6 = pTechMaScoreInfoFrom.upScore6;
      		pTechMaScoreInfoTo.UpScore7 = pTechMaScoreInfoFrom.upScore7;
      		pTechMaScoreInfoTo.UpScore8 = pTechMaScoreInfoFrom.upScore8;
      		pTechMaScoreInfoTo.UpScore9 = pTechMaScoreInfoFrom.upScore9;
      		pTechMaScoreInfoTo.UpScore10 = pTechMaScoreInfoFrom.upScore10;
      		pTechMaScoreInfoTo.UpScore11 = pTechMaScoreInfoFrom.upScore11;
      		pTechMaScoreInfoTo.UpScore12 = pTechMaScoreInfoFrom.upScore12;
      		pTechMaScoreInfoTo.UpScore13 = pTechMaScoreInfoFrom.upScore13;
      		pTechMaScoreInfoTo.SectScore1 = pTechMaScoreInfoFrom.sectScore1;
      		pTechMaScoreInfoTo.SectScore2 = pTechMaScoreInfoFrom.sectScore2;
      		pTechMaScoreInfoTo.SectScore3 = pTechMaScoreInfoFrom.sectScore3;
      		pTechMaScoreInfoTo.SectScore4 = pTechMaScoreInfoFrom.sectScore4;
      		pTechMaScoreInfoTo.SectScore5 = pTechMaScoreInfoFrom.sectScore5;
      		pTechMaScoreInfoTo.SectScore6 = pTechMaScoreInfoFrom.sectScore6;
      		pTechMaScoreInfoTo.SectScore7 = pTechMaScoreInfoFrom.sectScore7;
      		pTechMaScoreInfoTo.SectScore8 = pTechMaScoreInfoFrom.sectScore8;
      		pTechMaScoreInfoTo.SectScore9 = pTechMaScoreInfoFrom.sectScore9;
      		pTechMaScoreInfoTo.SectScore10 = pTechMaScoreInfoFrom.sectScore10;
      		pTechMaScoreInfoTo.SectScore11 = pTechMaScoreInfoFrom.sectScore11;
      		pTechMaScoreInfoTo.SectScore12 = pTechMaScoreInfoFrom.sectScore12;
      		pTechMaScoreInfoTo.SectScore13 = pTechMaScoreInfoFrom.sectScore13;
     pTechMaScoreInfoTo.Loaded=pTechMaScoreInfoFrom.Loaded;
 }
示例#19
0
        //数据持久化
        internal static void  SaveToDb(TechMaScoreInfo pTechMaScoreInfo, TechMaScore pTechMaScore, bool pIsNew)
        {
            pTechMaScore.TechMaScoreId   = pTechMaScoreInfo.techMaScoreId;
            pTechMaScore.Reason          = pTechMaScoreInfo.reason;
            pTechMaScore.AddMinusScore   = pTechMaScoreInfo.addMinusScore;
            pTechMaScore.TotalScore      = pTechMaScoreInfo.totalScore;
            pTechMaScore.UpView          = pTechMaScoreInfo.upView;
            pTechMaScore.EvaluateLevelId = pTechMaScoreInfo.evaluateLevelId;
            pTechMaScore.YearId          = pTechMaScoreInfo.yearId;
            pTechMaScore.MonthId         = pTechMaScoreInfo.monthId;
            pTechMaScore.DateSpan        = pTechMaScoreInfo.dateSpan;
            pTechMaScore.EmployeeId      = pTechMaScoreInfo.employeeId;
            pTechMaScore.IsSubmit        = pTechMaScoreInfo.isSubmit;
            pTechMaScore.SelfScore1      = pTechMaScoreInfo.selfScore1;
            pTechMaScore.SelfScore2      = pTechMaScoreInfo.selfScore2;
            pTechMaScore.SelfScore3      = pTechMaScoreInfo.selfScore3;
            pTechMaScore.SelfScore4      = pTechMaScoreInfo.selfScore4;
            pTechMaScore.SelfScore5      = pTechMaScoreInfo.selfScore5;
            pTechMaScore.SelfScore6      = pTechMaScoreInfo.selfScore6;
            pTechMaScore.SelfScore7      = pTechMaScoreInfo.selfScore7;
            pTechMaScore.SelfScore8      = pTechMaScoreInfo.selfScore8;
            pTechMaScore.SelfScore9      = pTechMaScoreInfo.selfScore9;
            pTechMaScore.SelfScore10     = pTechMaScoreInfo.selfScore10;
            pTechMaScore.SelfScore11     = pTechMaScoreInfo.selfScore11;
            pTechMaScore.SelfScore12     = pTechMaScoreInfo.selfScore12;
            pTechMaScore.SelfScore13     = pTechMaScoreInfo.selfScore13;
            pTechMaScore.UpScore1        = pTechMaScoreInfo.upScore1;
            pTechMaScore.UpScore2        = pTechMaScoreInfo.upScore2;
            pTechMaScore.UpScore3        = pTechMaScoreInfo.upScore3;
            pTechMaScore.UpScore4        = pTechMaScoreInfo.upScore4;
            pTechMaScore.UpScore5        = pTechMaScoreInfo.upScore5;
            pTechMaScore.UpScore6        = pTechMaScoreInfo.upScore6;
            pTechMaScore.UpScore7        = pTechMaScoreInfo.upScore7;
            pTechMaScore.UpScore8        = pTechMaScoreInfo.upScore8;
            pTechMaScore.UpScore9        = pTechMaScoreInfo.upScore9;
            pTechMaScore.UpScore10       = pTechMaScoreInfo.upScore10;
            pTechMaScore.UpScore11       = pTechMaScoreInfo.upScore11;
            pTechMaScore.UpScore12       = pTechMaScoreInfo.upScore12;
            pTechMaScore.UpScore13       = pTechMaScoreInfo.upScore13;
            pTechMaScore.SectScore1      = pTechMaScoreInfo.sectScore1;
            pTechMaScore.SectScore2      = pTechMaScoreInfo.sectScore2;
            pTechMaScore.SectScore3      = pTechMaScoreInfo.sectScore3;
            pTechMaScore.SectScore4      = pTechMaScoreInfo.sectScore4;
            pTechMaScore.SectScore5      = pTechMaScoreInfo.sectScore5;
            pTechMaScore.SectScore6      = pTechMaScoreInfo.sectScore6;
            pTechMaScore.SectScore7      = pTechMaScoreInfo.sectScore7;
            pTechMaScore.SectScore8      = pTechMaScoreInfo.sectScore8;
            pTechMaScore.SectScore9      = pTechMaScoreInfo.sectScore9;
            pTechMaScore.SectScore10     = pTechMaScoreInfo.sectScore10;
            pTechMaScore.SectScore11     = pTechMaScoreInfo.sectScore11;
            pTechMaScore.SectScore12     = pTechMaScoreInfo.sectScore12;
            pTechMaScore.SectScore13     = pTechMaScoreInfo.sectScore13;
            pTechMaScore.IsNew           = pIsNew;
            string UserName = SubsonicHelper.GetUserName();

            try
            {
                pTechMaScore.Save(UserName);
            }
            catch (Exception ex)
            {
                LogManager.getInstance().getLogger(typeof(TechMaScoreInfo)).Error(ex);
                if (ex.Message.Contains("插入重复键"))               //违反了唯一键
                {
                    throw new AppException("此对象已经存在");          //此处等待优化可以从唯一约束中直接取出提示来,如果没有的话,默认为原始的出错提示
                }
                throw new AppException("保存失败");
            }
            pTechMaScoreInfo.techMaScoreId = pTechMaScore.TechMaScoreId;
            //如果缓存存在,更新缓存
            if (CachedEntityCommander.IsTypeRegistered(typeof(TechMaScoreInfo)))
            {
                ResetCache();
            }
        }
示例#20
0
 /// <summary>
 /// 获得数据列表
 /// </summary>
 /// <returns></returns>
 public static List<TechMaScoreInfo> GetList()
 {
     string cacheKey = GetCacheKey();
     //本实体已经注册成缓存实体,并且缓存存在的时候,直接从缓存取
     if (CachedEntityCommander.IsTypeRegistered(typeof(TechMaScoreInfo)) && CachedEntityCommander.GetCache(cacheKey) != null)
     {
         return CachedEntityCommander.GetCache(cacheKey) as List< TechMaScoreInfo>;
     }
     else
     {
         List< TechMaScoreInfo>  list =new List< TechMaScoreInfo>();
         TechMaScoreCollection  collection=new  TechMaScoreCollection();
         Query qry = new Query(TechMaScore.Schema);
         collection.LoadAndCloseReader(qry.ExecuteReader());
         foreach(TechMaScore techMaScore in collection)
         {
             TechMaScoreInfo techMaScoreInfo= new TechMaScoreInfo();
             LoadFromDAL(techMaScoreInfo,techMaScore);
             list.Add(techMaScoreInfo);
         }
       	//生成缓存
         if (CachedEntityCommander.IsTypeRegistered(typeof(TechMaScoreInfo)))
         {
             CachedEntityCommander.SetCache(cacheKey, list);
         }
         return list;
     }
 }
示例#21
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<TechMaScoreInfo> GetPagedList(int pPageIndex,int pPageSize,SortDirection pOrderBy,string pSortExpression,out int pRecordCount)
        {
            if(pPageIndex<=1)
            pPageIndex=1;
            List< TechMaScoreInfo> list = new List< TechMaScoreInfo>();

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

            foreach (TechMaScore  techMaScore  in collection)
            {
                TechMaScoreInfo techMaScoreInfo = new TechMaScoreInfo();
                LoadFromDAL(techMaScoreInfo,   techMaScore);
                list.Add(techMaScoreInfo);
            }
            pRecordCount=q.GetRecordCount();

            return list;
        }
示例#22
0
 /// <summary>
 /// 复制为另一个对象
 /// </summary>
 /// <param name="pIndustryTypeInfoTo"></param>
 public void CopyTo(TechMaScoreInfo pTechMaScoreInfoTo)
 {
     Copy(this,  pTechMaScoreInfoTo);
 }
 public List <TechMaScoreInfo> GetPagedList(int pPageIndex, int pPageSize, SortDirection pOrderBy, string pSortExpression, out int pRecordCount)
 {
     return(TechMaScoreInfo.GetPagedList(pPageIndex, pPageSize, pOrderBy, pSortExpression, out pRecordCount));
 }
示例#24
0
 //从后台获取数据
 internal static void LoadFromDAL(TechMaScoreInfo pTechMaScoreInfo, TechMaScore  pTechMaScore)
 {
     pTechMaScoreInfo.techMaScoreId = pTechMaScore.TechMaScoreId;
      		pTechMaScoreInfo.reason = pTechMaScore.Reason;
      		pTechMaScoreInfo.addMinusScore = pTechMaScore.AddMinusScore;
      		pTechMaScoreInfo.totalScore = pTechMaScore.TotalScore;
      		pTechMaScoreInfo.upView = pTechMaScore.UpView;
      		pTechMaScoreInfo.evaluateLevelId = pTechMaScore.EvaluateLevelId;
      		pTechMaScoreInfo.yearId = pTechMaScore.YearId;
      		pTechMaScoreInfo.monthId = pTechMaScore.MonthId;
      		pTechMaScoreInfo.dateSpan = pTechMaScore.DateSpan;
      		pTechMaScoreInfo.employeeId = pTechMaScore.EmployeeId;
      		pTechMaScoreInfo.isSubmit = pTechMaScore.IsSubmit;
      		pTechMaScoreInfo.selfScore1 = pTechMaScore.SelfScore1;
      		pTechMaScoreInfo.selfScore2 = pTechMaScore.SelfScore2;
      		pTechMaScoreInfo.selfScore3 = pTechMaScore.SelfScore3;
      		pTechMaScoreInfo.selfScore4 = pTechMaScore.SelfScore4;
      		pTechMaScoreInfo.selfScore5 = pTechMaScore.SelfScore5;
      		pTechMaScoreInfo.selfScore6 = pTechMaScore.SelfScore6;
      		pTechMaScoreInfo.selfScore7 = pTechMaScore.SelfScore7;
      		pTechMaScoreInfo.selfScore8 = pTechMaScore.SelfScore8;
      		pTechMaScoreInfo.selfScore9 = pTechMaScore.SelfScore9;
      		pTechMaScoreInfo.selfScore10 = pTechMaScore.SelfScore10;
      		pTechMaScoreInfo.selfScore11 = pTechMaScore.SelfScore11;
      		pTechMaScoreInfo.selfScore12 = pTechMaScore.SelfScore12;
      		pTechMaScoreInfo.selfScore13 = pTechMaScore.SelfScore13;
      		pTechMaScoreInfo.upScore1 = pTechMaScore.UpScore1;
      		pTechMaScoreInfo.upScore2 = pTechMaScore.UpScore2;
      		pTechMaScoreInfo.upScore3 = pTechMaScore.UpScore3;
      		pTechMaScoreInfo.upScore4 = pTechMaScore.UpScore4;
      		pTechMaScoreInfo.upScore5 = pTechMaScore.UpScore5;
      		pTechMaScoreInfo.upScore6 = pTechMaScore.UpScore6;
      		pTechMaScoreInfo.upScore7 = pTechMaScore.UpScore7;
      		pTechMaScoreInfo.upScore8 = pTechMaScore.UpScore8;
      		pTechMaScoreInfo.upScore9 = pTechMaScore.UpScore9;
      		pTechMaScoreInfo.upScore10 = pTechMaScore.UpScore10;
      		pTechMaScoreInfo.upScore11 = pTechMaScore.UpScore11;
      		pTechMaScoreInfo.upScore12 = pTechMaScore.UpScore12;
      		pTechMaScoreInfo.upScore13 = pTechMaScore.UpScore13;
      		pTechMaScoreInfo.sectScore1 = pTechMaScore.SectScore1;
      		pTechMaScoreInfo.sectScore2 = pTechMaScore.SectScore2;
      		pTechMaScoreInfo.sectScore3 = pTechMaScore.SectScore3;
      		pTechMaScoreInfo.sectScore4 = pTechMaScore.SectScore4;
      		pTechMaScoreInfo.sectScore5 = pTechMaScore.SectScore5;
      		pTechMaScoreInfo.sectScore6 = pTechMaScore.SectScore6;
      		pTechMaScoreInfo.sectScore7 = pTechMaScore.SectScore7;
      		pTechMaScoreInfo.sectScore8 = pTechMaScore.SectScore8;
      		pTechMaScoreInfo.sectScore9 = pTechMaScore.SectScore9;
      		pTechMaScoreInfo.sectScore10 = pTechMaScore.SectScore10;
      		pTechMaScoreInfo.sectScore11 = pTechMaScore.SectScore11;
      		pTechMaScoreInfo.sectScore12 = pTechMaScore.SectScore12;
      		pTechMaScoreInfo.sectScore13 = pTechMaScore.SectScore13;
     pTechMaScoreInfo.Loaded=true;
 }
示例#25
0
        protected void PageInit()
        {
            int TesId = Convert.ToInt32(Request["TechMaScoreId"].ToString());
            TechMaScoreInfo tms = new TechMaScoreInfo(TesId);
            lblSelfScore1.Text = tms.SelfScore1.ToString();
            lblSelfScore2.Text = tms.SelfScore2.ToString();
            lblSelfScore3.Text = tms.SelfScore3.ToString();
            lblSelfScore4.Text = tms.SelfScore4.ToString();
            lblSelfScore5.Text = tms.SelfScore5.ToString();
            lblSelfScore6.Text = tms.SelfScore6.ToString();
            lblSelfScore7.Text = tms.SelfScore7.ToString();
            lblSelfScore8.Text = tms.SelfScore8.ToString();
            lblSelfScore9.Text = tms.SelfScore9.ToString();
            lblSelfScore10.Text = tms.SelfScore10.ToString();
            lblSelfScore11.Text = tms.SelfScore11.ToString();
            lblSelfScore12.Text = tms.SelfScore12.ToString();
            lblSelfScore13.Text = tms.SelfScore13.ToString();

            lblUpScore1.Text = tms.UpScore1.ToString();
            lblUpScore2.Text = tms.UpScore2.ToString();
            lblUpScore3.Text = tms.UpScore3.ToString();
            lblUpScore4.Text = tms.UpScore4.ToString();
            lblUpScore5.Text = tms.UpScore5.ToString();
            lblUpScore6.Text = tms.UpScore6.ToString();
            lblUpScore7.Text = tms.UpScore7.ToString();
            lblUpScore8.Text = tms.UpScore8.ToString();
            lblUpScore9.Text = tms.UpScore9.ToString();
            lblUpScore10.Text = tms.UpScore10.ToString();
            lblUpScore11.Text = tms.UpScore11.ToString();
            lblUpScore12.Text = tms.UpScore12.ToString();
            lblUpScore13.Text = tms.UpScore13.ToString();

            lblSectScore1.Text = tms.SectScore1.ToString();
            lblSectScore2.Text = tms.SectScore2.ToString();
            lblSectScore3.Text = tms.SectScore3.ToString();
            lblSectScore4.Text = tms.SectScore4.ToString();
            lblSectScore5.Text = tms.SectScore5.ToString();
            lblSectScore6.Text = tms.SectScore6.ToString();
            lblSectScore7.Text = tms.SectScore7.ToString();
            lblSectScore8.Text = tms.SectScore8.ToString();
            lblSectScore9.Text = tms.SectScore9.ToString();
            lblSectScore10.Text = tms.SectScore10.ToString();
            lblSectScore11.Text = tms.SectScore11.ToString();
            lblSectScore12.Text = tms.SectScore12.ToString();
            lblSectScore13.Text = tms.SectScore13.ToString();

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

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

            EmployeeInfo em = new EmployeeInfo(Convert.ToInt32(tms.EmployeeId));
            lblName.Text = em.EmployeeName.ToString();
            PositionInfo position = new PositionInfo(Convert.ToInt32(Convert.ToInt32(em.PositionId)));
            lblPosition.Text = position.PositionName;

            lblSumScore.Text = tms.TotalScore.ToString();
            lblViews.Text = tms.UpView.ToString();
            if (tms.EvaluateLevelId.ToString() != "")
            {
                EvaluateLevelInfo ev = new EvaluateLevelInfo(Convert.ToInt32(tms.EvaluateLevelId));
                lblLevel.Text = ev.EvaluateName.ToString();
            }
            else
            {
                lblLevel.Text = "";
            }
        }
示例#26
0
        protected void PageInit()
        {
            int TesId = Convert.ToInt32(Request["TechMaScoreId"].ToString());
            TechMaScoreInfo tms = new TechMaScoreInfo(TesId);
            strbind1 = tms.SelfScore1.ToString();
            strbind2 = tms.SelfScore2.ToString();
            strbind3 = tms.SelfScore3.ToString();
            strbind4 = tms.SelfScore4.ToString();
            strbind5 = tms.SelfScore5.ToString();
            strbind6 = tms.SelfScore6.ToString();
            strbind7 = tms.SelfScore7.ToString();
            strbind8 = tms.SelfScore8.ToString();
            strbind9 = tms.SelfScore9.ToString();
            strbind10 = tms.SelfScore10.ToString();
            strbind11 = tms.SelfScore11.ToString();
            strbind12 = tms.SelfScore12.ToString();
            strbind13 = tms.SelfScore13.ToString();

            ddlYear.SelectedValue = tms.YearId.ToString();
            ddlMonth.SelectedValue = tms.MonthId.ToString();

            EmployeeInfo em = new EmployeeInfo(Convert.ToInt32(tms.EmployeeId));
            lblName.Text = em.EmployeeName.ToString();
            PositionInfo position = new PositionInfo(Convert.ToInt32(Convert.ToInt32(em.PositionId)));
            lblPosition.Text = position.PositionName;
        }
        public void DeleteById(TechMaScoreInfo pTechMaScoreInfo)
        {
            TechMaScoreInfo techMaScoreInfo = new TechMaScoreInfo(pTechMaScoreInfo.TechMaScoreId);

            techMaScoreInfo.Delete();
        }
示例#28
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);
                    TechMaScoreInfo tes = new TechMaScoreInfo(tesid);
                    if (tes.IsSubmit != 0)
                    {
                        Button btnSubmit = e.Row.FindControl("btnSubmit") as Button;
                        Button btnEdit = e.Row.FindControl("btnEdit") as Button;
                        Button btnDelete = e.Row.FindControl("btnDelete") as Button;
                        btnSubmit.Enabled = false;
                        btnEdit.Enabled = false;
                        btnDelete.Enabled = false;

                    }
                }
            }
        }
 public List <TechMaScoreInfo> GetTechMaScoreInfoList()
 {
     return(TechMaScoreInfo.GetList());
 }
示例#30
0
 /// <summary>
 /// 复制为另一个对象
 /// </summary>
 /// <param name="pIndustryTypeInfoTo"></param>
 public void CopyTo(TechMaScoreInfo pTechMaScoreInfoTo)
 {
     Copy(this, pTechMaScoreInfoTo);
 }
 public object  SaveTechMaScoreInfo(TechMaScoreInfo techMaScoreInfo)
 {
     techMaScoreInfo.Save();
     return(techMaScoreInfo.TechMaScoreId);
 }
 public void DeleteById(TechMaScoreInfo pTechMaScoreInfo)
 {
     TechMaScoreInfo techMaScoreInfo = new TechMaScoreInfo(pTechMaScoreInfo.TechMaScoreId);
     techMaScoreInfo.Delete();
 }