Example #1
0
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     int MsScoreId = Convert.ToInt32(((Button)sender).CommandArgument.ToString());
     MarketScoreInfo ms = new MarketScoreInfo(MsScoreId);
     ms.IsSubmit = 1;
     int recvid = Convert.ToInt32(Common.getEmployeeIdOfManager());
     EmployeeInfo em = new EmployeeInfo(Convert.ToInt32(ms.EmployeeId));
     EmployeeInfo ems = new EmployeeInfo(recvid);
     MessageInfo.Msgs1(recvid, ms.MarketScoreId, "~/Score/MarketScoreApprove.aspx", em.EmployeeName + "����������", em.EmployeeName, "daiban", em.EmployeeName + "����������");
     //MessageInfo.SendMail(ems.Qq, "����������", em.EmployeeName + "����������");
     ms.Save();
     gvDataBind();
 }
Example #2
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (IsPageValid())
            {
                int emid = Convert.ToInt32(Session["EmployeeId"]);
                MarketScoreInfo ms = new MarketScoreInfo();
                ms.EmployeeId = emid;
                ms.YearId = Convert.ToInt32(ddlYear.SelectedValue);
                ms.MonthId = Convert.ToInt32(ddlMonth.SelectedValue);
                ms.DateSpan = ddlYear.SelectedItem.Text + "��" + ddlMonth.SelectedItem.Text + "��";
                ms.EvaluateLevelId = 6;
                ms.TotalScore = "����";
                ms.IsSubmit = 0;

                ms.Selfms1 = Request.Form["Selfms1"].ToString();
                ms.Selfms2 = Request.Form["Selfms2"].ToString();
                ms.Selfms3 = Request.Form["Selfms3"].ToString();
                ms.Selfms4 = Request.Form["Selfms4"].ToString();
                ms.Selfms5 = Request.Form["Selfms5"].ToString();
                ms.Selfms6 = Request.Form["Selfms6"].ToString();
                ms.Selfms7 = Request.Form["Selfms7"].ToString();
                ms.Selfms8 = Request.Form["Selfms8"].ToString();
                ms.Selfms9 = Request.Form["Selfms9"].ToString();
                ms.Selfms10 = Request.Form["Selfms10"].ToString();
                ms.Selfms11 = Request.Form["Selfms11"].ToString();
                ms.Selfms12 = Request.Form["Selfms12"].ToString();
                ms.Selfms13 = Request.Form["Selfms13"].ToString();
                ms.Selfms14 = Request.Form["Selfms14"].ToString();
                ms.Selfms15 = Request.Form["Selfms15"].ToString();
                ms.Selfms16 = Request.Form["Selfms16"].ToString();
                ms.Selfms17 = Request.Form["Selfms17"].ToString();
                ms.Selfms18 = Request.Form["Selfms18"].ToString();
                ms.Selfms19 = Request.Form["Selfms19"].ToString();
                ms.Selfms20 = Request.Form["Selfms20"].ToString();
                ms.Selfms21 = Request.Form["Selfms21"].ToString();
                ms.Selfms22 = Request.Form["Selfms22"].ToString();
                ms.Selfms23 = Request.Form["Selfms23"].ToString();
                ms.Selfms24 = Request.Form["Selfms24"].ToString();
                ms.Save();
                Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('����ɹ���');</script>");
            }
        }
        protected void btnSave_Click(object sender, EventArgs e)
        {
            int msid = Convert.ToInt32(Request["MarketScoreId"].ToString());
            MarketScoreInfo ms = new MarketScoreInfo(msid);

            ms.Upms1 = Request.Form["Upms1"].ToString();
            ms.Upms2 = Request.Form["Upms2"].ToString();
            ms.Upms3 = Request.Form["Upms3"].ToString();
            ms.Upms4 = Request.Form["Upms4"].ToString();
            ms.Upms5 = Request.Form["Upms5"].ToString();
            ms.Upms6 = Request.Form["Upms6"].ToString();
            ms.Upms7 = Request.Form["Upms7"].ToString();
            ms.Upms8 = Request.Form["Upms8"].ToString();
            ms.Upms9 = Request.Form["Upms9"].ToString();
            ms.Upms10 = Request.Form["Upms10"].ToString();
            ms.Upms11 = Request.Form["Upms11"].ToString();
            ms.Upms12 = Request.Form["Upms12"].ToString();
            ms.Upms13 = Request.Form["Upms13"].ToString();
            ms.Upms14 = Request.Form["Upms14"].ToString();
            ms.Upms15 = Request.Form["Upms15"].ToString();
            ms.Upms16 = Request.Form["Upms16"].ToString();
            ms.Upms17 = Request.Form["Upms17"].ToString();
            ms.Upms18 = Request.Form["Upms18"].ToString();
            ms.Upms19 = Request.Form["Upms19"].ToString();
            ms.Upms20 = Request.Form["Upms20"].ToString();
            ms.Upms21 = Request.Form["Upms21"].ToString();
            ms.Upms22 = Request.Form["Upms22"].ToString();
            ms.Upms23 = Request.Form["Upms23"].ToString();
            ms.Upms24 = Request.Form["Upms24"].ToString();

            ms.Secms1 = Convert.ToString(Math.Round(float.Parse(lblSelfms1.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upms1"].ToString()), 2) * 0.6);
            ms.Secms2 = Convert.ToString(Math.Round(float.Parse(lblSelfms2.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upms2"].ToString()), 2) * 0.6);
            ms.Secms3 = Convert.ToString(Math.Round(float.Parse(lblSelfms3.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upms3"].ToString()), 2) * 0.6);
            ms.Secms4 = Convert.ToString(Math.Round(float.Parse(lblSelfms4.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upms4"].ToString()), 2) * 0.6);
            ms.Secms5 = Convert.ToString(Math.Round(float.Parse(lblSelfms5.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upms5"].ToString()), 2) * 0.6);
            ms.Secms6 = Convert.ToString(Math.Round(float.Parse(lblSelfms6.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upms6"].ToString()), 2) * 0.6);
            ms.Secms7 = Convert.ToString(Math.Round(float.Parse(lblSelfms7.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upms7"].ToString()), 2) * 0.6);
            ms.Secms8 = Convert.ToString(Math.Round(float.Parse(lblSelfms8.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upms8"].ToString()), 2) * 0.6);
            ms.Secms9 = Convert.ToString(Math.Round(float.Parse(lblSelfms9.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upms9"].ToString()), 2) * 0.6);
            ms.Secms10 = Convert.ToString(Math.Round(float.Parse(lblSelfms10.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upms10"].ToString()), 2) * 0.6);
            ms.Secms11 = Convert.ToString(Math.Round(float.Parse(lblSelfms11.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upms11"].ToString()), 2) * 0.6);
            ms.Secms12 = Convert.ToString(Math.Round(float.Parse(lblSelfms12.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upms12"].ToString()), 2) * 0.6);
            ms.Secms13 = Convert.ToString(Math.Round(float.Parse(lblSelfms13.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upms13"].ToString()), 2) * 0.6);
            ms.Secms14 = Convert.ToString(Math.Round(float.Parse(lblSelfms14.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upms14"].ToString()), 2) * 0.6);
            ms.Secms15 = Convert.ToString(Math.Round(float.Parse(lblSelfms15.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upms15"].ToString()), 2) * 0.6);
            ms.Secms16 = Convert.ToString(Math.Round(float.Parse(lblSelfms16.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upms16"].ToString()), 2) * 0.6);
            ms.Secms17 = Convert.ToString(Math.Round(float.Parse(lblSelfms17.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upms17"].ToString()), 2) * 0.6);
            ms.Secms18 = Convert.ToString(Math.Round(float.Parse(lblSelfms18.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upms18"].ToString()), 2) * 0.6);
            ms.Secms19 = Convert.ToString(Math.Round(float.Parse(lblSelfms19.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upms19"].ToString()), 2) * 0.6);
            ms.Secms20 = Convert.ToString(Math.Round(float.Parse(lblSelfms20.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upms20"].ToString()), 2) * 0.6);
            ms.Secms21 = Convert.ToString(Math.Round(float.Parse(lblSelfms21.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upms21"].ToString()), 2) * 0.6);
            ms.Secms22 = Convert.ToString(Math.Round(float.Parse(lblSelfms22.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upms22"].ToString()), 2) * 0.6);
            ms.Secms23 = Convert.ToString(Math.Round(float.Parse(lblSelfms23.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upms23"].ToString()), 2) * 0.6);
            ms.Secms24 = Convert.ToString(Math.Round(float.Parse(lblSelfms24.Text.ToString()), 2) * 0.4 + Math.Round(float.Parse(Request.Form["Upms24"].ToString()), 2) * 0.6);

            ms.TotalScore = Request.Form["hid"].ToString();
            ms.UpViews = Request.Form["tViews"].ToString();

            float Score = float.Parse(Request.Form["hid"].ToString());
            if (Score > 90)
            {

                ms.EvaluateLevelId = 2;
            }
            else if (Score > 75 && Score < 90)
            {
                ms.EvaluateLevelId = 3;
            }
            else if (Score > 60 && Score < 75)
            {
                ms.EvaluateLevelId = 4;
            }
            else if (Score < 60)
            {
                ms.EvaluateLevelId = 5;
            }

            ms.IsSubmit = 2;
            ms.Save();
            Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('����ɹ���');</script>");
        }
 public object SaveMarketScoreInfo(MarketScoreInfo marketScoreInfo)
 {
     marketScoreInfo.Save();
     return marketScoreInfo . MarketScoreId;
 }