Ejemplo n.º 1
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (IsPageValid())
            {
                try
                {
                    EmployeeInfo em = (EmployeeInfo)Session["Employee"];

                    int             id = Convert.ToInt32(Request["BusinessExpId"].ToString());
                    BusinessExpInfo be = new BusinessExpInfo(id);

                    be.IsApply1 = 1;
                    be.SignName = 2;
                    DateTime dt = DateTime.Now;
                    be.Apply1Time = dt;
                    if (rblOver.Items[0].Selected)
                    {
                        be.IsOver1     = 0;
                        be.IsNewCreate = 1;
                        be.Save();
                        MessageInfo.DelMessageOfMemo(id.ToString());
                    }
                    else
                    {
                        be.IsOver1 = 1;
                        be.Save();
                    }
                    Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('保存成功!');</script>");
                }
                catch (Exception Ex)
                {
                    ClientScript.RegisterStartupScript(this.GetType(), "Save", "alert('保存失败:" + Ex.Message + "');", true);
                }
            }
        }
Ejemplo n.º 2
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (IsPageValid())
            {
                try
                {
                    int             wkid = Convert.ToInt32(Request["BusinessExpId"].ToString());
                    BusinessExpInfo pc   = new BusinessExpInfo(wkid);

                    pc.IsApprove = 1;
                    pc.SignName  = 1;
                    DateTime date = DateTime.Now;
                    pc.ApproveTime = date;
                    if (rblOver.Items[0].Selected)
                    {
                        pc.PreIsOver   = 0;
                        pc.IsNewCreate = 1;
                        pc.Save();
                        Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('您让申请人修正!');</script>");
                    }
                    else if (rblOver.Items[1].Selected)
                    {
                        pc.PreIsOver = 1;
                        int emid = Convert.ToInt32(Common.getEmployeeIdOfManager());//经理接收
                        pc.Recv1EmployeeId = emid;
                        pc.Save();
                        Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('审批通过!');</script>");
                    }
                }
                catch (Exception Ex)
                {
                    ClientScript.RegisterStartupScript(this.GetType(), "Save", "alert('保存失败:" + Ex.Message + "');", true);
                }
            }
        }
Ejemplo n.º 3
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                int             id = Convert.ToInt32(Request["BusinessExpId"].ToString());
                BusinessExpInfo be = new BusinessExpInfo(id);

                be.IsApply2 = 1;
                DateTime dt = DateTime.Now;
                be.Apply2Time = dt;
                if (rblOver.Items[0].Selected)
                {
                    be.IsOver2     = 0;
                    be.IsNewCreate = 1;
                }
                else
                {
                    be.IsOver2 = 1;
                }

                be.Save();
                Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('±£´æ³É¹¦£¡');</script>");
            }
            catch (Exception Ex)
            {
                ClientScript.RegisterStartupScript(this.GetType(), "Save", "alert('±£´æʧ°Ü£º" + Ex.Message + "');", true);
            }
        }
Ejemplo n.º 4
0
        protected void btnAddSheet_Click(object sender, EventArgs e)
        {
            BusinessExpInfo bExp = new BusinessExpInfo();

            bExp.Save();
            int bExpId = Convert.ToInt32(bExp.BusinessExpId);

            Response.Redirect("AddTreat.aspx?BusinessExpId=" + bExpId);
        }
Ejemplo n.º 5
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            int             wksumId = Convert.ToInt32(((Button)sender).CommandArgument.ToString());
            BusinessExpInfo wksum   = new BusinessExpInfo(wksumId);

            if (wksum.PreIsApply == 0)
            {
                wksum.PreIsApply = 1;
                DateTime date = DateTime.Now;
                wksum.PreApplyTime = date;
                int recvemid = Convert.ToInt32(Common.getEmployeeIdOfMarketManager());//市场部经理接收项目立项表
                wksum.RecvEmployeeId = recvemid;
                wksum.Save();
                Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('申请成功!');</script>");
                gvDataBind();
            }
        }
Ejemplo n.º 6
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (IsPageValid())
            {
                try
                {
                    EmployeeInfo em   = (EmployeeInfo)Session["Employee"];
                    int          emid = Convert.ToInt32(Session["EmployeeId"]);

                    MainBusinessExpInfo main = new MainBusinessExpInfo();
                    main.Save();

                    int             bExpId = Convert.ToInt32(Request["BusinessExpId"].ToString());
                    BusinessExpInfo be     = new BusinessExpInfo(bExpId);
                    be.MainBusinessExpId = main.MainBusinessExpId;

                    DateTime date     = DateTime.Now;
                    string   strtoday = DateTime.Now.ToString("yyyyMMdd").Substring(2);
                    be.Today    = strtoday;
                    be.SheetNum = txtSheetNum.Text.ToString();

                    be.ApplyDate   = Convert.ToDateTime(txtApplyDate.Text.ToString());
                    be.ApplyPeople = lblApplyPeople.Text.ToString();
                    be.Depart      = lblDepart.Text.ToString();
                    be.Memo        = txtMemo.Text.ToString();
                    be.ReasonExp   = txtReason.Text.ToString();

                    be.Item1    = txtItem1.Text.ToString();
                    be.Item2    = txtItem2.Text.ToString();
                    be.Item3    = txtItem3.Text.ToString();
                    be.Item4    = txtItem4.Text.ToString();
                    be.Money1   = txtMoney1.Text.ToString();
                    be.Money2   = txtMoney2.Text.ToString();
                    be.Money3   = txtMoney3.Text.ToString();
                    be.Money4   = txtMoney4.Text.ToString();
                    be.MoneySum = txtMoneySum.Text.ToString();

                    string strRoleName = Session["RoleName"].ToString();
                    if (strRoleName == "部门经理")
                    {
                        be.SendEmployeeName = em.EmployeeName;
                        be.SendEmployeeId   = emid;
                        be.PreIsApply       = 1;
                        be.PreIsOver        = 1;
                        be.SignName         = 1;
                    }
                    else
                    {
                        be.PreEmployeeId   = em.EmployeeId;
                        be.PreEmployeeName = em.EmployeeName;
                        be.PreIsApply      = 0;
                        be.PreIsOver       = 0;
                        be.SignName        = 0;
                    }
                    be.IsApply   = 0;
                    be.IsApprove = 0;
                    be.IsApply1  = 0;
                    be.IsApply2  = 0;
                    be.IsOver1   = 0;
                    be.IsOver2   = 0;

                    //GridView嵌套判断
                    be.IsMain      = 1;
                    be.IsMain1     = 1;
                    be.IsMain2     = 1;
                    be.IsMain3     = 1;
                    be.IsNewCreate = 0;
                    be.Save();

                    Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('添加成功!');</script>");
                    //ClearForms();
                    ViewState["Isbtn"] = "1";
                    txtSheetNum.Text   = SheetNums.SheetNumOfBE("ZDFY", strtoday);
                }
                catch (Exception Ex)
                {
                    ClientScript.RegisterStartupScript(this.GetType(), "Save", "alert('添加失败:" + Ex.Message + "');", true);
                }
            }
        }
Ejemplo n.º 7
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (IsPageValid())
            {
                try
                {
                    int             id = Convert.ToInt32(Request["BusinessExpId"].ToString());
                    BusinessExpInfo be = new BusinessExpInfo(id);
                    if (be.IsNewCreate == 1)
                    {
                        be.IsMain  = 0;
                        be.IsMain1 = 0;
                        be.IsMain2 = 0;
                        be.IsMain3 = 0;
                        BusinessExpInfo benew = new BusinessExpInfo();
                        benew.IsNewCreate       = 0;
                        benew.IsMain            = 1;
                        benew.IsMain1           = 1;
                        benew.IsMain2           = 1;
                        benew.IsMain3           = 1;
                        benew.MainBusinessExpId = be.MainBusinessExpId;

                        string strRoleName = Session["RoleName"].ToString();
                        if (strRoleName == "部门经理")
                        {
                            benew.SendEmployeeId   = be.SendEmployeeId;
                            benew.SendEmployeeName = be.SendEmployeeName;
                            benew.PreIsApply       = 1;
                            benew.PreIsOver        = 1;
                            benew.SignName         = 1;
                        }
                        else
                        {
                            benew.PreEmployeeId   = be.PreEmployeeId;
                            benew.PreEmployeeName = be.PreEmployeeName;
                            benew.PreIsApply      = 0;
                            benew.PreIsOver       = 0;
                            benew.SignName        = 0;
                        }

                        benew.IsApply   = 0;
                        benew.IsApprove = 0;
                        benew.IsApply1  = 0;
                        benew.IsApply2  = 0;
                        benew.IsOver1   = 0;
                        benew.IsOver2   = 0;
                        benew.SignName  = 0;

                        DateTime date     = DateTime.Now;
                        string   strtoday = DateTime.Now.ToString("yyyyMMdd").Substring(2);
                        benew.Today    = strtoday;
                        benew.SheetNum = txtSheetNum.Text.ToString();

                        benew.ApplyDate   = Convert.ToDateTime(txtApplyDate.Text.ToString());
                        benew.ApplyPeople = lblApplyPeople.Text.ToString();
                        benew.Depart      = lblDepart.Text.ToString();
                        benew.Memo        = txtMemo.Text.ToString();
                        benew.ReasonExp   = txtReason.Text.ToString();

                        benew.Item1    = txtItem1.Text.ToString();
                        benew.Item2    = txtItem2.Text.ToString();
                        benew.Item3    = txtItem3.Text.ToString();
                        benew.Item4    = txtItem4.Text.ToString();
                        benew.Money1   = txtMoney1.Text.ToString();
                        benew.Money2   = txtMoney2.Text.ToString();
                        benew.Money3   = txtMoney3.Text.ToString();
                        benew.Money4   = txtMoney4.Text.ToString();
                        benew.MoneySum = txtMoneySum.Text.ToString();
                        benew.Save();
                        be.Save();
                        Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('修正成功!');</script>");
                    }
                    else
                    {
                        be.ApplyDate   = Convert.ToDateTime(txtApplyDate.Text.ToString());
                        be.ApplyPeople = lblApplyPeople.Text.ToString();
                        be.Depart      = lblDepart.Text.ToString();
                        be.Memo        = txtMemo.Text.ToString();
                        be.ReasonExp   = txtReason.Text.ToString();
                        be.Item1       = txtItem1.Text.ToString();
                        be.Item2       = txtItem2.Text.ToString();
                        be.Item3       = txtItem3.Text.ToString();
                        be.Item4       = txtItem4.Text.ToString();
                        be.Money1      = txtMoney1.Text.ToString();
                        be.Money2      = txtMoney2.Text.ToString();
                        be.Money3      = txtMoney3.Text.ToString();
                        be.Money4      = txtMoney4.Text.ToString();
                        be.MoneySum    = txtMoneySum.Text.ToString();
                        be.Save();
                        Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('编辑成功!');</script>");
                    }
                }
                catch (Exception Ex)
                {
                    ClientScript.RegisterStartupScript(this.GetType(), "Save", "alert('添加失败:" + Ex.Message + "');", true);
                }
            }
        }