Esempio n. 1
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (IsPageValid())
            {
                try
                {
                    int wtid = Convert.ToInt32(Request["OfficeApplyId"].ToString());
                    WorkToolSumInfo wt = new WorkToolSumInfo(wtid);

                    wt.DepartView = txtDepartView.Text.ToString();
                    if (rblOver.Items[0].Selected)
                    {
                        wt.State = 2;
                        wt.Save();
                        Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('您让申请人修正!');</script>");

                    }
                    else if (rblOver.Items[1].Selected)
                    {
                        wt.State = 3;
                        wt.Save();
                        Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('审批通过!');</script>");

                    }

                }
                catch (Exception Ex)
                {
                    ClientScript.RegisterStartupScript(this.GetType(), "Save", "alert('保存失败:" + Ex.Message + "');", true);
                }

            }
        }
Esempio n. 2
0
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     int id = Convert.ToInt32(((Button)sender).CommandArgument.ToString());
     WorkToolSumInfo wt = new WorkToolSumInfo(id);
     wt.State = 1;
     wt.ApplyTime = DateTime.Now.ToString();
     wt.Save();
     gvDataBind();
 }
Esempio n. 3
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            try
                {
                    int wtid = Convert.ToInt32(Request["OfficeApplyId"].ToString());
                    WorkToolSumInfo wt = new WorkToolSumInfo(wtid);
                    wt.FuTime = txtFuTime.Text.ToString();
                    wt.UseDepartName = txtUseDepart.Text.ToString();
                    wt.Reason = txtReason.Text.ToString();
                    wt.BigMoney = txtBigMoney.Text.ToString();
                    wt.SmaMoney = txtSmallMoney.Text.ToString();
                    wt.MoneyStyle = txtFuMoney.Text.ToString();
                    wt.DepartView = txtDepartView.Text.ToString();
                    wt.Save();
                    Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('�༭�ɹ���');</script>");

                }
                catch (Exception Ex)
                {
                    ClientScript.RegisterStartupScript(this.GetType(), "Save", "alert('�༭ʧ�ܣ�" + Ex.Message + "');", true);
                }
        }
Esempio n. 4
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     try
         {
             WorkToolSumInfo wt = new WorkToolSumInfo();
             wt.DepartName = Session["DepartName"].ToString();
             wt.ApplyName = Session["EmployeeName"].ToString();
             wt.State = 0;
             wt.FuTime = txtFuTime.Text.ToString();
             wt.UseDepartName = txtUseDepart.Text.ToString();
             wt.Reason = txtReason.Text.ToString();
             wt.BigMoney = txtBigMoney.Text.ToString();
             wt.SmaMoney = txtSmallMoney.Text.ToString();
             wt.MoneyStyle = txtFuMoney.Text.ToString();
             wt.DepartView = txtDepartView.Text.ToString();
             wt.Save();
             Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('��ӳɹ���');</script>");
         }
         catch (Exception Ex)
         {
             ClientScript.RegisterStartupScript(this.GetType(), "Save", "alert('���ʧ�ܣ�" + Ex.Message + "');", true);
         }
 }
 public object SaveWorkToolSumInfo(WorkToolSumInfo workToolSumInfo)
 {
     workToolSumInfo.Save();
     return workToolSumInfo . WorkToolSumId;
 }
 public object  SaveWorkToolSumInfo(WorkToolSumInfo workToolSumInfo)
 {
     workToolSumInfo.Save();
     return(workToolSumInfo.WorkToolSumId);
 }