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>");
            }
        }
Exemple #2
0
 protected void gvScore_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         //鼠标移动到每项时颜色交替效果
         e.Row.Attributes.Add("onmouseover", "e=this.style.backgroundColor; this.style.backgroundColor='#c1ebff'");
         e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=e");
         //设置悬浮鼠标指针形状为"小手"
         e.Row.Attributes["style"] = "Cursor:hand";
         if (!Convert.IsDBNull(gvScore.DataKeys[e.Row.RowIndex].Value))
         {
             int            tesid = Convert.ToInt32(gvScore.DataKeys[e.Row.RowIndex].Value);
             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;
             }
         }
     }
 }
        public FrontScoreInfo GetFrontScoreInfoById(int FrontScoreId)
        {
            FrontScoreInfo frontScoreInfo = null;             //

            try
            {
                frontScoreInfo = new FrontScoreInfo(FrontScoreId);
            }
            catch (AppException)
            {
                return(null);
            }

            return(frontScoreInfo);
        }
Exemple #4
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();
        }
Exemple #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))
                //{
                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;
                    }
                }
                // }
            }
        }
Exemple #6
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();
        }
        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();
        }
 public object  SaveFrontScoreInfo(FrontScoreInfo frontScoreInfo)
 {
     frontScoreInfo.Save();
     return(frontScoreInfo.FrontScoreId);
 }
 public List <FrontScoreInfo> GetPagedList(int pPageIndex, int pPageSize, SortDirection pOrderBy, string pSortExpression, out int pRecordCount)
 {
     return(FrontScoreInfo.GetPagedList(pPageIndex, pPageSize, pOrderBy, pSortExpression, out pRecordCount));
 }
 public List <FrontScoreInfo> GetFrontScoreInfoList()
 {
     return(FrontScoreInfo.GetList());
 }
        public void DeleteById(FrontScoreInfo pFrontScoreInfo)
        {
            FrontScoreInfo frontScoreInfo = new FrontScoreInfo(pFrontScoreInfo.FrontScoreId);

            frontScoreInfo.Delete();
        }
Exemple #12
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>");
        }