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

                fs.Selffs1 = Request.Form["Selffs1"].ToString();
                fs.Selffs2 = Request.Form["Selffs2"].ToString();
                fs.Selffs3 = Request.Form["Selffs3"].ToString();
                fs.Selffs4 = Request.Form["Selffs4"].ToString();
                fs.Selffs5 = Request.Form["Selffs5"].ToString();
                fs.Selffs6 = Request.Form["Selffs6"].ToString();
                fs.Selffs7 = Request.Form["Selffs7"].ToString();
                fs.Selffs8 = Request.Form["Selffs8"].ToString();
                fs.Selffs9 = Request.Form["Selffs9"].ToString();
                fs.Selffs10 = Request.Form["Selffs10"].ToString();
                fs.Selffs11 = Request.Form["Selffs11"].ToString();
                fs.Selffs12 = Request.Form["Selffs12"].ToString();
                fs.Selffs13 = Request.Form["Selffs13"].ToString();
                fs.Selffs14 = Request.Form["Selffs14"].ToString();
                fs.Selffs15 = Request.Form["Selffs15"].ToString();
                fs.Selffs16 = Request.Form["Selffs16"].ToString();
                fs.Selffs17 = Request.Form["Selffs17"].ToString();
                fs.Selffs18 = Request.Form["Selffs18"].ToString();
                fs.Selffs19 = Request.Form["Selffs19"].ToString();
                fs.Selffs20 = Request.Form["Selffs20"].ToString();
                fs.Selffs21 = Request.Form["Selffs21"].ToString();
                fs.Save();
                Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('����ɹ���');</script>");
            }
        }
Пример #2
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            int FsScoreId = Convert.ToInt32(((Button)sender).CommandArgument.ToString());
            FrontScoreInfo fs = new FrontScoreInfo(FsScoreId);
            fs.IsSubmit = 1;

            int recvid = Convert.ToInt32(Common.getEmployeeIdOfMarketManager());
            EmployeeInfo em = new EmployeeInfo(Convert.ToInt32(fs.EmployeeId));
            EmployeeInfo ems = new EmployeeInfo(recvid);
            MessageInfo.Msgs1(recvid, fs.FrontScoreId, "~/Score/FrontScoreApprove.aspx", em.EmployeeName + "����������", em.EmployeeName, "daiban", em.EmployeeName + "����������");
            MessageInfo.SendMail(ems.Qq, "����������", em.EmployeeName + "����������");
            fs.Save();
            gvDataBind();
        }
Пример #3
0
        public FrontScoreInfo GetFrontScoreInfoById(int FrontScoreId)
        {
            FrontScoreInfo frontScoreInfo  = null;//
            try
            {
                 frontScoreInfo = new FrontScoreInfo(FrontScoreId);

            }
            catch (AppException)
            {
                return null;
            }

            return  frontScoreInfo;
        }
Пример #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";

              // 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;
                        }
                    }
               // }
            }
        }
Пример #5
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);
                    FrontScoreInfo ds = new FrontScoreInfo(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;

                    }
                }
            }
        }
Пример #6
0
        protected void PageInit()
        {
            int fsid = Convert.ToInt32(Request["FsScoreId"].ToString());
            FrontScoreInfo fs = new FrontScoreInfo(fsid);
            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();

            Selffs1 = fs.Selffs1.ToString();
            Selffs2 = fs.Selffs2.ToString();
            Selffs3 = fs.Selffs3.ToString();
            Selffs4 = fs.Selffs4.ToString();
            Selffs5 = fs.Selffs5.ToString();
            Selffs6 = fs.Selffs6.ToString();
            Selffs7 = fs.Selffs7.ToString();
            Selffs8 = fs.Selffs8.ToString();
            Selffs9 = fs.Selffs9.ToString();
            Selffs10 = fs.Selffs10.ToString();
            Selffs11 = fs.Selffs11.ToString();
            Selffs12 = fs.Selffs12.ToString();
            Selffs13 = fs.Selffs13.ToString();
            Selffs14 = fs.Selffs14.ToString();
            Selffs15 = fs.Selffs15.ToString();
            Selffs16 = fs.Selffs16.ToString();
            Selffs17 = fs.Selffs17.ToString();
            Selffs18 = fs.Selffs18.ToString();
            Selffs19 = fs.Selffs19.ToString();
            Selffs20 = fs.Selffs20.ToString();
            Selffs21 = fs.Selffs21.ToString();
        }
Пример #7
0
 public object SaveFrontScoreInfo(FrontScoreInfo frontScoreInfo)
 {
     frontScoreInfo.Save();
     return frontScoreInfo . FrontScoreId;
 }
Пример #8
0
 /// <summary>
 /// 获得数据列表
 /// </summary>
 /// <returns></returns>
 public static List<FrontScoreInfo> GetList()
 {
     string cacheKey = GetCacheKey();
     //本实体已经注册成缓存实体,并且缓存存在的时候,直接从缓存取
     if (CachedEntityCommander.IsTypeRegistered(typeof(FrontScoreInfo)) && CachedEntityCommander.GetCache(cacheKey) != null)
     {
         return CachedEntityCommander.GetCache(cacheKey) as List< FrontScoreInfo>;
     }
     else
     {
         List< FrontScoreInfo>  list =new List< FrontScoreInfo>();
         FrontScoreCollection  collection=new  FrontScoreCollection();
         Query qry = new Query(FrontScore.Schema);
         collection.LoadAndCloseReader(qry.ExecuteReader());
         foreach(FrontScore frontScore in collection)
         {
             FrontScoreInfo frontScoreInfo= new FrontScoreInfo();
             LoadFromDAL(frontScoreInfo,frontScore);
             list.Add(frontScoreInfo);
         }
       	//生成缓存
         if (CachedEntityCommander.IsTypeRegistered(typeof(FrontScoreInfo)))
         {
             CachedEntityCommander.SetCache(cacheKey, list);
         }
         return list;
     }
 }
Пример #9
0
 public void DeleteById(FrontScoreInfo pFrontScoreInfo)
 {
     FrontScoreInfo frontScoreInfo = new FrontScoreInfo(pFrontScoreInfo.FrontScoreId);
     frontScoreInfo.Delete();
 }
Пример #10
0
 //数据持久化
 internal static void SaveToDb(FrontScoreInfo pFrontScoreInfo, FrontScore  pFrontScore,bool pIsNew)
 {
     pFrontScore.FrontScoreId = pFrontScoreInfo.frontScoreId;
      		pFrontScore.DateSpan = pFrontScoreInfo.dateSpan;
      		pFrontScore.EvaluateLevelId = pFrontScoreInfo.evaluateLevelId;
      		pFrontScore.TotalScore = pFrontScoreInfo.totalScore;
      		pFrontScore.UpViews = pFrontScoreInfo.upViews;
      		pFrontScore.YearId = pFrontScoreInfo.yearId;
      		pFrontScore.MonthId = pFrontScoreInfo.monthId;
      		pFrontScore.EmployeeId = pFrontScoreInfo.employeeId;
      		pFrontScore.IsSubmit = pFrontScoreInfo.isSubmit;
      		pFrontScore.Selffs1 = pFrontScoreInfo.selffs1;
      		pFrontScore.Selffs2 = pFrontScoreInfo.selffs2;
      		pFrontScore.Selffs3 = pFrontScoreInfo.selffs3;
      		pFrontScore.Selffs4 = pFrontScoreInfo.selffs4;
      		pFrontScore.Selffs5 = pFrontScoreInfo.selffs5;
      		pFrontScore.Selffs6 = pFrontScoreInfo.selffs6;
      		pFrontScore.Selffs7 = pFrontScoreInfo.selffs7;
      		pFrontScore.Selffs8 = pFrontScoreInfo.selffs8;
      		pFrontScore.Selffs9 = pFrontScoreInfo.selffs9;
      		pFrontScore.Selffs10 = pFrontScoreInfo.selffs10;
      		pFrontScore.Selffs11 = pFrontScoreInfo.selffs11;
      		pFrontScore.Selffs12 = pFrontScoreInfo.selffs12;
      		pFrontScore.Selffs13 = pFrontScoreInfo.selffs13;
      		pFrontScore.Selffs14 = pFrontScoreInfo.selffs14;
      		pFrontScore.Selffs15 = pFrontScoreInfo.selffs15;
      		pFrontScore.Selffs16 = pFrontScoreInfo.selffs16;
      		pFrontScore.Selffs17 = pFrontScoreInfo.selffs17;
      		pFrontScore.Selffs18 = pFrontScoreInfo.selffs18;
      		pFrontScore.Selffs19 = pFrontScoreInfo.selffs19;
      		pFrontScore.Selffs20 = pFrontScoreInfo.selffs20;
      		pFrontScore.Selffs21 = pFrontScoreInfo.selffs21;
      		pFrontScore.Upfs1 = pFrontScoreInfo.upfs1;
      		pFrontScore.Upfs2 = pFrontScoreInfo.upfs2;
      		pFrontScore.Upfs3 = pFrontScoreInfo.upfs3;
      		pFrontScore.Upfs4 = pFrontScoreInfo.upfs4;
      		pFrontScore.Upfs5 = pFrontScoreInfo.upfs5;
      		pFrontScore.Upfs6 = pFrontScoreInfo.upfs6;
      		pFrontScore.Upfs7 = pFrontScoreInfo.upfs7;
      		pFrontScore.Upfs8 = pFrontScoreInfo.upfs8;
      		pFrontScore.Upfs9 = pFrontScoreInfo.upfs9;
      		pFrontScore.Upfs10 = pFrontScoreInfo.upfs10;
      		pFrontScore.Upfs11 = pFrontScoreInfo.upfs11;
      		pFrontScore.Upfs12 = pFrontScoreInfo.upfs12;
      		pFrontScore.Upfs13 = pFrontScoreInfo.upfs13;
      		pFrontScore.Upfs14 = pFrontScoreInfo.upfs14;
      		pFrontScore.Upfs15 = pFrontScoreInfo.upfs15;
      		pFrontScore.Upfs16 = pFrontScoreInfo.upfs16;
      		pFrontScore.Upfs17 = pFrontScoreInfo.upfs17;
      		pFrontScore.Upfs18 = pFrontScoreInfo.upfs18;
      		pFrontScore.Upfs19 = pFrontScoreInfo.upfs19;
      		pFrontScore.Upfs20 = pFrontScoreInfo.upfs20;
      		pFrontScore.Upfs21 = pFrontScoreInfo.upfs21;
      		pFrontScore.Secfs1 = pFrontScoreInfo.secfs1;
      		pFrontScore.Secfs2 = pFrontScoreInfo.secfs2;
      		pFrontScore.Secfs3 = pFrontScoreInfo.secfs3;
      		pFrontScore.Secfs4 = pFrontScoreInfo.secfs4;
      		pFrontScore.Secfs5 = pFrontScoreInfo.secfs5;
      		pFrontScore.Secfs6 = pFrontScoreInfo.secfs6;
      		pFrontScore.Secfs7 = pFrontScoreInfo.secfs7;
      		pFrontScore.Secfs8 = pFrontScoreInfo.secfs8;
      		pFrontScore.Secfs9 = pFrontScoreInfo.secfs9;
      		pFrontScore.Secfs10 = pFrontScoreInfo.secfs10;
      		pFrontScore.Secfs11 = pFrontScoreInfo.secfs11;
      		pFrontScore.Secfs12 = pFrontScoreInfo.secfs12;
      		pFrontScore.Secfs13 = pFrontScoreInfo.secfs13;
      		pFrontScore.Secfs14 = pFrontScoreInfo.secfs14;
      		pFrontScore.Secfs15 = pFrontScoreInfo.secfs15;
      		pFrontScore.Secfs16 = pFrontScoreInfo.secfs16;
      		pFrontScore.Secfs17 = pFrontScoreInfo.secfs17;
      		pFrontScore.Secfs18 = pFrontScoreInfo.secfs18;
      		pFrontScore.Secfs19 = pFrontScoreInfo.secfs19;
      		pFrontScore.Secfs20 = pFrontScoreInfo.secfs20;
      		pFrontScore.Secfs21 = pFrontScoreInfo.secfs21;
     pFrontScore.IsNew=pIsNew;
     string UserName = SubsonicHelper.GetUserName();
     try
     {
         pFrontScore.Save(UserName);
     }
     catch(Exception ex)
     {
         LogManager.getInstance().getLogger(typeof(FrontScoreInfo)).Error(ex);
         if(ex.Message.Contains("插入重复键"))//违反了唯一键
         {
             throw new AppException("此对象已经存在");//此处等待优化可以从唯一约束中直接取出提示来,如果没有的话,默认为原始的出错提示
         }
         throw new AppException("保存失败");
     }
     pFrontScoreInfo.frontScoreId = pFrontScore.FrontScoreId;
     //如果缓存存在,更新缓存
     if (CachedEntityCommander.IsTypeRegistered(typeof(FrontScoreInfo)))
     {
         ResetCache();
     }
 }
Пример #11
0
 /// <summary>
 /// 批量装载
 /// </summary>
 internal static void LoadFromDALPatch(List< FrontScoreInfo> pList, FrontScoreCollection pCollection)
 {
     foreach (FrontScore frontScore in pCollection)
     {
         FrontScoreInfo frontScoreInfo = new FrontScoreInfo();
         LoadFromDAL(frontScoreInfo, frontScore );
         pList.Add(frontScoreInfo);
     }
 }
Пример #12
0
 //从后台获取数据
 internal static void LoadFromDAL(FrontScoreInfo pFrontScoreInfo, FrontScore  pFrontScore)
 {
     pFrontScoreInfo.frontScoreId = pFrontScore.FrontScoreId;
      		pFrontScoreInfo.dateSpan = pFrontScore.DateSpan;
      		pFrontScoreInfo.evaluateLevelId = pFrontScore.EvaluateLevelId;
      		pFrontScoreInfo.totalScore = pFrontScore.TotalScore;
      		pFrontScoreInfo.upViews = pFrontScore.UpViews;
      		pFrontScoreInfo.yearId = pFrontScore.YearId;
      		pFrontScoreInfo.monthId = pFrontScore.MonthId;
      		pFrontScoreInfo.employeeId = pFrontScore.EmployeeId;
      		pFrontScoreInfo.isSubmit = pFrontScore.IsSubmit;
      		pFrontScoreInfo.selffs1 = pFrontScore.Selffs1;
      		pFrontScoreInfo.selffs2 = pFrontScore.Selffs2;
      		pFrontScoreInfo.selffs3 = pFrontScore.Selffs3;
      		pFrontScoreInfo.selffs4 = pFrontScore.Selffs4;
      		pFrontScoreInfo.selffs5 = pFrontScore.Selffs5;
      		pFrontScoreInfo.selffs6 = pFrontScore.Selffs6;
      		pFrontScoreInfo.selffs7 = pFrontScore.Selffs7;
      		pFrontScoreInfo.selffs8 = pFrontScore.Selffs8;
      		pFrontScoreInfo.selffs9 = pFrontScore.Selffs9;
      		pFrontScoreInfo.selffs10 = pFrontScore.Selffs10;
      		pFrontScoreInfo.selffs11 = pFrontScore.Selffs11;
      		pFrontScoreInfo.selffs12 = pFrontScore.Selffs12;
      		pFrontScoreInfo.selffs13 = pFrontScore.Selffs13;
      		pFrontScoreInfo.selffs14 = pFrontScore.Selffs14;
      		pFrontScoreInfo.selffs15 = pFrontScore.Selffs15;
      		pFrontScoreInfo.selffs16 = pFrontScore.Selffs16;
      		pFrontScoreInfo.selffs17 = pFrontScore.Selffs17;
      		pFrontScoreInfo.selffs18 = pFrontScore.Selffs18;
      		pFrontScoreInfo.selffs19 = pFrontScore.Selffs19;
      		pFrontScoreInfo.selffs20 = pFrontScore.Selffs20;
      		pFrontScoreInfo.selffs21 = pFrontScore.Selffs21;
      		pFrontScoreInfo.upfs1 = pFrontScore.Upfs1;
      		pFrontScoreInfo.upfs2 = pFrontScore.Upfs2;
      		pFrontScoreInfo.upfs3 = pFrontScore.Upfs3;
      		pFrontScoreInfo.upfs4 = pFrontScore.Upfs4;
      		pFrontScoreInfo.upfs5 = pFrontScore.Upfs5;
      		pFrontScoreInfo.upfs6 = pFrontScore.Upfs6;
      		pFrontScoreInfo.upfs7 = pFrontScore.Upfs7;
      		pFrontScoreInfo.upfs8 = pFrontScore.Upfs8;
      		pFrontScoreInfo.upfs9 = pFrontScore.Upfs9;
      		pFrontScoreInfo.upfs10 = pFrontScore.Upfs10;
      		pFrontScoreInfo.upfs11 = pFrontScore.Upfs11;
      		pFrontScoreInfo.upfs12 = pFrontScore.Upfs12;
      		pFrontScoreInfo.upfs13 = pFrontScore.Upfs13;
      		pFrontScoreInfo.upfs14 = pFrontScore.Upfs14;
      		pFrontScoreInfo.upfs15 = pFrontScore.Upfs15;
      		pFrontScoreInfo.upfs16 = pFrontScore.Upfs16;
      		pFrontScoreInfo.upfs17 = pFrontScore.Upfs17;
      		pFrontScoreInfo.upfs18 = pFrontScore.Upfs18;
      		pFrontScoreInfo.upfs19 = pFrontScore.Upfs19;
      		pFrontScoreInfo.upfs20 = pFrontScore.Upfs20;
      		pFrontScoreInfo.upfs21 = pFrontScore.Upfs21;
      		pFrontScoreInfo.secfs1 = pFrontScore.Secfs1;
      		pFrontScoreInfo.secfs2 = pFrontScore.Secfs2;
      		pFrontScoreInfo.secfs3 = pFrontScore.Secfs3;
      		pFrontScoreInfo.secfs4 = pFrontScore.Secfs4;
      		pFrontScoreInfo.secfs5 = pFrontScore.Secfs5;
      		pFrontScoreInfo.secfs6 = pFrontScore.Secfs6;
      		pFrontScoreInfo.secfs7 = pFrontScore.Secfs7;
      		pFrontScoreInfo.secfs8 = pFrontScore.Secfs8;
      		pFrontScoreInfo.secfs9 = pFrontScore.Secfs9;
      		pFrontScoreInfo.secfs10 = pFrontScore.Secfs10;
      		pFrontScoreInfo.secfs11 = pFrontScore.Secfs11;
      		pFrontScoreInfo.secfs12 = pFrontScore.Secfs12;
      		pFrontScoreInfo.secfs13 = pFrontScore.Secfs13;
      		pFrontScoreInfo.secfs14 = pFrontScore.Secfs14;
      		pFrontScoreInfo.secfs15 = pFrontScore.Secfs15;
      		pFrontScoreInfo.secfs16 = pFrontScore.Secfs16;
      		pFrontScoreInfo.secfs17 = pFrontScore.Secfs17;
      		pFrontScoreInfo.secfs18 = pFrontScore.Secfs18;
      		pFrontScoreInfo.secfs19 = pFrontScore.Secfs19;
      		pFrontScoreInfo.secfs20 = pFrontScore.Secfs20;
      		pFrontScoreInfo.secfs21 = pFrontScore.Secfs21;
     pFrontScoreInfo.Loaded=true;
 }
Пример #13
0
 /// <summary>
 /// 复制为另一个对象
 /// </summary>
 /// <param name="pIndustryTypeInfoTo"></param>
 public void CopyTo(FrontScoreInfo pFrontScoreInfoTo)
 {
     Copy(this,  pFrontScoreInfoTo);
 }
Пример #14
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<FrontScoreInfo> GetPagedList(int pPageIndex,int pPageSize,SortDirection pOrderBy,string pSortExpression,out int pRecordCount)
        {
            if(pPageIndex<=1)
            pPageIndex=1;
            List< FrontScoreInfo> list = new List< FrontScoreInfo>();

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

            foreach (FrontScore  frontScore  in collection)
            {
                FrontScoreInfo frontScoreInfo = new FrontScoreInfo();
                LoadFromDAL(frontScoreInfo,   frontScore);
                list.Add(frontScoreInfo);
            }
            pRecordCount=q.GetRecordCount();

            return list;
        }
Пример #15
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            int fsid = Convert.ToInt32(Request["FrontScoreId"].ToString());
            FrontScoreInfo fs = new FrontScoreInfo(fsid);
            fs.Upfs1 = Request.Form["Upfs1"].ToString();
            fs.Upfs2 = Request.Form["Upfs2"].ToString();
            fs.Upfs3 = Request.Form["Upfs3"].ToString();
            fs.Upfs4 = Request.Form["Upfs4"].ToString();
            fs.Upfs5 = Request.Form["Upfs5"].ToString();
            fs.Upfs6 = Request.Form["Upfs6"].ToString();
            fs.Upfs7 = Request.Form["Upfs7"].ToString();
            fs.Upfs8 = Request.Form["Upfs8"].ToString();
            fs.Upfs9 = Request.Form["Upfs9"].ToString();
            fs.Upfs10 = Request.Form["Upfs10"].ToString();
            fs.Upfs11 = Request.Form["Upfs11"].ToString();
            fs.Upfs12 = Request.Form["Upfs12"].ToString();
            fs.Upfs13 = Request.Form["Upfs13"].ToString();
            fs.Upfs14 = Request.Form["Upfs14"].ToString();
            fs.Upfs15 = Request.Form["Upfs15"].ToString();
            fs.Upfs16 = Request.Form["Upfs16"].ToString();
            fs.Upfs17 = Request.Form["Upfs17"].ToString();
            fs.Upfs18 = Request.Form["Upfs18"].ToString();
            fs.Upfs19 = Request.Form["Upfs19"].ToString();
            fs.Upfs20 = Request.Form["Upfs20"].ToString();
            fs.Upfs21 = Request.Form["Upfs21"].ToString();

            fs.Secfs1 = Convert.ToString(Math.Round(float.Parse(lblSelffs1.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upfs1"].ToString()), 2) * 0.6);
            fs.Secfs2 = Convert.ToString(Math.Round(float.Parse(lblSelffs2.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upfs2"].ToString()), 2) * 0.6);
            fs.Secfs3 = Convert.ToString(Math.Round(float.Parse(lblSelffs3.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upfs3"].ToString()), 2) * 0.6);
            fs.Secfs4 = Convert.ToString(Math.Round(float.Parse(lblSelffs4.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upfs4"].ToString()), 2) * 0.6);
            fs.Secfs5 = Convert.ToString(Math.Round(float.Parse(lblSelffs5.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upfs5"].ToString()), 2) * 0.6);
            fs.Secfs6 = Convert.ToString(Math.Round(float.Parse(lblSelffs6.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upfs6"].ToString()), 2) * 0.6);
            fs.Secfs7 = Convert.ToString(Math.Round(float.Parse(lblSelffs7.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upfs7"].ToString()), 2) * 0.6);

            fs.Secfs9 = Convert.ToString(Math.Round(float.Parse(lblSelffs9.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upfs9"].ToString()), 2) * 0.6);
            fs.Secfs10 = Convert.ToString(Math.Round(float.Parse(lblSelffs10.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upfs10"].ToString()), 2) * 0.6);
            fs.Secfs11 = Convert.ToString(Math.Round(float.Parse(lblSelffs11.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upfs11"].ToString()), 2) * 0.6);
            fs.Secfs12 = Convert.ToString(Math.Round(float.Parse(lblSelffs12.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upfs12"].ToString()), 2) * 0.6);
            fs.Secfs13 = Convert.ToString(Math.Round(float.Parse(lblSelffs13.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upfs13"].ToString()), 2) * 0.6);
            fs.Secfs14 = Convert.ToString(Math.Round(float.Parse(lblSelffs14.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upfs14"].ToString()), 2) * 0.6);
            fs.Secfs15 = Convert.ToString(Math.Round(float.Parse(lblSelffs15.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upfs15"].ToString()), 2) * 0.6);
            fs.Secfs16 = Convert.ToString(Math.Round(float.Parse(lblSelffs16.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upfs16"].ToString()), 2) * 0.6);
            fs.Secfs17 = Convert.ToString(Math.Round(float.Parse(lblSelffs17.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upfs17"].ToString()), 2) * 0.6);
            fs.Secfs18 = Convert.ToString(Math.Round(float.Parse(lblSelffs18.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upfs18"].ToString()), 2) * 0.6);
            fs.Secfs19 = Convert.ToString(Math.Round(float.Parse(lblSelffs19.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upfs19"].ToString()), 2) * 0.6);
            fs.Secfs20 = Convert.ToString(Math.Round(float.Parse(lblSelffs20.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upfs20"].ToString()), 2) * 0.6);
            fs.Secfs21 = Convert.ToString(Math.Round(float.Parse(lblSelffs21.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upfs21"].ToString()), 2) * 0.6);

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

            float Score = float.Parse(Request.Form["hid"].ToString());
            if (Score > 90)
            {
                fs.EvaluateLevelId = 2;
            }
            else if (Score > 75 && Score < 90)
            {
                fs.EvaluateLevelId = 3;
            }
            else if (Score > 60 && Score < 75)
            {
                fs.EvaluateLevelId = 4;
            }
            else if (Score < 60)
            {
                fs.EvaluateLevelId = 5;
            }
            fs.IsSubmit = 2;
            fs.UpViews = Request.Form["UpViews"].ToString();
            fs.Save();
            Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('����ɹ���');</script>");
        }
Пример #16
0
        protected void PageInit()
        {
            int fsid = Convert.ToInt32(Request["FrontScoreId"].ToString());
            FrontScoreInfo fs = new FrontScoreInfo(fsid);
            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();

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

            lblSelffs1.Text = fs.Selffs1.ToString();
            lblSelffs2.Text = fs.Selffs2.ToString();
            lblSelffs3.Text = fs.Selffs3.ToString();
            lblSelffs4.Text = fs.Selffs4.ToString();
            lblSelffs5.Text = fs.Selffs5.ToString();
            lblSelffs6.Text = fs.Selffs6.ToString();
            lblSelffs7.Text = fs.Selffs7.ToString();

            lblSelffs9.Text = fs.Selffs9.ToString();
            lblSelffs10.Text = fs.Selffs10.ToString();
            lblSelffs11.Text = fs.Selffs11.ToString();
            lblSelffs12.Text = fs.Selffs12.ToString();
            lblSelffs13.Text = fs.Selffs13.ToString();
            lblSelffs14.Text = fs.Selffs14.ToString();
            lblSelffs15.Text = fs.Selffs15.ToString();
            lblSelffs16.Text = fs.Selffs16.ToString();
            lblSelffs17.Text = fs.Selffs17.ToString();
            lblSelffs18.Text = fs.Selffs18.ToString();
            lblSelffs19.Text = fs.Selffs19.ToString();
            lblSelffs20.Text = fs.Selffs20.ToString();
            lblSelffs21.Text = fs.Selffs21.ToString();
        }
Пример #17
0
 /// <summary>
 /// 复制一个对象,采用硬编码的方式,避免反射的低效
 /// </summary>
 /// <param name="pIndustryTypeInfoFrom"></param>
 /// <param name="pIndustryTypeInfoTo"></param>
 public static void Copy(FrontScoreInfo pFrontScoreInfoFrom, FrontScoreInfo pFrontScoreInfoTo)
 {
     pFrontScoreInfoTo.FrontScoreId = pFrontScoreInfoFrom.frontScoreId;
      		pFrontScoreInfoTo.DateSpan = pFrontScoreInfoFrom.dateSpan;
      		pFrontScoreInfoTo.EvaluateLevelId = pFrontScoreInfoFrom.evaluateLevelId;
      		pFrontScoreInfoTo.TotalScore = pFrontScoreInfoFrom.totalScore;
      		pFrontScoreInfoTo.UpViews = pFrontScoreInfoFrom.upViews;
      		pFrontScoreInfoTo.YearId = pFrontScoreInfoFrom.yearId;
      		pFrontScoreInfoTo.MonthId = pFrontScoreInfoFrom.monthId;
      		pFrontScoreInfoTo.EmployeeId = pFrontScoreInfoFrom.employeeId;
      		pFrontScoreInfoTo.IsSubmit = pFrontScoreInfoFrom.isSubmit;
      		pFrontScoreInfoTo.Selffs1 = pFrontScoreInfoFrom.selffs1;
      		pFrontScoreInfoTo.Selffs2 = pFrontScoreInfoFrom.selffs2;
      		pFrontScoreInfoTo.Selffs3 = pFrontScoreInfoFrom.selffs3;
      		pFrontScoreInfoTo.Selffs4 = pFrontScoreInfoFrom.selffs4;
      		pFrontScoreInfoTo.Selffs5 = pFrontScoreInfoFrom.selffs5;
      		pFrontScoreInfoTo.Selffs6 = pFrontScoreInfoFrom.selffs6;
      		pFrontScoreInfoTo.Selffs7 = pFrontScoreInfoFrom.selffs7;
      		pFrontScoreInfoTo.Selffs8 = pFrontScoreInfoFrom.selffs8;
      		pFrontScoreInfoTo.Selffs9 = pFrontScoreInfoFrom.selffs9;
      		pFrontScoreInfoTo.Selffs10 = pFrontScoreInfoFrom.selffs10;
      		pFrontScoreInfoTo.Selffs11 = pFrontScoreInfoFrom.selffs11;
      		pFrontScoreInfoTo.Selffs12 = pFrontScoreInfoFrom.selffs12;
      		pFrontScoreInfoTo.Selffs13 = pFrontScoreInfoFrom.selffs13;
      		pFrontScoreInfoTo.Selffs14 = pFrontScoreInfoFrom.selffs14;
      		pFrontScoreInfoTo.Selffs15 = pFrontScoreInfoFrom.selffs15;
      		pFrontScoreInfoTo.Selffs16 = pFrontScoreInfoFrom.selffs16;
      		pFrontScoreInfoTo.Selffs17 = pFrontScoreInfoFrom.selffs17;
      		pFrontScoreInfoTo.Selffs18 = pFrontScoreInfoFrom.selffs18;
      		pFrontScoreInfoTo.Selffs19 = pFrontScoreInfoFrom.selffs19;
      		pFrontScoreInfoTo.Selffs20 = pFrontScoreInfoFrom.selffs20;
      		pFrontScoreInfoTo.Selffs21 = pFrontScoreInfoFrom.selffs21;
      		pFrontScoreInfoTo.Upfs1 = pFrontScoreInfoFrom.upfs1;
      		pFrontScoreInfoTo.Upfs2 = pFrontScoreInfoFrom.upfs2;
      		pFrontScoreInfoTo.Upfs3 = pFrontScoreInfoFrom.upfs3;
      		pFrontScoreInfoTo.Upfs4 = pFrontScoreInfoFrom.upfs4;
      		pFrontScoreInfoTo.Upfs5 = pFrontScoreInfoFrom.upfs5;
      		pFrontScoreInfoTo.Upfs6 = pFrontScoreInfoFrom.upfs6;
      		pFrontScoreInfoTo.Upfs7 = pFrontScoreInfoFrom.upfs7;
      		pFrontScoreInfoTo.Upfs8 = pFrontScoreInfoFrom.upfs8;
      		pFrontScoreInfoTo.Upfs9 = pFrontScoreInfoFrom.upfs9;
      		pFrontScoreInfoTo.Upfs10 = pFrontScoreInfoFrom.upfs10;
      		pFrontScoreInfoTo.Upfs11 = pFrontScoreInfoFrom.upfs11;
      		pFrontScoreInfoTo.Upfs12 = pFrontScoreInfoFrom.upfs12;
      		pFrontScoreInfoTo.Upfs13 = pFrontScoreInfoFrom.upfs13;
      		pFrontScoreInfoTo.Upfs14 = pFrontScoreInfoFrom.upfs14;
      		pFrontScoreInfoTo.Upfs15 = pFrontScoreInfoFrom.upfs15;
      		pFrontScoreInfoTo.Upfs16 = pFrontScoreInfoFrom.upfs16;
      		pFrontScoreInfoTo.Upfs17 = pFrontScoreInfoFrom.upfs17;
      		pFrontScoreInfoTo.Upfs18 = pFrontScoreInfoFrom.upfs18;
      		pFrontScoreInfoTo.Upfs19 = pFrontScoreInfoFrom.upfs19;
      		pFrontScoreInfoTo.Upfs20 = pFrontScoreInfoFrom.upfs20;
      		pFrontScoreInfoTo.Upfs21 = pFrontScoreInfoFrom.upfs21;
      		pFrontScoreInfoTo.Secfs1 = pFrontScoreInfoFrom.secfs1;
      		pFrontScoreInfoTo.Secfs2 = pFrontScoreInfoFrom.secfs2;
      		pFrontScoreInfoTo.Secfs3 = pFrontScoreInfoFrom.secfs3;
      		pFrontScoreInfoTo.Secfs4 = pFrontScoreInfoFrom.secfs4;
      		pFrontScoreInfoTo.Secfs5 = pFrontScoreInfoFrom.secfs5;
      		pFrontScoreInfoTo.Secfs6 = pFrontScoreInfoFrom.secfs6;
      		pFrontScoreInfoTo.Secfs7 = pFrontScoreInfoFrom.secfs7;
      		pFrontScoreInfoTo.Secfs8 = pFrontScoreInfoFrom.secfs8;
      		pFrontScoreInfoTo.Secfs9 = pFrontScoreInfoFrom.secfs9;
      		pFrontScoreInfoTo.Secfs10 = pFrontScoreInfoFrom.secfs10;
      		pFrontScoreInfoTo.Secfs11 = pFrontScoreInfoFrom.secfs11;
      		pFrontScoreInfoTo.Secfs12 = pFrontScoreInfoFrom.secfs12;
      		pFrontScoreInfoTo.Secfs13 = pFrontScoreInfoFrom.secfs13;
      		pFrontScoreInfoTo.Secfs14 = pFrontScoreInfoFrom.secfs14;
      		pFrontScoreInfoTo.Secfs15 = pFrontScoreInfoFrom.secfs15;
      		pFrontScoreInfoTo.Secfs16 = pFrontScoreInfoFrom.secfs16;
      		pFrontScoreInfoTo.Secfs17 = pFrontScoreInfoFrom.secfs17;
      		pFrontScoreInfoTo.Secfs18 = pFrontScoreInfoFrom.secfs18;
      		pFrontScoreInfoTo.Secfs19 = pFrontScoreInfoFrom.secfs19;
      		pFrontScoreInfoTo.Secfs20 = pFrontScoreInfoFrom.secfs20;
      		pFrontScoreInfoTo.Secfs21 = pFrontScoreInfoFrom.secfs21;
     pFrontScoreInfoTo.Loaded=pFrontScoreInfoFrom.Loaded;
 }