protected void btn_pass_Click(object sender, EventArgs e)
 {
     foreach (GridViewRow row in gv_List.Rows)
     {
         CheckBox cb_check = (CheckBox)row.FindControl("cb_Check");
         if (cb_check.Checked)
         {
             int CurrentJobID = (int)gv_List.DataKeys[row.RowIndex]["FNA_ClientPaymentInfo_ID"];
             FNA_ClientPaymentInfoBLL bll;
             if (CurrentJobID > 0)
             {
                 bll = new FNA_ClientPaymentInfoBLL(CurrentJobID);
                 if(bll.Model.ApproveFlag==2)
                 bll.Confirm((int)Session["UserID"], DateTime.Now);
             }
         }
     }
     Response.Redirect("~/SubModule/FNA/ClientPayment/ClientPaymentList.aspx");
 }
 protected void btn_pass_Click(object sender, EventArgs e)
 {
     foreach (GridViewRow row in gv_List.Rows)
     {
         CheckBox cb_check = (CheckBox)row.FindControl("cb_Check");
         if (cb_check.Checked)
         {
             int CurrentJobID = (int)gv_List.DataKeys[row.RowIndex]["FNA_ClientPaymentInfo_ID"];
             FNA_ClientPaymentInfoBLL bll;
             if (CurrentJobID > 0)
             {
                 bll = new FNA_ClientPaymentInfoBLL(CurrentJobID);
                 if (bll.Model.ApproveFlag == 2)
                 {
                     bll.Confirm((int)Session["UserID"], DateTime.Now);
                 }
             }
         }
     }
     Response.Redirect("~/SubModule/FNA/ClientPayment/ClientPaymentList.aspx");
 }
    protected void bt_Approve_Click(object sender, EventArgs e)
    {
        FNA_ClientPaymentInfoBLL bll;
        if ((int)ViewState["ID"] > 0)
        {
            bt_Save_Click(null, null);

            TextBox tbx_ConfirmDate =UC_DetailView1.FindControl("FNA_ClientpaymentInfo_ConfirmDate")==null ?null: (TextBox)UC_DetailView1.FindControl("FNA_ClientpaymentInfo_ConfirmDate");

            DateTime confirmdate = DateTime.Now;
            if (tbx_ConfirmDate!=null&&!DateTime.TryParse(tbx_ConfirmDate.Text, out confirmdate))
            {
                MessageBox.Show(this, "确认到账日期必需按正确日期格式yyyy-mm-dd填写!");
                return;
            }
            bll = new FNA_ClientPaymentInfoBLL((int)ViewState["ID"]);
            bll.Confirm((int)Session["UserID"], confirmdate);

            Response.Redirect("ClientPaymentList.aspx?ClientID=" + bll.Model.Client.ToString());
        }
    }
Ejemplo n.º 4
0
    protected void bt_Approve_Click(object sender, EventArgs e)
    {
        FNA_ClientPaymentInfoBLL bll;

        if ((int)ViewState["ID"] > 0)
        {
            bt_Save_Click(null, null);

            TextBox tbx_ConfirmDate = UC_DetailView1.FindControl("FNA_ClientpaymentInfo_ConfirmDate") == null ?null: (TextBox)UC_DetailView1.FindControl("FNA_ClientpaymentInfo_ConfirmDate");

            DateTime confirmdate = DateTime.Now;
            if (tbx_ConfirmDate != null && !DateTime.TryParse(tbx_ConfirmDate.Text, out confirmdate))
            {
                MessageBox.Show(this, "确认到账日期必需按正确日期格式yyyy-mm-dd填写!");
                return;
            }
            bll = new FNA_ClientPaymentInfoBLL((int)ViewState["ID"]);
            bll.Confirm((int)Session["UserID"], confirmdate);

            Response.Redirect("ClientPaymentList.aspx?ClientID=" + bll.Model.Client.ToString());
        }
    }