当前位置: 首页>>代码示例>>C#>>正文


C# CAA.CAACommon类代码示例

本文整理汇总了C#中PIC.VDS2G.ACM.CAA.CAACommon的典型用法代码示例。如果您正苦于以下问题:C# CAACommon类的具体用法?C# CAACommon怎么用?C# CAACommon使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CAACommon类属于PIC.VDS2G.ACM.CAA命名空间,在下文中一共展示了CAACommon类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Input

 /// <summary>
 /// 輸入處理
 /// </summary>
 /// <returns>回傳作業成功失敗</returns>
 public bool Input()
 {
     STMModel.CAACommon dbo = new STMModel.CAACommon();
     //StreamWriter Sw = new StreamWriter(@"c:\temp\bbb.txt", true);
     string InputFileName = JobLib.ConfigHelper.GetConfigValue("STD02", "InputFilePath");
     StreamWriter Sw = new StreamWriter(InputFileName, true);
     Sw.WriteLine("InputSTD02...");
     Sw.Flush();
     Sw.Close();
     return true;
 }
开发者ID:ChiangHanLung,项目名称:PIC_VDS,代码行数:15,代码来源:STD02.cs

示例2: CAA23_1

        /// <summary>
        /// 銷項發票/折讓明細表
        /// </summary>
        /// <param name="ParameterList"></param>
        /// <returns></returns>
        public DataTable CAA23_1(ArrayList ParameterList)
        {
            #region 宣告變數

            BCO.CAACommon CAAComm = new BCO.CAACommon();
            ArrayList arl_ReportService = new ArrayList();
            DataTable dt_Return = new DataTable();

            #endregion

            #region 傳入參數

            arl_ReportService.Clear();
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[0].ToString(), "string", false));//[結帳年月]起(0)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[1].ToString(), "string", false));//[結帳年月]迄(1)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[2].ToString(), "string", false));//[開立日期]起(2)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[3].ToString(), "string", false));//[開立日期]迄(3)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[4].ToString(), "string", false));//[店群]起(4)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[5].ToString(), "string", false));//[店群]迄(5)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[6].ToString(), "string", false));//[店號](6)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[7].ToString(), "string", false));//[帳務人員](7)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[8].ToString(), "string", false));//[營業所]起(8)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[9].ToString(), "string", false));//[營業所]迄(9)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[10].ToString(), "string", false));//[營業人員](10)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[11].ToString(), "string", false));//[結帳統編](11)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[12].ToString(), "string", false));//[發票號碼](12)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[13].ToString(), "string", false));//[路線]起(13)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[14].ToString(), "string", false));//[路線]迄(14)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[16].ToString(), "string", false));//[結帳年月-財會]起(15)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[17].ToString(), "string", false));//[結帳年月-財會]迄(16)

            #endregion

            #region 連結資料庫

            BCO.RecordingDiscDetail BCO = new BCO.RecordingDiscDetail(ConntionDB);
            dt_Return = BCO.GetInvDiscDetail(arl_ReportService);

            #endregion

            #region 檢查回傳資料

            if (dt_Return.Rows.Count == 0)
            { throw new Exception("查無資料"); }

            #endregion

            return dt_Return;
        }
开发者ID:ChiangHanLung,项目名称:PIC_VDS,代码行数:54,代码来源:CAA23.cs

示例3: CAA32_1

        /// <summary>
        /// CAA32 頁籤=一二代立沖帳(回復)
        /// </summary>
        /// <param name="ParameterList"></param>
        /// <returns></returns>
        public DataTable CAA32_1(ArrayList ParameterList)
        {
            #region 宣告變數

            BCO.CAACommon CAAComm = new BCO.CAACommon();
            ArrayList arl_ReportService = new ArrayList();
            DataTable dt_Return = new DataTable();

            #endregion

            #region 傳入參數

            arl_ReportService.Clear();
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[0].ToString(), "string", false));//[單號](0)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[1].ToString(), "date", false));//[沖帳日期]起(1)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[2].ToString(), "date", false));//[沖帳日期]迄(2)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[3].ToString(), "string", false));//[來源別](3)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[4].ToString(), "string", false));//[店號](4)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[5].ToString(), "string", false));//[結帳統編](5)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[6].ToString(), "string", false));//[統一編號](6)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[7].ToString(), "string", false));//[利潤中心]起(7)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[8].ToString(), "string", false));//[利潤中心]迄(8)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[9].ToString(), "string", false));//[營業所]起(9)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[10].ToString(), "string", false));//[營業所]迄(10)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[11].ToString(), "string", false));//[營業人員](11)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[12].ToString(), "string", false));//[帳務人員](12)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[13].ToString(), "string", false));//[建立人員](13)

            #endregion

            #region 連結資料庫

            BCO.CAA32_BCO bco = new BCO.CAA32_BCO(ConntionDB);
            dt_Return = bco.QueryPreviousRPT(arl_ReportService);

            #endregion

            #region 檢查回傳資料

            if (dt_Return.Rows.Count == 0)
            { throw new Exception("查無資料"); }

            #endregion

            return dt_Return;
        }
开发者ID:ChiangHanLung,项目名称:PIC_VDS,代码行数:51,代码来源:CAA32.cs

示例4: CAA06_1

        /// <summary>
        /// CAA02報表
        /// </summary>
        /// <param name="ParameterList">變數清單</param>
        /// <returns>回傳查詢結果</returns>
        public DataTable CAA06_1(ArrayList ParameterList)
        {
            #region 宣告變數

            BCO.CAACommon CAAComm = new BCO.CAACommon();
            ArrayList arl_ReportService = new ArrayList();
            DataTable dt_Return = new DataTable();

            #endregion

            #region 傳入參數

            arl_ReportService.Clear();
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[0].ToString(), "string", false));//[報表](0)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[1].ToString(), "date", false));//[兌換日期]起(1)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[2].ToString(), "date", false));//[兌換日期]迄(2)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[3].ToString(), "date", false));//[到期日]起(3)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[4].ToString(), "date", false));//[到期日]迄(4)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[5].ToString(), "string", false));//[結帳統編](5)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[6].ToString(), "string", false));//[統一編號](6)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[7].ToString(), "string", false));//[營業所]起(3)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[8].ToString(), "string", false));//[營業所]迄(8)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[9].ToString(), "string", false));//[帳務人員](9)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[10].ToString(), "string", false));//[登入人員](10)

            #endregion

            #region 連結資料庫

            BCO.MaintainBondMain bco = new BCO.MaintainBondMain(ConntionDB);
            dt_Return = bco.DUEYETORNOTYET(arl_ReportService);

            #endregion

            #region 檢查回傳資料

            if (dt_Return.Rows.Count == 0)
            { throw new Exception("查無資料"); }
            else
            { return dt_Return; }

            #endregion
        }
开发者ID:ChiangHanLung,项目名称:PIC_VDS,代码行数:48,代码来源:CAA06.cs

示例5: CAA20_1

        /// <summary>
        /// CAA02報表
        /// </summary>
        /// <param name="ParameterList">變數清單</param>
        /// <returns>回傳查詢結果</returns>
        public DataTable CAA20_1(ArrayList ParameterList)
        {
            #region 宣告變數

            BCO.CAACommon CAAComm = new BCO.CAACommon();
            ArrayList arl_ReportService = new ArrayList();
            DataTable dt_Return = new DataTable();

            #endregion

            #region 傳入參數

            arl_ReportService.Clear();
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[0].ToString(), "string", false));//[收票日]起
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[1].ToString(), "string", false));//[收票日]迄
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[2].ToString(), "string", false));//[託收日]起
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[3].ToString(), "string", false));//[託收日]迄
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[4].ToString(), "date", false));//[收款單號日期]起
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[5].ToString(), "date", false));//[收款單號日期]迄
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[6].ToString(), "string", false));//[營業所]起
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[7].ToString(), "string", false));//[營業所]迄
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[8].ToString(), "string", false));//[營業人員]
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[9].ToString(), "string", false));//[帳務人員]

            #endregion

            #region 連結資料庫

            BCO.MaintainBondMain bco = new BCO.MaintainBondMain(ConntionDB);
            dt_Return = bco.BondReport(arl_ReportService);

            #endregion

            #region 檢查回傳資料

            if (dt_Return.Rows.Count == 0)
            { throw new Exception("查無資料"); }
            else
            { return dt_Return; }

            #endregion
        }
开发者ID:ChiangHanLung,项目名称:PIC_VDS,代码行数:47,代码来源:CAA20.cs

示例6: CAA34_1

        /// <summary>
        /// CAA34報表
        /// </summary>
        /// <param name="ParameterList">變數清單</param>
        /// <returns>回傳查詢結果</returns>
        public DataTable CAA34_1(ArrayList ParameterList)
        {
            #region 宣告變數

            BCO.CAACommon CAAComm = new BCO.CAACommon();
            ArrayList arl_ReportService = new ArrayList();
            DataTable dt_Return = new DataTable();

            #endregion

            #region 傳入參數

            arl_ReportService.Clear();
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[0].ToString(), "date", false));//[結帳日期]起(1)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[1].ToString(), "date", false));//[結帳日期]迄(2)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[2].ToString(), "string", false));//[利潤中心](3)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[3].ToString(), "string", false));//[利潤中心](4)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[4].ToString(), "string", false));//[科目別]起(5)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[5].ToString(), "string", false));//[開立別]迄(6)
            arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[6].ToString(), "string", false));//[登入人員](7)

            #endregion

            #region 連結資料庫

            BCO.CAA34_BCO bco = new BCO.CAA34_BCO(ConntionDB);
            dt_Return = bco.QueryReport(arl_ReportService);

            #endregion

            #region 檢查回傳資料

            if (dt_Return.Rows.Count == 0)
            { throw new Exception("查無資料"); }
            else
            { return dt_Return; }

            #endregion
        }
开发者ID:ChiangHanLung,项目名称:PIC_VDS,代码行数:44,代码来源:CAA34.cs

示例7: btn_Update_Click

    /// <summary>
    /// 編輯模式下按下[儲存]鈕
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btn_Update_Click(object sender, EventArgs e)
    {
        try
        {
            #region 檢查條件

            BCO.CAACommon CAAComm = new BCO.CAACommon();
            ArrayList arl_Check_Condition = Check_Condition("Edit");

            #region 如果檢查有誤,則Return

            if (arl_Check_Condition[1].ToString() != string.Empty)
            {
                #region 錯誤訊息

                this.ErrorMsgLabel.Text = arl_Check_Condition[1].ToString();

                #endregion

                #region Focus欄位

                if (arl_Check_Condition[0].ToString() != string.Empty)
                {
                    string s_ScriptManager_Script = CAAComm.ToMakeUp_SetFocus_Script(arl_Check_Condition[0].ToString(), true);
                    ScriptManager.RegisterStartupScript(this.UpdatePanel1, typeof(UpdatePanel), "CAA162", s_ScriptManager_Script, true);
                }

                #endregion

                return;
            }

            #endregion

            #endregion

            #region 傳入參數

            string strMsg = string.Empty;
            string strNowDate = DateTime.Now.ToString();
            string strNo = dt.Rows[0]["BOND_NO"].ToString();

            string str_UN_MONTH_CLOSE = "0";
            if (this.cb_UN_MONTH_CLOSE.Checked == true)
            { str_UN_MONTH_CLOSE = "1"; }

            string str_EX_DUE_FLG = "0";
            if (this.cb_EX_DUE_FLG.Checked == true)
            { str_EX_DUE_FLG = "1"; }

            ParameterList.Clear();
            //舊資料
            ParameterList.Add(CAAComm.GetValueSetParameter(dt.Rows[0]["BOND_NO"].ToString(), "string", false)); //V_OLD_BOND_NO
            ParameterList.Add(CAAComm.GetValueSetParameter(dt.Rows[0]["CREATEDATE"].ToString(), "datetime", false)); //D_OLD_CREATEDATE
            ParameterList.Add(CAAComm.GetValueSetParameter(dt.Rows[0]["CREATEUID"].ToString(), "string", false)); //V_OLD_CREATEUID
            ParameterList.Add(CAAComm.GetValueSetParameter(dt.Rows[0]["UPDATEDATE"].ToString(), "datetime", false)); //D_OLD_UPDATEDATE
            ParameterList.Add(CAAComm.GetValueSetParameter(dt.Rows[0]["UPDATEUID"].ToString(), "string", false)); //V_OLD_UPDATEUID
            //新資料
            ParameterList.Add(CAAComm.GetValueSetParameter(this.txt_BOND_NO.Text, "string", false)); //V_NEW_BOND_NO
            ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_STORE_ID.Text, "string", false)); //V_NEW_STORE_ID
            ParameterList.Add(CAAComm.GetValueSetParameter(this.txt_BOND_ID.Text.ToUpper(), "string", false)); //V_NEW_BOND_ID
            ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_BOND_TYPE.Text, "string", false)); //V_NEW_BOND_TYPE
            ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_ACCEPT_BOND_DATE.Text, "date", false)); //D_NEW_ACCEPT_BOND_DATE
            ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_DUE_DATE.Text, "date", false)); //D_NEW_DUE_DATE
            ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_BOND_AMT.Text, "int", false)); //N_NEW_BOND_AMT
            ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_POSTAGE.Text, "int", false)); //N_NEW_POSTAGE
            ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_PAY_BANK.Text, "string", false)); //V_NEW_PAY_BANK
            ParameterList.Add(CAAComm.GetValueSetParameter(this.txt_PAY_ACCOUNT.Text, "string", false)); //V_NEW_PAY_ACCOUNT
            ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_COLL_BANK.Text, "string", false)); //V_NEW_COLL_BANK
            ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_COLL_ID.Text, "string", false)); //V_NEW_COLL_ID
            ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_NB_COLL_DATE.Text, "date", false)); //D_NEW_NB_COLL_DATE
            ParameterList.Add(CAAComm.GetValueSetParameter(this.txt_MEMO.Text, "string", false)); //V_NEW_MEMO
            ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_REJECT_DATE.Text, "date", false)); //D_NEW_REJECT_DATE
            ParameterList.Add(CAAComm.GetValueSetParameter(this.txt_REJECT_MEMO.Text, "string", false)); //V_NEW_REJECT_MEMO
            ParameterList.Add(CAAComm.GetValueSetParameter(str_UN_MONTH_CLOSE, "string", false)); //V_NEW_UN_MONTH_CLOSE
            ParameterList.Add(CAAComm.GetValueSetParameter(str_EX_DUE_FLG, "string", false)); //V_NEW_EX_DUE_FLG
            ParameterList.Add(CAAComm.GetValueSetParameter(strNowDate, "datetime", false)); //D_NEW_UPDATEDATE
            ParameterList.Add(CAAComm.GetValueSetParameter(Session["UID"].ToString(), "string", false)); //V_NEW_UPDATEUID

            #endregion

            #region 組合跳轉頁面字串

            string s_ADDLocation_Replace_String = string.Empty;

            try
            {
                int i_Count = int.Parse(Request.QueryString["CAA162_COUNT"]);
                string s_Request_Key = Request.QueryString["CAA162_PageTimeStamp"];

                s_ADDLocation_Replace_String = "&CAA162_COUNT=" + i_Count.ToString() + "&CAA162_PageTimeStamp=" + s_Request_Key;
            }
            catch { s_ADDLocation_Replace_String = string.Empty; }

            #endregion
//.........这里部分代码省略.........
开发者ID:ChiangHanLung,项目名称:PIC_VDS,代码行数:101,代码来源:CAA162.aspx.cs

示例8: Check_BOND_ID

    private bool Check_BOND_ID()
    {
        bool bResult = false;

        #region 傳入參數

        BCO.CAACommon CAAComm = new BCO.CAACommon();

        ParameterList.Clear();
        ParameterList.Add(CAAComm.GetValueSetParameter(this.txt_BOND_NO.Text, "string", false));//收款單號
        ParameterList.Add(CAAComm.GetValueSetParameter(this.txt_BOND_ID.Text.ToUpper(), "string", false));//票據號碼
        ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_DUE_DATE.Text, "date", false));//到期日
        ParameterList.Add(CAAComm.GetValueSetParameter(Session["UID"].ToString(), "string", false));//登入人員

        #endregion

        #region 連結資料庫

        DataTable dt_Return = new DataTable();
        BCO.MaintainBondRecord bco = new BCO.MaintainBondRecord(ConntionDB);
        dt_Return = bco.CHECK_BOND_ID(ParameterList);

        #endregion

        #region 檢查回傳資料

        if (dt_Return.Rows.Count == 0)
        { bResult = true; }

        #endregion

        return bResult;
    }
开发者ID:ChiangHanLung,项目名称:PIC_VDS,代码行数:33,代码来源:CAA162.aspx.cs

示例9: Check_Condition

    private ArrayList Check_Condition(string s_Type)
    {
        #region 宣告

        BCO.CAACommon CAAComm = new BCO.CAACommon();
        ArrayList arl_Return = new ArrayList();
        arl_Return.Add(string.Empty);//該欄位放Focus欄位之ClientID
        arl_Return.Add(string.Empty);//該欄位放錯誤訊息

        #endregion

        #region [新增][編輯]模式下按下[儲存]鈕

        if (s_Type == "Insert" ||
            s_Type == "Edit")
        {
            #region 檢查必填欄位

            arl_Return = CAAComm.Check_MustFillin_Column(this.slp_STORE_ID.Text, "text", "欄位[客戶代號/名稱]為必填欄位", "1", this.slp_STORE_ID.TextBox_Code.ClientID, arl_Return);
            arl_Return = CAAComm.Check_MustFillin_Column(this.txt_BOND_ID.Text, "text", "欄位[票據號碼]為必填欄位", "1", this.txt_BOND_ID.ClientID, arl_Return);
            arl_Return = CAAComm.Check_MustFillin_Column(this.slp_BOND_TYPE.Text, "text", "欄位[方式]為必填欄位", "1", string.Empty, arl_Return);
            arl_Return = CAAComm.Check_MustFillin_Column(this.slp_ACCEPT_BOND_DATE.Text, "text", "欄位[收票日]為必填欄位", "1", this.slp_ACCEPT_BOND_DATE.DateTextBox.ClientID, arl_Return);
            arl_Return = CAAComm.Check_MustFillin_Column(this.slp_DUE_DATE.Text, "text", "欄位[到期日]為必填欄位", "1", this.slp_DUE_DATE.DateTextBox.ClientID, arl_Return);
            arl_Return = CAAComm.Check_MustFillin_Column(this.slp_BOND_AMT.Text, "text", "欄位[金額]為必填欄位", "1", this.slp_BOND_AMT.TextBox_Code.ClientID, arl_Return);
            arl_Return = CAAComm.Check_MustFillin_Column(this.slp_PAY_BANK.Text, "text", "欄位[付款銀行]為必填欄位", "1", this.slp_PAY_BANK.TextBox_Code.ClientID, arl_Return);
            arl_Return = CAAComm.Check_MustFillin_Column(this.txt_PAY_ACCOUNT.Text, "text", "欄位[付款帳號]為必填欄位", "1", this.txt_PAY_ACCOUNT.ClientID, arl_Return);
            arl_Return = CAAComm.Check_MustFillin_Column(this.slp_NB_COLL_DATE.Text, "text", "欄位[票據託收日/交換日]為必填欄位", "1", this.slp_NB_COLL_DATE.DateTextBox.ClientID, arl_Return);

            #endregion

            #region 如果基本檢查有誤,則Return

            if (arl_Return[1].ToString() != string.Empty)
            { return arl_Return; }

            #endregion

            #region 自訂檢查

            #region 檢查店號

            //新增模式下,店號必須以 sysdate 為基準來做查詢
            if (Check_StoreDate(this.slp_STORE_ID.Text, DateTime.Parse(this.hid_CREATEDATE.Value)) == false)
            { arl_Return = CAAComm.ToMakeUp_Err_ArrayList(arl_Return, "欄位[客戶代號/名稱]必須是有效的客戶代號/名稱", "1", string.Empty); }

            #endregion

            #region 檢查欄位[票據託收日/交換日]必須大於或等於欄位[收票日]

            if (this.slp_NB_COLL_DATE.Text.CompareTo(this.slp_ACCEPT_BOND_DATE.Text) == -1)
            { arl_Return = CAAComm.ToMakeUp_Err_ArrayList(arl_Return, "欄位[票據託收日/交換日]必須大於或等於欄位[收票日]", "1", this.slp_NB_COLL_DATE.DateTextBox.ClientID); }

            #endregion

            #region 檢查[票據號碼]是否重複

            if (Check_BOND_ID() == false)
            { arl_Return = CAAComm.ToMakeUp_Err_ArrayList(arl_Return, "欄位[票據號碼]資料重複", "1", string.Empty); }

            #endregion

            #region 檢查該張支票月份是否月結

            if (Check_BOND_Monthly() == true)
            {
                if (s_Type == "Insert")
                { arl_Return = CAAComm.ToMakeUp_Err_ArrayList(arl_Return, "此支票月份己月結,無法新增支票。", "1", string.Empty); }
                else if (s_Type == "Edit")
                { arl_Return = CAAComm.ToMakeUp_Err_ArrayList(arl_Return, "此支票月份己月結,無法異動支票。", "1", string.Empty); }

            }

            #endregion

            #region 編輯模式下另外檢查該張支票[是否退票][是否兌現][是否沖帳]

            //注意:[檢視]模式下按下[編輯]鈕的檢查,在這邊都要再做一次,才不會有時間差

            if (s_Type == "Edit")
            {
                #region 檢查該張支票是否退票

                if (this.slp_REJECT_DATE.Text != string.Empty)
                { arl_Return = CAAComm.ToMakeUp_Err_ArrayList(arl_Return, "此支票已退票,不允許儲存!", "1", string.Empty); }

                #endregion

                #region 檢查該張支票是否兌現

                if (this.cb_EX_DUE_FLG.Checked == true)
                { arl_Return = CAAComm.ToMakeUp_Err_ArrayList(arl_Return, "此支票已兌現,不允許儲存!", "1", string.Empty); }

                #endregion

                #region 檢查該張支票是否沖帳
                //20101025 Jacky 不用WASH_STATUS爛位做判斷
                //if (this.hid_WASH_STATUS.Value != "0")
                //{ arl_Return = CAAComm.ToMakeUp_Err_ArrayList(arl_Return, "此支票已沖帳,不允許儲存!", "1", string.Empty); }
                if (CheckWASH_YN() == true)
                    arl_Return = CAAComm.ToMakeUp_Err_ArrayList(arl_Return, "此支票已沖帳,不允許修改!", "1", string.Empty);
//.........这里部分代码省略.........
开发者ID:ChiangHanLung,项目名称:PIC_VDS,代码行数:101,代码来源:CAA162.aspx.cs

示例10: Check_Condition

    /// <summary>
    /// 檢查條件
    /// </summary>
    /// <returns></returns>
    private ArrayList Check_Condition(string s_Type)
    {
        #region 宣告

        BCO_CAA.CAACommon CAAComm = new BCO_CAA.CAACommon();
        ArrayList arl_Return = new ArrayList();
        arl_Return.Add(string.Empty);//該欄位放Focus欄位之ClientID
        arl_Return.Add(string.Empty);//該欄位放錯誤訊息

        #endregion

        #region BUTTON [查詢]鈕

        if (s_Type == "BUTTON [查詢]鈕")
        {
            #region 檢查必填欄位

            arl_Return = CAAComm.Check_MustFillin_Column(this.slp_ST_ACCEPT_DATE.Text, "text", "欄位[門市進貨日]為必填欄位", "1", this.slp_ST_ACCEPT_DATE.DateTextBox.ClientID, arl_Return);
            arl_Return = CAAComm.Check_MustFillin_Column(this.txt_PICK_BATCH.Text, "text", "欄位[理貨批次]為必填欄位", "1", this.txt_PICK_BATCH.ClientID, arl_Return);
            arl_Return = CAAComm.Check_MustFillin_Column(this.txt_FULL_BARCODE.Text, "text", "欄位[商品條碼]為必填欄位", "1", this.txt_FULL_BARCODE.ClientID, arl_Return);

            #endregion

            #region 檢查SLP日期格式

            arl_Return = CAAComm.Check_Format_Date(this.slp_ST_ACCEPT_DATE.Text, "欄位[門市進貨日]日期格式錯誤", "1", this.slp_ST_ACCEPT_DATE.DateTextBox.ClientID, arl_Return);

            #endregion

            #region 如果基本檢查有誤,則Return

            if (arl_Return[1].ToString() != string.Empty)
            { return arl_Return; }

            #endregion

            #region 檢查Between欄位[理貨線]

            if (this.ddl_LINE_B.SelectedValue != string.Empty ||
                this.ddl_LINE_E.SelectedValue != string.Empty)
            {
                #region 檢查Between欄位結束欄位一定要大於或等於開始欄位

                arl_Return = CAAComm.Check_Between_End_GreaterThan_Begin
                    (this.ddl_LINE_B.Text,
                     this.ddl_LINE_E.Text,
                     "string",
                     "欄位[理貨線]結束欄位一定要大於或等於開始欄位",
                     "1",
                     string.Empty,
                     arl_Return);

                #endregion
            }

            #endregion
        }

        #endregion

        #region BUTTON [檔案下載]鈕

        else
        {
            #region 檢查儲存 GirdView 的 ViewState 是否有值

            if (dt_Result == null ||
                dt_Result.Rows.Count == 0)
            { arl_Return = CAAComm.ToMakeUp_Err_ArrayList(arl_Return, "無資料可供下載", "1", string.Empty); }

            #endregion
        }

        #endregion

        return arl_Return;
    }
开发者ID:ChiangHanLung,项目名称:PIC_VDS,代码行数:81,代码来源:CGD261.aspx.cs

示例11: but_Query_Click

    /// <summary>
    /// BUTTON [查詢]鈕
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void but_Query_Click(object sender, EventArgs e)
    {
        try
        {
            #region 設定變數

            DataTable dt_Return_UP = new DataTable();

            #endregion

            #region 檢查條件

            BCO_CAA.CAACommon CAAComm = new BCO_CAA.CAACommon();
            ArrayList arl_Check_Condition = Check_Condition("BUTTON [查詢]鈕");

            #region 如果檢查有誤,則Return

            if (arl_Check_Condition[1].ToString() != string.Empty)
            {
                #region 錯誤訊息

                this.ErrorMsgLabel.Text = arl_Check_Condition[1].ToString();

                #endregion

                #region Focus欄位

                if (arl_Check_Condition[0].ToString() != string.Empty)
                {
                    string s_ScriptManager_Script = CAAComm.ToMakeUp_SetFocus_Script(arl_Check_Condition[0].ToString(), true);
                    ScriptManager.RegisterStartupScript(this.up_Msg, typeof(UpdatePanel), "CGD261", s_ScriptManager_Script, true);
                }

                #endregion

                return;
            }

            #endregion

            #endregion

            #region 取得欄位[條碼][二段條碼][品名][品號][期別]

            #region 傳入參數

            ParameterList.Clear();
            ParameterList.Add(CAAComm.GetValueSetParameter(this.txt_FULL_BARCODE.Text, "string", false));//[商品條碼]

            #endregion

            #region 連接資料庫

            BCO_IVM.MaintainDataTrans bco_IVM = new BCO_IVM.MaintainDataTrans(ConntionDB);
            dt_Return_UP = bco_IVM.GetItemByBarCode(ParameterList);

            #endregion

            #region 檢查回傳資料

            if (dt_Return_UP.Rows.Count == 0)
            {
                this.ErrorMsgLabel.Text = "查無資料";

                dt_Result = null;

                this.Repeater1.DataSource = dt_Result;
                this.Repeater1.DataBind();

                this.txt_BARCODE.Text = string.Empty;//條碼
                this.txt_PERIOD_BARCODE.Text = string.Empty;//二段條碼
                this.txt_ITEM_NAME.Text = string.Empty;//品名
                this.txt_ITEM.Text = string.Empty;//品號
                this.txt_PERIOD.Text = string.Empty;//期別           

                return;
            }

            #endregion

            #region 將資料寫入欄位

            this.txt_BARCODE.Text = dt_Return_UP.Rows[0]["BARCODE"].ToString();
            this.txt_PERIOD_BARCODE.Text = dt_Return_UP.Rows[0]["PERIOD_BARCODE"].ToString();
            this.txt_ITEM_NAME.Text = dt_Return_UP.Rows[0]["ITEM_NAME"].ToString();
            this.txt_ITEM.Text = dt_Return_UP.Rows[0]["ITEM"].ToString();
            this.txt_PERIOD.Text = dt_Return_UP.Rows[0]["PERIOD"].ToString();

            #endregion

            #endregion

            #region 傳入參數

            ParameterList.Clear();
//.........这里部分代码省略.........
开发者ID:ChiangHanLung,项目名称:PIC_VDS,代码行数:101,代码来源:CGD261.aspx.cs

示例12: but_Save_Click

    /// <summary>
    /// BUTTON [儲存]鈕
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void but_Save_Click(object sender, EventArgs e)
    {
        try
        {
            #region 新增模式

            if (this.hid_PageStatus.Value == "insert")
            {
                #region 檢查條件

                BCO.CAACommon CAAComm = new BCO.CAACommon();
                ArrayList arl_Check_Condition = Check_Condition("BUTTON [儲存]鈕,新增狀態");

                #region 如果檢查有誤,則Return

                if (arl_Check_Condition[1].ToString() != string.Empty)
                {
                    #region 錯誤訊息

                    this.ErrorMsgLabel.Text = arl_Check_Condition[1].ToString();

                    #endregion

                    #region Focus欄位

                    if (arl_Check_Condition[0].ToString() != string.Empty)
                    {
                        string s_ScriptManager_Script = CAAComm.ToMakeUp_SetFocus_Script(arl_Check_Condition[0].ToString(), true);
                        ScriptManager.RegisterStartupScript(this.up_Msg, typeof(UpdatePanel), "CAA182", s_ScriptManager_Script, true);
                    }

                    #endregion

                    return;
                }

                #endregion

                #endregion

                #region 至資料庫取得Table Schema

                ParameterList.Clear();
                ParameterList.Add(CAAComm.GetValueSetParameter(Session["UID"].ToString(), "string", false));//V_LOG_UPDATEUID

                DataTable dt_Update_Inv = new DataTable();
                DataTable dt_New_Main = new DataTable();
                DataTable dt_New_Detl = new DataTable();

                BCO.MaintainDiscRecord bco = new BCO.MaintainDiscRecord(ConntionDB);
                dt_Update_Inv = bco.GET_VDS_CAA_INV_MAIN_SCHEMA(ParameterList);
                dt_New_Main = bco.GET_VDS_CAA_DISC_MAIN_SCHEMA(ParameterList);
                dt_New_Detl = bco.GET_VDS_CAA_DISC_DETL_SCHEMA(ParameterList);

                #endregion

                #region 將資料寫入Temp Table

                string s_Now = DateTime.Now.ToString();
                string s_CLOSE_MONTH_ACCT = string.Empty;

                #region SLP轉型

                TextBox txt_DISC_AMT = (TextBox)this.slp_DISC_AMT.FindControl("TextBoxCode");//總金額

                #endregion

                #region VDS_CAA_DISC_MAIN

                DataRow dr_New_Main = dt_New_Main.NewRow();

                #region 設定欄位[結帳年月-財會]

                if (this.slp_DISC_SOURCE.Text == "1")//欄位[來源]=系統開立
                { s_CLOSE_MONTH_ACCT = this.slp_CLOSE_MONTH_ACCT.Text; }
                else if (this.slp_DISC_SOURCE.Text == "2")//欄位[來源]=人工開立
                { s_CLOSE_MONTH_ACCT = (this.slp_PROOF_DATE.Text == string.Empty) ? string.Empty : DateTime.Parse(this.slp_PROOF_DATE.Text).ToString("yyyyMM"); }

                #endregion

                dr_New_Main["DISC_FORM"] = CAAComm.GetValueSetParameter(this.slp_DISC_FORM.Text, "int", false);//格式代號
                dr_New_Main["DISC_SOURCE"] = CAAComm.GetValueSetParameter(this.slp_DISC_SOURCE.Text, "int", false);//來源
                dr_New_Main["STORE_ID"] = CAAComm.GetValueSetParameter(this.slp_STORE_ID.Text, "string", false);//店號
                dr_New_Main["DISC_TYPE"] = CAAComm.GetValueSetParameter(this.slp_DISC_TYPE.Text, "string", false);//形式
                dr_New_Main["ROOT_NO"] = CAAComm.GetValueSetParameter(this.slp_ROOT_NO.Text, "string", false);//商品群分類
                dr_New_Main["TAX_TYPE"] = CAAComm.GetValueSetParameter(this.slp_TAX_TYPE.Text, "string", false);//稅別
                dr_New_Main["DISC_DATE"] = CAAComm.GetValueSetParameter(this.slp_DISC_DATE.Text, "date", false);//折讓日期
                dr_New_Main["CHG_DISC_DATE"] = CAAComm.GetValueSetParameter(this.slp_CHG_DISC_DATE.Text, "date", false);//異動折讓日期
                dr_New_Main["ACT_DISC_NO"] = CAAComm.GetValueSetParameter(this.txt_ACT_DISC_NO.Text, "string", false);//財會折讓單號
                dr_New_Main["PROOF_FLG"] = CAAComm.GetValueSetParameter((this.chb_PROOF_FLG.Checked == true) ? "1" : "0", "int", false);//憑證已回
                dr_New_Main["PROOF_DATE"] = CAAComm.GetValueSetParameter(this.slp_PROOF_DATE.Text, "date", false);//憑證已回日期
                dr_New_Main["REPROOF_FLG"] = CAAComm.GetValueSetParameter((this.chb_REPROOF_FLG.Checked == true) ? "1" : "0", "int", false);//取具進項憑証
                dr_New_Main["REPROOF_NO"] = CAAComm.GetValueSetParameter(this.txt_REPROOF_NO.Text, "string", false);//發票號碼/收據
                dr_New_Main["CANCEL_FLG"] = CAAComm.GetValueSetParameter((this.chb_CANCEL_FLG.Checked == true) ? "1" : "0", "int", false);//作廢
                dr_New_Main["CANCEL_DATE"] = CAAComm.GetValueSetParameter(this.slp_CANCEL_DATE.Text, "date", false);//作廢日期
//.........这里部分代码省略.........
开发者ID:ChiangHanLung,项目名称:PIC_VDS,代码行数:101,代码来源:CAA182.aspx.cs

示例13: Check_Condition

    /// <summary>
    /// 檢查條件
    /// </summary>
    /// <param name="s_Type"></param>
    /// <returns></returns>
    private ArrayList Check_Condition(string s_Type)
    {
        #region 宣告

        BCO.CAACommon CAAComm = new BCO.CAACommon();
        ArrayList arl_Return = new ArrayList();
        arl_Return.Add(string.Empty);//該欄位放Focus欄位之ClientID
        arl_Return.Add(string.Empty);//該欄位放錯誤訊息

        #endregion

        #region SLP轉型

        #region 銷或折讓維護區

        TextBox txt_STORE_ID = (TextBox)this.slp_STORE_ID.FindControl("TextBoxCode");//店號
        TextBox txt_ROOT_NO = (TextBox)this.slp_ROOT_NO.FindControl("TextBoxCode");//商品群分類
        TextBox txt_DISC_DATE = (TextBox)this.slp_DISC_DATE.FindControl("TextBoxCode");//折讓日期
        TextBox txt_CHG_DISC_DATE = (TextBox)this.slp_CHG_DISC_DATE.FindControl("TextBoxCode");//異動折讓日期
        TextBox txt_PROOF_DATE = (TextBox)this.slp_PROOF_DATE.FindControl("TextBoxCode");//憑證已回日期
        TextBox txt_CANCEL_DATE = (TextBox)this.slp_CANCEL_DATE.FindControl("TextBoxCode");//作廢日期
        TextBox txt_PERIOD_DATE = (TextBox)this.slp_PERIOD_DATE.FindControl("TextBoxCode");//申報日期
        TextBox txt_TEMPORAL_DATE = (TextBox)this.slp_TEMPORAL_DATE.FindControl("TextBoxCode");//暫收日期
        TextBox txt_DISC_UAMT = (TextBox)this.slp_DISC_UAMT.FindControl("TextBoxCode");//折讓金額(未稅)
        TextBox txt_DISC_TAX = (TextBox)this.slp_DISC_TAX.FindControl("TextBoxCode");//折讓稅額
        TextBox txt_DISC_AMT = (TextBox)this.slp_DISC_AMT.FindControl("TextBoxCode");//總金額
        TextBox txt_CLOSE_MONTH = (TextBox)((ASP.wui_slp_slp_numberupdown_ascx)this.slp_CLOSE_MONTH.FindControl("SLP_NumberUpDown1")).FindControl("TextBoxCode");//結帳年月

        DropDownList drop_DISC_SOURCE = (DropDownList)this.slp_DISC_SOURCE.FindControl("D1");//來源
        DropDownList drop_DISC_TYPE = (DropDownList)this.slp_DISC_TYPE.FindControl("D1");//型式
        DropDownList drop_TAX_TYPE = (DropDownList)this.slp_TAX_TYPE.FindControl("D1");//稅別

        #endregion

        #region 折讓項目區

        TextBox txt_Disc_INV_DATE = (TextBox)this.slp_Disc_INV_DATE.FindControl("TextBoxCode");//發票日期
        TextBox txt_Disc_DISC_UAMT = (TextBox)this.slp_Disc_DISC_UAMT.FindControl("TextBoxCode");//折讓金額(未稅)
        TextBox txt_Disc_DISC_TAX = (TextBox)this.slp_Disc_DISC_TAX.FindControl("TextBoxCode");//折讓稅額
        TextBox txt_Disc_NON_INV_UAMT = (TextBox)this.slp_Disc_NON_INV_UAMT.FindControl("TextBoxCode");//發票餘額(未稅)
        TextBox txt_Disc_NON_INV_TAX = (TextBox)this.slp_Disc_NON_INV_TAX.FindControl("TextBoxCode");//發票稅額

        #endregion

        #endregion

        #region BUTTON [儲存]鈕

        #region 新增狀態

        if (s_Type == "BUTTON [儲存]鈕,新增狀態")
        {
            #region 檢查欄位的Byte長度

            if (CAAComm.Get_Byte_Length(this.txt_ACT_DISC_NO.Text) > 13)
            { arl_Return = CAAComm.ToMakeUp_Err_ArrayList(arl_Return, "欄位[財會折讓單號]長度不可大於 13 Byte", "1", this.txt_ACT_DISC_NO.ClientID); }
            if (CAAComm.Get_Byte_Length(this.txt_REPROOF_NO.Text) > 12)
            { arl_Return = CAAComm.ToMakeUp_Err_ArrayList(arl_Return, "欄位[發票號碼/收據]長度不可大於 12 Byte", "1", this.txt_REPROOF_NO.ClientID); }
            if (CAAComm.Get_Byte_Length(this.txt_RFNO.Text) > 10)
            { arl_Return = CAAComm.ToMakeUp_Err_ArrayList(arl_Return, "欄位[統一編號]長度不可大於 10 Byte", "1", this.txt_RFNO.ClientID); }
            if (CAAComm.Get_Byte_Length(this.txt_MEMO.Text) > 200)
            { arl_Return = CAAComm.ToMakeUp_Err_ArrayList(arl_Return, "欄位[備註]長度不可大於 200 Byte", "1", this.txt_MEMO.ClientID); }

            #endregion

            #region 檢查SLP日期格式

            arl_Return = CAAComm.Check_Format_Date(this.slp_DISC_DATE.Text, "欄位[折讓日期]日期格式錯誤", "1", txt_DISC_DATE.ClientID, arl_Return);
            arl_Return = CAAComm.Check_Format_Date(this.slp_CHG_DISC_DATE.Text, "欄位[異動折讓日期]日期格式錯誤", "1", txt_DISC_DATE.ClientID, arl_Return);
            arl_Return = CAAComm.Check_Format_Date(this.slp_PROOF_DATE.Text, "欄位[憑證已回日期]日期格式錯誤", "1", txt_PROOF_DATE.ClientID, arl_Return);
            arl_Return = CAAComm.Check_Format_Date(this.slp_CANCEL_DATE.Text, "欄位[作廢日期]日期格式錯誤", "1", txt_CANCEL_DATE.ClientID, arl_Return);
            arl_Return = CAAComm.Check_Format_Date(this.slp_PERIOD_DATE.Text, "欄位[申報日期]日期格式錯誤", "1", txt_PERIOD_DATE.ClientID, arl_Return);
            arl_Return = CAAComm.Check_Format_Date(this.slp_TEMPORAL_DATE.Text, "欄位[暫收日期]日期格式錯誤", "1", txt_TEMPORAL_DATE.ClientID, arl_Return);

            #endregion

            #region 檢查SLP數字格式

            arl_Return = CAAComm.Check_Format_Int(this.slp_DISC_UAMT.Text, "欄位[折讓金額(未稅)]數字格式錯誤", "32", "1", txt_DISC_UAMT.ClientID, arl_Return);
            arl_Return = CAAComm.Check_Format_Int(this.slp_DISC_TAX.Text, "欄位[折讓稅額]數字格式錯誤", "32", "1", txt_DISC_TAX.ClientID, arl_Return);
            arl_Return = CAAComm.Check_Format_Int(Request[txt_DISC_AMT.UniqueID].ToString(), "欄位[總金額]數字格式錯誤", "32", "1", txt_DISC_AMT.ClientID, arl_Return);

            #endregion

            #region 檢查SLP年月格式

            arl_Return = CAAComm.Check_Format_YearMonth(this.slp_CLOSE_MONTH.Text, "欄位[結帳年月]年月格式錯誤", "1", txt_CLOSE_MONTH.ClientID, arl_Return);
            arl_Return = CAAComm.Check_Format_YearMonth(this.slp_CLOSE_MONTH_ACCT.Text, "欄位[結帳年月-財會]年月格式錯誤", "1", this.slp_CLOSE_MONTH_ACCT.TextBoxCode_Object.ClientID, arl_Return);

            #endregion

            #region 檢查必填欄位

            arl_Return = CAAComm.Check_MustFillin_Column(drop_DISC_SOURCE.SelectedIndex.ToString(), "drop", "欄位[來源]為必填欄位", "1", string.Empty, arl_Return);
            arl_Return = CAAComm.Check_MustFillin_Column(this.slp_STORE_ID.Text, "text", "欄位[店號]為必填欄位", "1", txt_STORE_ID.ClientID, arl_Return);
//.........这里部分代码省略.........
开发者ID:ChiangHanLung,项目名称:PIC_VDS,代码行数:101,代码来源:CAA182.aspx.cs

示例14: txt_Disc_INV_NO_TextChanged

    /// <summary>
    /// 折讓項目,欄位[發票號碼]TextChanged事件
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void txt_Disc_INV_NO_TextChanged(object sender, EventArgs e)
    {
        try
        {
            #region 新增模式 & 檢視模式

            if (this.hid_PageStatus.Value == "insert" ||
                this.hid_PageStatus.Value == "edit")
            {
                #region 設定變數

                BCO.CAACommon CAAComm = new BCO.CAACommon();

                #endregion

                #region 檢查傳入欄位[發票號碼]的值

                if (this.txt_Disc_INV_NO.Text.Trim() == string.Empty)
                {
                    Set_Disc_NewItem_Default();
                    return;
                }

                #endregion

                #region 若輸入的發票號碼存在於按折讓開立查出的資料

                bool b_IsExist_GetDiscInv = Set_Disc_NewItem_Value(this.txt_Disc_INV_NO.Text, dt_NewItem);

                #endregion

                #region 若輸入的發票號碼不存在於按折讓開立查出的資料

                if (b_IsExist_GetDiscInv == false)
                {
                    #region 傳入參數

                    ParameterList.Clear();
                    ParameterList.Add(CAAComm.GetValueSetParameter("TEXT", "string", false));//[查詢型態]
                    if (this.hid_PageStatus.Value == "insert")
                    { ParameterList.Add(CAAComm.GetValueSetParameter(DateTime.Now.ToString(), "date", false)); }
                    else if (this.hid_PageStatus.Value == "edit")
                    { ParameterList.Add(CAAComm.GetValueSetParameter(this.hid_Record_Date.Value, "date", false)); }//[履歷時間]
                    ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_STORE_ID.Text, "string", false));//[店號]
                    ParameterList.Add(CAAComm.GetValueSetParameter(this.txt_RFNO.Text, "string", false));//[統一編號]
                    ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_ROOT_NO.Text, "string", false));//[商品群分類]
                    ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_TAX_TYPE.Text, "int", false));//[稅別]
                    ParameterList.Add(CAAComm.GetValueSetParameter(this.txt_Disc_INV_NO.Text, "string", false));//[發票號碼]
                    ParameterList.Add(CAAComm.GetValueSetParameter("1", "int", false));//只取第1筆
                    ParameterList.Add(CAAComm.GetValueSetParameter(Session["UID"].ToString(), "string", false));//V_LOG_UPDATEUID

                    #endregion

                    #region 連結資料庫

                    BCO.MaintainDiscRecord bco = new BCO.MaintainDiscRecord(ConntionDB);
                    DataTable dt_Return = bco.GetDetailRecord(ParameterList);

                    #endregion

                    #region 檢查回傳資料

                    #region 如果沒資料

                    if (dt_Return.Rows.Count == 0)
                    {
                        this.ErrorMsgLabel2.Text = "查無發票號碼:" + this.txt_Disc_INV_NO.Text + "的相關資料";
                        Set_Disc_NewItem_Default();
                    }

                    #endregion

                    #region 如果有資料

                    else
                    {
                        Set_Disc_NewItem_Value(this.txt_Disc_INV_NO.Text, dt_Return);

                        #region 使用XML,將資料放置到前端

                        xml_VDS_CAA_INV_MAIN_Data.InnerHtml = dt_Return.DataSet.GetXml();

                        #endregion

                        #region Focus欄位

                        string s_ScriptManager_Script = CAAComm.ToMakeUp_SetFocus_Script(slp_Disc_DISC_UAMT.TextBox_Code.ClientID, true);
                        ScriptManager.RegisterStartupScript(this.up_DiscItem, typeof(UpdatePanel), "CAA182", s_ScriptManager_Script, true);

                        #endregion
                    }

                    #endregion

                    #endregion
//.........这里部分代码省略.........
开发者ID:ChiangHanLung,项目名称:PIC_VDS,代码行数:101,代码来源:CAA182.aspx.cs

示例15: but_Disc_Insert_Click

    /// <summary>
    /// 折讓項目 BUTTON [確認]鈕
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void but_Disc_Insert_Click(object sender, EventArgs e)
    {
        try
        {
            bool b_ExistTempTable = false;

            #region 新增狀態 & 編輯狀態

            if (this.hid_PageStatus.Value == "insert" ||
                this.hid_PageStatus.Value == "edit")
            {
                #region 檢查條件

                BCO.CAACommon CAAComm = new BCO.CAACommon();
                ArrayList arl_Check_Condition = Check_Condition("折讓項目 BUTTON [確認]鈕");

                #region 如果檢查有誤,則Return

                if (arl_Check_Condition[1].ToString() != string.Empty)
                {
                    #region 錯誤訊息

                    this.ErrorMsgLabel2.Text = arl_Check_Condition[1].ToString();

                    #endregion

                    #region Focus欄位

                    if (arl_Check_Condition[0].ToString() != string.Empty)
                    {
                        string s_ScriptManager_Script = CAAComm.ToMakeUp_SetFocus_Script(arl_Check_Condition[0].ToString(), true);
                        ScriptManager.RegisterStartupScript(this.up_Msg, typeof(UpdatePanel), "CAA182", s_ScriptManager_Script, true);
                    }

                    #endregion

                    return;
                }

                #endregion

                #endregion

                #region SLP轉型

                TextBox txt_Disc_DISC_TAX = (TextBox)this.slp_Disc_DISC_TAX.FindControl("TextBoxCode");

                #endregion

                #region 判斷資料是否存在於dt_NewItem

                int i_DISC_UAMT = int.Parse(this.slp_Disc_DISC_UAMT.Text);//折讓金額(未稅)
                int i_DISC_TAX = int.Parse(Request[txt_Disc_DISC_TAX.UniqueID].ToString());//折讓稅額
                int i_Total_NON_INV_UAMT = int.Parse(this.hid_Disc_Total_NON_INV_UAMT.Value);//發票餘額(未稅)+折讓金額(未稅)
                int i_Total_NON_INV_TAX = int.Parse(this.hid_Disc_Total_NON_INV_TAX.Value);//發票稅額+折讓稅額
                bool b_Is_NeedChange = false;

                string s_FilterExpression = "INV_NO = '" + this.txt_Disc_INV_NO.Text + "'";
                DataRow[] dr_Edit = dt_NewItem.Select(s_FilterExpression);

                #region 存在,則更改dt_NewItem的資料

                if (dr_Edit.Length == 1)
                {
                    if (dr_Edit[0].RowState == DataRowState.Added)
                    { b_Is_NeedChange = true; }
                    else
                    {
                        //如果新增項目中的[折讓金額(未稅)][折讓稅額]沒有異動,則不做動作
                        if (
                            (dr_Edit[0]["DISC_UAMT", DataRowVersion.Original].ToString() != i_DISC_UAMT.ToString() || dr_Edit[0]["DISC_TAX", DataRowVersion.Original].ToString() != i_DISC_TAX.ToString()) ||
                            (dr_Edit[0]["DISC_UAMT", DataRowVersion.Current].ToString() != i_DISC_UAMT.ToString() || dr_Edit[0]["DISC_TAX", DataRowVersion.Current].ToString() != i_DISC_TAX.ToString())
                            )
                        { b_Is_NeedChange = true; }
                    }

                    if (b_Is_NeedChange == true)
                    {
                        dr_Edit[0]["INV_NO"] = CAAComm.GetValueSetParameter(this.txt_Disc_INV_NO.Text, "string", false);//發票號碼
                        dr_Edit[0]["INV_DATE"] = CAAComm.GetValueSetParameter(this.slp_Disc_INV_DATE.Text, "date", false);//發票日期
                        dr_Edit[0]["ITEM_NAME"] = CAAComm.GetValueSetParameter(this.txt_Disc_ITEM_NAME.Text, "string", false);//品名
                        dr_Edit[0]["TAX_TYPE"] = CAAComm.GetValueSetParameter(this.slp_Disc_TAX_TYPE.Text, "int", false);//發票稅別
                        dr_Edit[0]["TAX_TYPE_NAME"] = (this.slp_Disc_TAX_TYPE.Text == "0") ? "應稅" : (this.slp_Disc_TAX_TYPE.Text == "1") ? "免稅" : "零稅";
                        dr_Edit[0]["DISC_UAMT"] = CAAComm.GetValueSetParameter(i_DISC_UAMT.ToString(), "int", false);//折讓金額(未稅)
                        dr_Edit[0]["DISC_TAX"] = CAAComm.GetValueSetParameter(i_DISC_TAX.ToString(), "int", false);//折讓稅額
                        dr_Edit[0]["DISC_AMT"] = Convert.ToString(i_DISC_UAMT + i_DISC_TAX);//含稅金額
                        dr_Edit[0]["NON_INV_UAMT"] = CAAComm.GetValueSetParameter(Convert.ToString(i_Total_NON_INV_UAMT - i_DISC_UAMT), "int", false);//發票餘額(未稅)
                        dr_Edit[0]["NON_INV_TAX"] = CAAComm.GetValueSetParameter(Convert.ToString(i_Total_NON_INV_TAX - i_DISC_TAX), "int", false);//發票稅額
                    }

                    b_ExistTempTable = true;
                }

                #endregion

//.........这里部分代码省略.........
开发者ID:ChiangHanLung,项目名称:PIC_VDS,代码行数:101,代码来源:CAA182.aspx.cs


注:本文中的PIC.VDS2G.ACM.CAA.CAACommon类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。