コード例 #1
0
ファイル: PUR022.aspx.cs プロジェクト: ChiangHanLung/PIC_VDS
    // 整張結案 
    protected void BtnCloseCase_Click(object sender, EventArgs e)
    {
        try
        {
            //判斷採購單的採購日是否己日結
            //VGIModel.CheckVendorAccountClose dbo = new PIC.VDS2G.LGT.VGI.CheckVendorAccountClose(ConntionDB);
            //string IsClosed = dbo.CheckVendorCloseStaus(DateTime.Parse(this.PUR_PURDate.Text).ToString("yyyyMMdd"));
            //if (IsClosed == "1")
            //{
            //    ErrorMsgLabel.Text = "該採購單日已日結,不可進行結案!!";
            //    return;
            //}
            //else
            //{
            MaintainPurchaseOrder bco = new MaintainPurchaseOrder(ConntionDB);
            DataTable MasterOldDt = (DataTable)ViewState["MasterOLDData"];

            ParameterList.Clear();
            ParameterList.Add(Session["UID"].ToString());
            ParameterList.Add(75);

            //做資料儲存的動作
            bco.ClosePurchaseOrder(ParameterList, MasterOldDt.Rows[0], null);

            //存檔後資料重新讀取
            //this.databind();

            //#region 存檔後狀態設定
            //this.hid_PageStatus.Value = "VIEW";
            //this.txt_PageStatus.Text = "VIEW";
            //#endregion

            //SetPageStatus();

            Response.Redirect("PUR022.aspx?PURCHASE_NO=" + MasterOldDt.Rows[0]["PURCHASE_NO"].ToString().Trim() + "&SSID=" + ViewState["SSID"].ToString() + "&mode=VIEW&Code=PUR02", false);
            //}
        }
        catch (Exception ex)
        {
            this.ErrorMsgLabel.Text = ex.Message;
        }
        finally
        {

        }
    }