示例#1
0
        public POS_PT_P002(PP01RespData cust, BasketHeader BasketHeader, List <BasketPay> BasketPays, BasketSubTotal BasketSubTtl, BasketPointSave BasketPointSave, Dictionary <string, object> dicPromoPoint)
        {
            InitializeComponent();

            //회원정보
            _cust = cust;

            //결제 헤더정보`
            _BasketHeader = BasketHeader;

            //결제 결제내역
            _BasketPays = BasketPays;

            //결제 소계정보
            _BasketSubTtl = BasketSubTtl;

            if (BasketPointSave != null)
            {
                _BasketPointSave = BasketPointSave;
            }

            //프로모션정보
            if (dicPromoPoint != null && dicPromoPoint.Count > 0)
            {
                _dicPromoPoint = dicPromoPoint;
            }

            //Form Load Event
            this.Load       += new EventHandler(form_Load);
            this.FormClosed += new FormClosedEventHandler(POS_PT_P002_FormClosed);
        }
示例#2
0
 /// <summary>
 /// 강제취소, 강제진행 한 basket을 요약정보 보여준다
 /// </summary>
 /// <param name="header">원거래 HEADER BASKET</param>
 /// <param name="baskets">강제처리 된 결제BASKET</param>
 public void AutoRtnShowForceCancelBaskets(BasketHeader header, List <BasketBase> baskets)
 {
     using (var pop = ChildManager.ShowPopup(string.Empty,
                                             "WSWD.WmallPos.POS.SL.dll", "WSWD.WmallPos.POS.SL.VC.POS_SL_P006", header, baskets))
     {
         pop.ShowDialog(this);
         Application.DoEvents();
     }
 }
示例#3
0
        /// <summary>
        /// 준비금 DB저장
        /// </summary>
        /// <param name="iPreReserveAmt">이전준비금</param>
        /// <param name="iReserveAmt">준비금</param>
        /// <param name="iReserveAmt">준비금회차</param>
        public void SetCash(Int32 iPreReserveAmt, Int32 iReserveAmt, Int32 iReserveNo)
        {
            #region Basket header

            BasketHeader header = new BasketHeader();
            header.TrxnType = NetCommConstants.TRXN_TYPE_PRE_IO;
            header.CancType = NetCommConstants.CANCEL_TYPE_NORMAL;

            #endregion

            #region Basket details

            BasketReserve basketReserve = new BasketReserve();
            basketReserve.BasketType    = BasketTypes.BasketReserve;
            basketReserve.PayGrpCd      = NetCommConstants.PAYMENT_GROUP_CASH;
            basketReserve.PayDtlCd      = NetCommConstants.PAYMENT_DETAIL_CASH;
            basketReserve.ReserveAmt    = iReserveAmt.ToString();
            basketReserve.PreReserveAmt = iPreReserveAmt.ToString();
            basketReserve.ReserveNo     = iReserveNo.ToString();

            #endregion

            var transdb = TranDbHelper.InitInstance();
            var trans   = transdb.BeginTransaction();

            try
            {
                TransManager.SaveTrans(header, new BasketBase[] { basketReserve }, transdb, trans);

                trans.Commit();

                // TR 완료시
                TransManager.OnTransComplete();
            }
            catch (Exception ex)
            {
                if (trans != null)
                {
                    trans.Rollback();
                }
                LogUtils.Instance.LogException(ex);
                header = null;
            }
            finally
            {
                transdb.EndInstance();
                trans.Dispose();
            }

            if (m_view != null)
            {
                m_view.SetTran(header, basketReserve);
            }
        }
示例#4
0
        /// <summary>
        /// 합계 점검 조회 내역 셋팅
        /// </summary>
        /// <param name="ds">합계 점검 조회 내역 결과</param>
        public void SetTranPrint(DataSet ds, BasketHeader _bpHeader)
        {
            if (osiMsgBar01.ItemStatus != OpenItemStatus.OK || osiMsgBar02.ItemStatus != OpenItemStatus.OK)
            {
                ChildManager.ShowProgress(false);
                SetControlDisable(false);
                return;
            }

            try
            {
                if (ChkPrint())
                {
                    if (ds != null && ds.Tables.Count > 0 && ds.Tables[0] != null)
                    {
                        if (POSPrinterUtils.Instance.SetPrintAccount(true, FXConsts.RECEIPT_NAME_POS_ED_P002, _bpHeader, null, ds.Tables[0], 2).ToString().Length > 0)
                        {
                            osiMsgBar03.MessageText = strMsg05;
                            osiMsgBar03.ItemStatus  = OpenItemStatus.OK;
                            Application.DoEvents();
                        }
                        else
                        {
                            osiMsgBar03.MessageText = strMsg06;
                            osiMsgBar03.ItemStatus  = OpenItemStatus.Error;
                            Application.DoEvents();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                LogUtils.Instance.LogException(ex);
                osiMsgBar03.MessageText = strMsg06;
                osiMsgBar03.ItemStatus  = OpenItemStatus.Error;
                Application.DoEvents();
            }

            if (osiMsgBar03.ItemStatus == OpenItemStatus.OK)
            {
                //AppConfig.ini 파일 초기화
                SetInitConfig();
            }
            else
            {
                ChildManager.ShowProgress(false);
                SetControlDisable(false);
                return;
            }
        }
示例#5
0
        /// <summary>
        /// 포인트적립화면
        /// </summary>
        /// <param name="cust">고객정보</param>
        /// <param name="BasketHeader">결제 헤더정보</param>
        /// <param name="BasketPays">결제 결제내역</param>
        /// <param name="BasketSubTtl">결제 소계정보</param>
        /// <param name="dtPromotion">프로모션 정보</param>
        /// <param name="returnData">포인트 적립정보</param>
        /// <returns></returns>
        public DialogResult ShowPointSavePopup(PP01RespData cust, BasketHeader BasketHeader, List <BasketPay> BasketPays, BasketSubTotal BasketSubTtl, BasketPointSave BasketPointSave, Dictionary <string, object> dicPromoPoint, out object returnData)
        {
            returnData = null;
            using (var pop = ChildManager.ShowPopup(string.Empty, "WSWD.WmallPos.POS.PT.dll",
                                                    "WSWD.WmallPos.POS.PT.VC.POS_PT_P002", cust, BasketHeader, BasketPays,
                                                    BasketSubTtl, BasketPointSave, dicPromoPoint))
            {
                var res = pop.ShowDialog(this);
                Application.DoEvents();

                returnData = pop.ReturnResult.ContainsKey("POINT_DATA") ? pop.ReturnResult["POINT_DATA"] : null;
                return(res);
            }
        }
示例#6
0
        /// <summary>
        /// 합계 점검 조회 내역 셋팅
        /// </summary>
        /// <param name="ds">합계 점검 조회 내역 결과</param>
        public void SetTranPrint(DataSet ds, BasketHeader bpHeader)
        {
            if (osiMsgBar01.ItemStatus != OpenItemStatus.OK || osiMsgBar02.ItemStatus != OpenItemStatus.OK)
            {
                ChildManager.ShowProgress(false);
                SetControlDisable(false);
                return;
            }

            _bpHeader = bpHeader;
            _dtPrint  = null;
            _dtPrint  = ds.Tables[0].Copy();

            timerChk.Tag      = "0";
            timerChk.Interval = 3000; //3초 간격으로 10번 확인
            timerChk.Tick    += new EventHandler(timerChk_Tick);
            timerChk.Enabled  = true;
        }
示例#7
0
        public POS_SL_P005(List <PQ11RespData> presentList, BasketHeader basketHeader)
        {
            InitializeComponent();

            this.m_prsnList = new List <PQ11RespData>();

            if (presentList != null)
            {
                foreach (var prn in presentList)
                {
                    PQ11RespData p = (PQ11RespData)PQ11RespData.Parse(typeof(PQ11RespData), prn.ToString());
                    this.m_prsnList.Add(p);
                }
            }

            this.m_bskHeader = basketHeader;

            // 데이타로드
            FormInitialize();
        }
示例#8
0
 /// <summary>
 /// 준비금 저장 확인후 프린팅
 /// </summary>
 /// <param name="basketHeader">준비금 헤더정보</param>
 /// <param name="basketReserve">준비금 정보</param>
 public void SetTran(BasketHeader basketHeader, BasketReserve basketReserve)
 {
     try
     {
         if (basketHeader != null)
         {
             if (ChkPrint())
             {
                 POSPrinterUtils.Instance.PrintIO_M001(true, basketHeader, basketReserve);
             }
         }
     }
     catch (Exception ex)
     {
         LogUtils.Instance.LogException(ex);
     }
     finally
     {
         SetControlDisable(false);
         this.Close();
     }
 }
示例#9
0
        /// <summary>
        /// TR만들고 보냄
        /// Journal저장
        /// </summary>
        /// <param name="signOn"></param>
        /// <param name="casNo"></param>
        /// <param name="casName"></param>
        /// <param name="printJournal">저널저장여부</param>
        BasketHeader MakeTrans(bool signOn, string casNo, string casName)
        {
            BasketHeader header = new BasketHeader()
            {
                CasNo    = casNo,
                CasName  = casName,
                TrxnType = signOn ? NetCommConstants.TRXN_TYPE_SIGNON : NetCommConstants.TRXN_TYPE_SIGNOFF,
                CancType = "0"
            };

            TranDbHelper      db    = null;
            SQLiteTransaction trans = null;

            try
            {
                db    = TranDbHelper.InitInstance();
                trans = db.BeginTransaction();
                TransManager.SaveTrans(header, null, db, trans);
                trans.Commit();
                TransManager.OnTransComplete();
            }
            catch (Exception ex)
            {
                if (trans != null)
                {
                    trans.Rollback();
                }
                LogUtils.Instance.LogException(ex);
            }
            finally
            {
                trans.Dispose();
                db.Dispose();
            }

            return(header);
        }
示例#10
0
        /// <summary>
        /// 중간입금 차수 및 차수 합계 금액 DB저장
        /// </summary>
        /// <param name="dr">중간입금 Datarow</param>
        /// <param name="dMiddleTotalAmt">중간입금 해당회차 총금액</param>
        public void SetMiddelAmt(string strInputGubun, string strMiddleNo, DataSet ds)
        {
            DataRow drC   = ds.Tables["cash"].Rows[0];   //현금
            DataRow drT   = ds.Tables["ticket"].Rows[0]; //상품권
            DataRow drTNm = ds.Tables["ticket"].Rows[3]; //상품권 명

            int   iTempCnt = 0;                          //총건수
            Int64 iTempAmt = 0;                          //총금액

            #region Basket header

            BasketHeader header = new BasketHeader();
            header.TrxnType = NetCommConstants.TRXN_TYPE_MID_IO;
            header.CancType = NetCommConstants.CANCEL_TYPE_NORMAL;

            #endregion

            #region Basket details

            BasketMiddleDeposit middleDeposit = new BasketMiddleDeposit();
            middleDeposit.BasketType = BasketTypes.BasketMiddleDeposit;

            middleDeposit.InputGubun       = strInputGubun.ToString();
            middleDeposit.MiddleDepositCnt = strMiddleNo;

            iTempCnt  = 0;
            iTempCnt += GetData(drC["txtCashAmt01"]) > 0 ? GetData(drC["txtCashCnt01"]) : 0;
            iTempCnt += GetData(drC["txtCashAmt02"]) > 0 ? GetData(drC["txtCashCnt02"]) : 0;
            iTempCnt += GetData(drC["txtCashAmt03"]) > 0 ? GetData(drC["txtCashCnt03"]) : 0;
            iTempCnt += GetData(drC["txtCashAmt04"]) > 0 ? GetData(drC["txtCashCnt04"]) : 0;
            iTempCnt += GetData(drC["txtCashAmt05"]) > 0 ? GetData(drC["txtCashCnt05"]) : 0;
            iTempCnt += GetData(drC["txtCashAmt06"]) > 0 ? GetData(drC["txtCashCnt06"]) : 0;
            iTempCnt += GetData(drC["txtCashAmt07"]) > 0 ? GetData(drC["txtCashCnt07"]) : 0;
            iTempCnt += GetData(drC["txtCashAmt08"]) > 0 ? GetData(drC["txtCashCnt08"]) : 0;
            iTempCnt += GetData(drC["txtCashAmt09"]) > 0 ? GetData(drC["txtCashCnt09"]) : 0;
            iTempAmt  = 0;
            iTempAmt += GetData(drC["txtCashCnt01"]) > 0 ? GetData(drC["txtCashAmt01"]) : 0;
            iTempAmt += GetData(drC["txtCashCnt02"]) > 0 ? GetData(drC["txtCashAmt02"]) : 0;
            iTempAmt += GetData(drC["txtCashCnt03"]) > 0 ? GetData(drC["txtCashAmt03"]) : 0;
            iTempAmt += GetData(drC["txtCashCnt04"]) > 0 ? GetData(drC["txtCashAmt04"]) : 0;
            iTempAmt += GetData(drC["txtCashCnt05"]) > 0 ? GetData(drC["txtCashAmt05"]) : 0;
            iTempAmt += GetData(drC["txtCashCnt06"]) > 0 ? GetData(drC["txtCashAmt06"]) : 0;
            iTempAmt += GetData(drC["txtCashCnt07"]) > 0 ? GetData(drC["txtCashAmt07"]) : 0;
            iTempAmt += GetData(drC["txtCashCnt08"]) > 0 ? GetData(drC["txtCashAmt08"]) : 0;
            iTempAmt += GetData(drC["txtCashCnt09"]) > 0 ? GetData(drC["txtCashAmt09"]) : 0;

            middleDeposit.CashTotalCnt = iTempCnt > 0 ? iTempCnt.ToString() : "";
            middleDeposit.CashTotalAmt = iTempAmt > 0 ? iTempAmt.ToString() : "";

            int ticketCnt = GetData(drT["txtTicketCnt01"]);
            int ticketAmt = GetData(drT["txtTicketAmt01"]);

            middleDeposit.TicketCnt = GetData(drT["txtTicketAmt01"]) > 0 ? GetDataString(drT["txtTicketCnt01"]) : "";
            middleDeposit.TicketAmt = GetData(drT["txtTicketCnt01"]) > 0 ? GetDataString(drT["txtTicketAmt01"]) : "";

            iTempCnt = 0;
            //iTempCnt += GetData(drT["txtTicketAmt02"]) > 0 ? GetData(drT["txtTicketCnt02"]) : 0;
            iTempCnt += GetData(drT["txtTicketAmt03"]) > 0 ? GetData(drT["txtTicketCnt03"]) : 0;

            /* Loc changed 12.08
             * iTempCnt += GetData(drT["txtTicketAmt04"]) > 0 ? GetData(drT["txtTicketCnt04"]) : 0;
             * iTempCnt += GetData(drT["txtTicketAmt05"]) > 0 ? GetData(drT["txtTicketCnt05"]) : 0;
             * iTempCnt += GetData(drT["txtTicketAmt06"]) > 0 ? GetData(drT["txtTicketCnt06"]) : 0;
             * iTempCnt += GetData(drT["txtTicketAmt07"]) > 0 ? GetData(drT["txtTicketCnt07"]) : 0;
             * iTempCnt += GetData(drT["txtTicketAmt08"]) > 0 ? GetData(drT["txtTicketCnt08"]) : 0;
             * iTempCnt += GetData(drT["txtTicketAmt09"]) > 0 ? GetData(drT["txtTicketCnt09"]) : 0;*/

            iTempAmt = 0;
            //iTempAmt += GetData(drT["txtTicketCnt02"]) > 0 ? GetData(drT["txtTicketAmt02"]) : 0;
            iTempAmt += GetData(drT["txtTicketCnt03"]) > 0 ? GetData(drT["txtTicketAmt03"]) : 0;

            /* Loc changed 12.08
             * iTempAmt += GetData(drT["txtTicketCnt04"]) > 0 ? GetData(drT["txtTicketAmt04"]) : 0;
             * iTempAmt += GetData(drT["txtTicketCnt05"]) > 0 ? GetData(drT["txtTicketAmt05"]) : 0;
             * iTempAmt += GetData(drT["txtTicketCnt06"]) > 0 ? GetData(drT["txtTicketAmt06"]) : 0;
             * iTempAmt += GetData(drT["txtTicketCnt07"]) > 0 ? GetData(drT["txtTicketAmt07"]) : 0;
             * iTempAmt += GetData(drT["txtTicketCnt08"]) > 0 ? GetData(drT["txtTicketAmt08"]) : 0;
             * iTempAmt += GetData(drT["txtTicketCnt09"]) > 0 ? GetData(drT["txtTicketAmt09"]) : 0;*/

            middleDeposit.OtherCompanyTicketTotalCnt = iTempCnt > 0 ? iTempCnt.ToString() : "";
            middleDeposit.OtherCompanyTicketTotalAmt = iTempAmt > 0 ? iTempAmt.ToString() : "";

            middleDeposit.TicketTotalCnt = ticketCnt.ToString();
            middleDeposit.TicketTotalAmt = ticketAmt.ToString();

            middleDeposit.WonCnt_1000000 = GetData(drC["txtCashAmt01"]) > 0 ? GetDataString(drC["txtCashCnt01"]) : "";
            middleDeposit.WonAmt_1000000 = GetData(drC["txtCashCnt01"]) > 0 ? GetDataString(drC["txtCashAmt01"]) : "";
            middleDeposit.WonCnt_50000   = GetData(drC["txtCashAmt02"]) > 0 ? GetDataString(drC["txtCashCnt02"]) : "";
            middleDeposit.WonAmt_50000   = GetData(drC["txtCashCnt02"]) > 0 ? GetDataString(drC["txtCashAmt02"]) : "";
            middleDeposit.WonCnt_10000   = GetData(drC["txtCashAmt03"]) > 0 ? GetDataString(drC["txtCashCnt03"]) : "";
            middleDeposit.WonAmt_10000   = GetData(drC["txtCashCnt03"]) > 0 ? GetDataString(drC["txtCashAmt03"]) : "";
            middleDeposit.WonCnt_5000    = GetData(drC["txtCashAmt04"]) > 0 ? GetDataString(drC["txtCashCnt04"]) : "";
            middleDeposit.WonAmt_5000    = GetData(drC["txtCashCnt04"]) > 0 ? GetDataString(drC["txtCashAmt04"]) : "";
            middleDeposit.WonCnt_1000    = GetData(drC["txtCashAmt05"]) > 0 ? GetDataString(drC["txtCashCnt05"]) : "";
            middleDeposit.WonAmt_1000    = GetData(drC["txtCashCnt05"]) > 0 ? GetDataString(drC["txtCashAmt05"]) : "";
            middleDeposit.WonCnt_500     = GetData(drC["txtCashAmt06"]) > 0 ? GetDataString(drC["txtCashCnt06"]) : "";
            middleDeposit.WonAmt_500     = GetData(drC["txtCashCnt06"]) > 0 ? GetDataString(drC["txtCashAmt06"]) : "";
            middleDeposit.WonCnt_100     = GetData(drC["txtCashAmt07"]) > 0 ? GetDataString(drC["txtCashCnt07"]) : "";
            middleDeposit.WonAmt_100     = GetData(drC["txtCashCnt07"]) > 0 ? GetDataString(drC["txtCashAmt07"]) : "";
            middleDeposit.WonCnt_50      = GetData(drC["txtCashAmt08"]) > 0 ? GetDataString(drC["txtCashCnt08"]) : "";
            middleDeposit.WonAmt_50      = GetData(drC["txtCashCnt08"]) > 0 ? GetDataString(drC["txtCashAmt08"]) : "";
            middleDeposit.WonCnt_10      = GetData(drC["txtCashAmt09"]) > 0 ? GetDataString(drC["txtCashCnt09"]) : "";
            middleDeposit.WonAmt_10      = GetData(drC["txtCashCnt09"]) > 0 ? GetDataString(drC["txtCashAmt09"]) : "";

            // 할인쿠폰
            //if (GetDataString(drTNm["txtTicketAmt02"]) != "")
            //{
            //middleDeposit.OtherCompanyTicketNm_01 = GetDataString(drTNm["txtTicketAmt02"]);
            middleDeposit.DiscCouponAmt = GetData(drT["txtTicketAmt02"]) > 0 ? GetDataString(drT["txtTicketAmt02"]) : "";
            middleDeposit.DiscCouponCnt = GetData(drT["txtTicketCnt02"]) > 0 ? GetDataString(drT["txtTicketCnt02"]) : "";
            //}

            // 타사상품권
            //if (GetDataString(drTNm["txtTicketAmt03"]) != "")
            //{
            middleDeposit.OtherCompanyTicketNm_01  = "타사상품권";   // GetDataString(drTNm["txtTicketAmt03"]);
            middleDeposit.OtherCompanyTicketCnt_01 = GetData(drT["txtTicketAmt03"]) > 0 ? GetDataString(drT["txtTicketCnt03"]) : "";
            middleDeposit.OtherCompanyTicketAmt_01 = GetData(drT["txtTicketCnt03"]) > 0 ? GetDataString(drT["txtTicketAmt03"]) : "";
            //}

            /* LOc changed 12.08
             * if (GetDataString(drTNm["txtTicketAmt04"]) != "")
             * {
             *  middleDeposit.OtherCompanyTicketNm_03 = GetDataString(drTNm["txtTicketAmt04"]);
             *  middleDeposit.OtherCompanyTicketCnt_03 = GetData(drT["txtTicketAmt04"]) > 0 ? GetDataString(drT["txtTicketCnt04"]) : "";
             *  middleDeposit.OtherCompanyTicketAmt_03 = GetData(drT["txtTicketCnt04"]) > 0 ? GetDataString(drT["txtTicketAmt04"]) : "";
             * }
             *
             * if (GetDataString(drTNm["txtTicketAmt05"]) != "")
             * {
             *  middleDeposit.OtherCompanyTicketNm_04 = GetDataString(drTNm["txtTicketAmt05"]);
             *  middleDeposit.OtherCompanyTicketCnt_04 = GetData(drT["txtTicketAmt05"]) > 0 ? GetDataString(drT["txtTicketCnt05"]) : "";
             *  middleDeposit.OtherCompanyTicketAmt_04 = GetData(drT["txtTicketCnt05"]) > 0 ? GetDataString(drT["txtTicketAmt05"]) : "";
             * }
             *
             * if (GetDataString(drTNm["txtTicketAmt06"]) != "")
             * {
             *  middleDeposit.OtherCompanyTicketNm_05 = GetDataString(drTNm["txtTicketAmt06"]);
             *  middleDeposit.OtherCompanyTicketCnt_05 = GetData(drT["txtTicketAmt06"]) > 0 ? GetDataString(drT["txtTicketCnt06"]) : "";
             *  middleDeposit.OtherCompanyTicketAmt_05 = GetData(drT["txtTicketCnt06"]) > 0 ? GetDataString(drT["txtTicketAmt06"]) : "";
             * }
             *
             * if (GetDataString(drTNm["txtTicketAmt07"]) != "")
             * {
             *  middleDeposit.OtherCompanyTicketNm_06 = GetDataString(drTNm["txtTicketAmt07"]);
             *  middleDeposit.OtherCompanyTicketCnt_06 = GetData(drT["txtTicketAmt07"]) > 0 ? GetDataString(drT["txtTicketCnt07"]) : "";
             *  middleDeposit.OtherCompanyTicketAmt_06 = GetData(drT["txtTicketCnt07"]) > 0 ? GetDataString(drT["txtTicketAmt07"]) : "";
             * }
             *
             * if (GetDataString(drTNm["txtTicketAmt08"]) != "")
             * {
             *  middleDeposit.OtherCompanyTicketNm_07 = GetDataString(drTNm["txtTicketAmt08"]);
             *  middleDeposit.OtherCompanyTicketCnt_07 = GetData(drT["txtTicketAmt08"]) > 0 ? GetDataString(drT["txtTicketCnt08"]) : "";
             *  middleDeposit.OtherCompanyTicketAmt_07 = GetData(drT["txtTicketCnt08"]) > 0 ? GetDataString(drT["txtTicketAmt08"]) : "";
             * }
             *
             * if (GetDataString(drTNm["txtTicketAmt09"]) != "")
             * {
             *  middleDeposit.OtherCompanyTicketNm_08 = GetDataString(drTNm["txtTicketAmt09"]);
             *  middleDeposit.OtherCompanyTicketCnt_08 = GetData(drT["txtTicketAmt09"]) > 0 ? GetDataString(drT["txtTicketCnt09"]) : "";
             *  middleDeposit.OtherCompanyTicketAmt_08 = GetData(drT["txtTicketCnt09"]) > 0 ? GetDataString(drT["txtTicketAmt09"]) : "";
             * }*/

            #endregion

            var transdb = TranDbHelper.InitInstance();
            var trans   = transdb.BeginTransaction();

            try
            {
                TransManager.SaveTrans(header, new BasketBase[] { middleDeposit }, transdb, trans);

                trans.Commit();

                // TR 완료시
                TransManager.OnTransComplete();
            }
            catch (Exception ex)
            {
                if (trans != null)
                {
                    trans.Rollback();
                }

                LogUtils.Instance.LogException(ex);
                header = null;
            }
            finally
            {
                transdb.EndInstance();
                trans.Dispose();
            }

            if (m_view != null)
            {
                m_view.SetTran(header, middleDeposit);
            }
        }
示例#11
0
        /// <summary>
        /// POS 정산
        /// </summary>
        /// <param name="strCasNm"></param>
        /// <param name="strSaleDate"></param>
        public void SetTran(WSWD.WmallPos.POS.FX.Win.UserControls.OpenStatusItem osiMsgBar01, WSWD.WmallPos.POS.FX.Win.UserControls.OpenStatusItem osiMsgBar02)
        {
            bool b301 = false;
            bool b302 = false;

            DataSet      ds      = null;
            var          transdb = TranDbHelper.InitInstance();
            var          trans   = transdb.BeginTransaction();
            BasketHeader header  = new BasketHeader();

            try
            {
                #region SAT301T 삭제

                string strSqlP002SetDeleteSAT301T = Extensions.LoadSqlCommand("POS_ED", "P002SetDeleteSAT301T");

                //SAT301T 삭제
                transdb.ExecuteNonQuery(strSqlP002SetDeleteSAT301T,
                                        new string[] { "@DD_SALE", "@CD_STORE", "@NO_POS", "@ID_USER" },
                                        new object[] {
                    ConfigData.Current.AppConfig.PosInfo.SaleDate,
                    ConfigData.Current.AppConfig.PosInfo.StoreNo,
                    ConfigData.Current.AppConfig.PosInfo.PosNo,
                    ConfigData.Current.AppConfig.PosInfo.CasNo
                }, trans);


                osiMsgBar01.MessageText = WSWD.WmallPos.FX.Shared.ConfigData.Current.SysMessage.GetMessage("00308");
                osiMsgBar01.ItemStatus  = WSWD.WmallPos.POS.FX.Win.UserControls.OpenItemStatus.OK;
                Application.DoEvents();

                b301 = true;

                #endregion

                #region SAT302T 조회

                string strSqlP003GetSelectSAT302T = Extensions.LoadSqlCommand("POS_ED", "GetTotal") +
                                                    Extensions.LoadSqlCommand("POS_ED", "GetTotalItem") +
                                                    Extensions.LoadSqlCommand("POS_ED", "P003GetSelectSAT300T");

                ds = transdb.ExecuteQuery(strSqlP003GetSelectSAT302T,
                                          new string[] { "@DD_SALE", "@CD_STORE", "@NO_POS" },
                                          new object[] {
                    ConfigData.Current.AppConfig.PosInfo.SaleDate,
                    ConfigData.Current.AppConfig.PosInfo.StoreNo,
                    ConfigData.Current.AppConfig.PosInfo.PosNo
                }, trans);

                if (ds != null && ds.Tables.Count > 0 && ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
                {
                    b302 = true;

                    #region SAT010T, SAT011T저장

                    //Sign Off Tran 먼저 발생후 마감 Tran
                    if (ConfigData.Current.AppConfig.PosInfo.CasNo.Length > 0)
                    {
                        //Sign Off
                        BasketHeader headerSingOff = new BasketHeader()
                        {
                            CasNo    = ConfigData.Current.AppConfig.PosInfo.CasNo,
                            CasName  = ConfigData.Current.AppConfig.PosInfo.CasName,
                            TrxnType = NetCommConstants.TRXN_TYPE_SIGNOFF,
                            CancType = "0"
                        };

                        TransManager.SaveTrans(headerSingOff, null, transdb, trans);

                        // SaveTrans 함수는 한TRANS에 여러번호출하면
                        // TrxnNo증가해줘야한다
                        TransManager.OnTransComplete();
                    }

                    #region Basket 생성

                    #region Basket header

                    header          = new BasketHeader();
                    header.TrxnType = NetCommConstants.TRXN_TYPE_POS_CLOSE;
                    header.CancType = NetCommConstants.CANCEL_TYPE_NORMAL;

                    #endregion

                    #region Basket details

                    DataRow       dr            = ds.Tables[0].Rows[0];
                    BasketAccount basketAccount = new BasketAccount();
                    basketAccount.BasketType      = BasketTypes.BasketAccount;
                    basketAccount.AccountCode_A00 = NetCommConstants.ID_ITEM_A00;
                    basketAccount.AccountAmt_A00  = dr["AMT_" + NetCommConstants.ID_ITEM_A00] != null && dr["AMT_" + NetCommConstants.ID_ITEM_A00].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_A00].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_A00].ToString() : "";
                    basketAccount.AccountCnt_A00  = dr["CNT_" + NetCommConstants.ID_ITEM_A00] != null && dr["CNT_" + NetCommConstants.ID_ITEM_A00].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_A00].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_A00].ToString() : "";
                    basketAccount.AccountCode_A01 = NetCommConstants.ID_ITEM_A01;
                    basketAccount.AccountAmt_A01  = dr["AMT_" + NetCommConstants.ID_ITEM_A01] != null && dr["AMT_" + NetCommConstants.ID_ITEM_A01].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_A01].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_A01].ToString() : "";
                    basketAccount.AccountCnt_A01  = dr["CNT_" + NetCommConstants.ID_ITEM_A01] != null && dr["CNT_" + NetCommConstants.ID_ITEM_A01].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_A01].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_A01].ToString() : "";
                    basketAccount.AccountCode_A02 = NetCommConstants.ID_ITEM_A02;
                    basketAccount.AccountAmt_A02  = dr["AMT_" + NetCommConstants.ID_ITEM_A02] != null && dr["AMT_" + NetCommConstants.ID_ITEM_A02].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_A02].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_A02].ToString() : "";
                    basketAccount.AccountCnt_A02  = dr["CNT_" + NetCommConstants.ID_ITEM_A02] != null && dr["CNT_" + NetCommConstants.ID_ITEM_A02].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_A02].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_A02].ToString() : "";
                    basketAccount.AccountCode_A03 = NetCommConstants.ID_ITEM_A03;
                    basketAccount.AccountAmt_A03  = dr["AMT_" + NetCommConstants.ID_ITEM_A03] != null && dr["AMT_" + NetCommConstants.ID_ITEM_A03].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_A03].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_A03].ToString() : "";
                    basketAccount.AccountCnt_A03  = dr["CNT_" + NetCommConstants.ID_ITEM_A03] != null && dr["CNT_" + NetCommConstants.ID_ITEM_A03].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_A03].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_A03].ToString() : "";
                    basketAccount.AccountCode_A04 = NetCommConstants.ID_ITEM_A04;
                    basketAccount.AccountAmt_A04  = dr["AMT_" + NetCommConstants.ID_ITEM_A04] != null && dr["AMT_" + NetCommConstants.ID_ITEM_A04].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_A04].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_A04].ToString() : "";
                    basketAccount.AccountCnt_A04  = dr["CNT_" + NetCommConstants.ID_ITEM_A04] != null && dr["CNT_" + NetCommConstants.ID_ITEM_A04].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_A04].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_A04].ToString() : "";
                    basketAccount.AccountCode_A05 = NetCommConstants.ID_ITEM_A05;
                    basketAccount.AccountAmt_A05  = dr["AMT_" + NetCommConstants.ID_ITEM_A05] != null && dr["AMT_" + NetCommConstants.ID_ITEM_A05].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_A05].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_A05].ToString() : "";
                    basketAccount.AccountCnt_A05  = dr["CNT_" + NetCommConstants.ID_ITEM_A05] != null && dr["CNT_" + NetCommConstants.ID_ITEM_A05].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_A05].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_A05].ToString() : "";
                    basketAccount.AccountCode_A06 = NetCommConstants.ID_ITEM_A06;
                    basketAccount.AccountAmt_A06  = dr["AMT_" + NetCommConstants.ID_ITEM_A06] != null && dr["AMT_" + NetCommConstants.ID_ITEM_A06].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_A06].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_A06].ToString() : "";
                    basketAccount.AccountCnt_A06  = dr["CNT_" + NetCommConstants.ID_ITEM_A06] != null && dr["CNT_" + NetCommConstants.ID_ITEM_A06].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_A06].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_A06].ToString() : "";

                    basketAccount.AccountCode_B00 = NetCommConstants.ID_ITEM_B00;
                    basketAccount.AccountAmt_B00  = dr["AMT_" + NetCommConstants.ID_ITEM_B00] != null && dr["AMT_" + NetCommConstants.ID_ITEM_B00].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_B00].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_B00].ToString() : "";
                    basketAccount.AccountCnt_B00  = dr["CNT_" + NetCommConstants.ID_ITEM_B00] != null && dr["CNT_" + NetCommConstants.ID_ITEM_B00].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_B00].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_B00].ToString() : "";
                    basketAccount.AccountCode_B01 = NetCommConstants.ID_ITEM_B01;
                    basketAccount.AccountAmt_B01  = dr["AMT_" + NetCommConstants.ID_ITEM_B01] != null && dr["AMT_" + NetCommConstants.ID_ITEM_B01].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_B01].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_B01].ToString() : "";
                    basketAccount.AccountCnt_B01  = dr["CNT_" + NetCommConstants.ID_ITEM_B01] != null && dr["CNT_" + NetCommConstants.ID_ITEM_B01].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_B01].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_B01].ToString() : "";

                    basketAccount.AccountCode_C00 = NetCommConstants.ID_ITEM_C00;
                    basketAccount.AccountAmt_C00  = dr["AMT_" + NetCommConstants.ID_ITEM_C00] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C00].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C00].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C00].ToString() : "";
                    basketAccount.AccountCnt_C00  = dr["CNT_" + NetCommConstants.ID_ITEM_C00] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C00].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C00].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C00].ToString() : "";
                    basketAccount.AccountCode_C01 = NetCommConstants.ID_ITEM_C01;
                    basketAccount.AccountAmt_C01  = dr["AMT_" + NetCommConstants.ID_ITEM_C01] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C01].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C01].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C01].ToString() : "";
                    basketAccount.AccountCnt_C01  = dr["CNT_" + NetCommConstants.ID_ITEM_C01] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C01].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C01].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C01].ToString() : "";
                    basketAccount.AccountCode_C02 = NetCommConstants.ID_ITEM_C02;
                    basketAccount.AccountAmt_C02  = dr["AMT_" + NetCommConstants.ID_ITEM_C02] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C02].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C02].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C02].ToString() : "";
                    basketAccount.AccountCnt_C02  = dr["CNT_" + NetCommConstants.ID_ITEM_C02] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C02].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C02].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C02].ToString() : "";
                    basketAccount.AccountCode_C03 = NetCommConstants.ID_ITEM_C03;
                    basketAccount.AccountAmt_C03  = dr["AMT_" + NetCommConstants.ID_ITEM_C03] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C03].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C03].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C03].ToString() : "";
                    basketAccount.AccountCnt_C03  = dr["CNT_" + NetCommConstants.ID_ITEM_C03] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C03].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C03].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C03].ToString() : "";
                    basketAccount.AccountCode_C04 = NetCommConstants.ID_ITEM_C04;
                    basketAccount.AccountAmt_C04  = dr["AMT_" + NetCommConstants.ID_ITEM_C04] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C04].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C04].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C04].ToString() : "";
                    basketAccount.AccountCnt_C04  = dr["CNT_" + NetCommConstants.ID_ITEM_C04] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C04].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C04].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C04].ToString() : "";
                    basketAccount.AccountCode_C05 = NetCommConstants.ID_ITEM_C05;
                    basketAccount.AccountAmt_C05  = dr["AMT_" + NetCommConstants.ID_ITEM_C05] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C05].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C05].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C05].ToString() : "";
                    basketAccount.AccountCnt_C05  = dr["CNT_" + NetCommConstants.ID_ITEM_C05] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C05].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C05].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C05].ToString() : "";
                    basketAccount.AccountCode_C06 = NetCommConstants.ID_ITEM_C06;
                    basketAccount.AccountAmt_C06  = dr["AMT_" + NetCommConstants.ID_ITEM_C06] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C06].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C06].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C06].ToString() : "";
                    basketAccount.AccountCnt_C06  = dr["CNT_" + NetCommConstants.ID_ITEM_C06] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C06].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C06].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C06].ToString() : "";
                    basketAccount.AccountCode_C07 = NetCommConstants.ID_ITEM_C07;
                    basketAccount.AccountAmt_C07  = dr["AMT_" + NetCommConstants.ID_ITEM_C07] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C07].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C07].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C07].ToString() : "";
                    basketAccount.AccountCnt_C07  = dr["CNT_" + NetCommConstants.ID_ITEM_C07] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C07].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C07].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C07].ToString() : "";
                    basketAccount.AccountCode_C08 = NetCommConstants.ID_ITEM_C08;
                    basketAccount.AccountAmt_C08  = dr["AMT_" + NetCommConstants.ID_ITEM_C08] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C08].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C08].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C08].ToString() : "";
                    basketAccount.AccountCnt_C08  = dr["CNT_" + NetCommConstants.ID_ITEM_C08] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C08].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C08].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C08].ToString() : "";
                    basketAccount.AccountCode_C09 = NetCommConstants.ID_ITEM_C09;
                    basketAccount.AccountAmt_C09  = dr["AMT_" + NetCommConstants.ID_ITEM_C09] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C09].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C09].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C09].ToString() : "";
                    basketAccount.AccountCnt_C09  = dr["CNT_" + NetCommConstants.ID_ITEM_C09] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C09].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C09].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C09].ToString() : "";
                    basketAccount.AccountCode_C10 = NetCommConstants.ID_ITEM_C10;
                    basketAccount.AccountAmt_C10  = dr["AMT_" + NetCommConstants.ID_ITEM_C10] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C10].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C10].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C10].ToString() : "";
                    basketAccount.AccountCnt_C10  = dr["CNT_" + NetCommConstants.ID_ITEM_C10] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C10].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C10].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C10].ToString() : "";
                    basketAccount.AccountCode_C11 = NetCommConstants.ID_ITEM_C11;
                    basketAccount.AccountAmt_C11  = dr["AMT_" + NetCommConstants.ID_ITEM_C11] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C11].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C11].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C11].ToString() : "";
                    basketAccount.AccountCnt_C11  = dr["CNT_" + NetCommConstants.ID_ITEM_C11] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C11].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C11].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C11].ToString() : "";
                    basketAccount.AccountCode_C12 = NetCommConstants.ID_ITEM_C12;
                    basketAccount.AccountAmt_C12  = dr["AMT_" + NetCommConstants.ID_ITEM_C12] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C12].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C12].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C12].ToString() : "";
                    basketAccount.AccountCnt_C12  = dr["CNT_" + NetCommConstants.ID_ITEM_C12] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C12].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C12].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C12].ToString() : "";
                    basketAccount.AccountCode_C13 = NetCommConstants.ID_ITEM_C13;
                    basketAccount.AccountAmt_C13  = dr["AMT_" + NetCommConstants.ID_ITEM_C13] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C13].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C13].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C13].ToString() : "";
                    basketAccount.AccountCnt_C13  = dr["CNT_" + NetCommConstants.ID_ITEM_C13] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C13].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C13].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C13].ToString() : "";
                    basketAccount.AccountCode_C14 = NetCommConstants.ID_ITEM_C14;
                    basketAccount.AccountAmt_C14  = dr["AMT_" + NetCommConstants.ID_ITEM_C14] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C14].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C14].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C14].ToString() : "";
                    basketAccount.AccountCnt_C14  = dr["CNT_" + NetCommConstants.ID_ITEM_C14] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C14].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C14].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C14].ToString() : "";
                    basketAccount.AccountCode_C15 = NetCommConstants.ID_ITEM_C15;
                    basketAccount.AccountAmt_C15  = dr["AMT_" + NetCommConstants.ID_ITEM_C15] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C15].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C15].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C15].ToString() : "";
                    basketAccount.AccountCnt_C15  = dr["CNT_" + NetCommConstants.ID_ITEM_C15] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C15].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C15].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C15].ToString() : "";
                    basketAccount.AccountCode_C16 = NetCommConstants.ID_ITEM_C16;
                    basketAccount.AccountAmt_C16  = dr["AMT_" + NetCommConstants.ID_ITEM_C16] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C16].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C16].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C16].ToString() : "";
                    basketAccount.AccountCnt_C16  = dr["CNT_" + NetCommConstants.ID_ITEM_C16] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C16].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C16].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C16].ToString() : "";
                    basketAccount.AccountCode_C17 = NetCommConstants.ID_ITEM_C17;
                    basketAccount.AccountAmt_C17  = dr["AMT_" + NetCommConstants.ID_ITEM_C17] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C17].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C17].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C17].ToString() : "";
                    basketAccount.AccountCnt_C17  = dr["CNT_" + NetCommConstants.ID_ITEM_C17] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C17].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C17].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C17].ToString() : "";
                    basketAccount.AccountCode_C18 = NetCommConstants.ID_ITEM_C18;
                    basketAccount.AccountAmt_C18  = dr["AMT_" + NetCommConstants.ID_ITEM_C18] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C18].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C18].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C18].ToString() : "";
                    basketAccount.AccountCnt_C18  = dr["CNT_" + NetCommConstants.ID_ITEM_C18] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C18].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C18].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C18].ToString() : "";
                    basketAccount.AccountCode_C19 = NetCommConstants.ID_ITEM_C19;
                    basketAccount.AccountAmt_C19  = dr["AMT_" + NetCommConstants.ID_ITEM_C19] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C19].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C19].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C19].ToString() : "";
                    basketAccount.AccountCnt_C19  = dr["CNT_" + NetCommConstants.ID_ITEM_C19] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C19].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C19].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C19].ToString() : "";
                    basketAccount.AccountCode_C20 = NetCommConstants.ID_ITEM_C20;
                    basketAccount.AccountAmt_C20  = dr["AMT_" + NetCommConstants.ID_ITEM_C20] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C20].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C20].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C20].ToString() : "";
                    basketAccount.AccountCnt_C20  = dr["CNT_" + NetCommConstants.ID_ITEM_C20] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C20].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C20].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C20].ToString() : "";
                    basketAccount.AccountCode_C21 = NetCommConstants.ID_ITEM_C21;
                    basketAccount.AccountAmt_C21  = dr["AMT_" + NetCommConstants.ID_ITEM_C21] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C21].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C21].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C21].ToString() : "";
                    basketAccount.AccountCnt_C21  = dr["CNT_" + NetCommConstants.ID_ITEM_C21] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C21].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C21].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C21].ToString() : "";
                    basketAccount.AccountCode_C22 = NetCommConstants.ID_ITEM_C22;
                    basketAccount.AccountAmt_C22  = dr["AMT_" + NetCommConstants.ID_ITEM_C22] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C22].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C22].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C22].ToString() : "";
                    basketAccount.AccountCnt_C22  = dr["CNT_" + NetCommConstants.ID_ITEM_C22] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C22].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C22].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C22].ToString() : "";
                    basketAccount.AccountCode_C23 = NetCommConstants.ID_ITEM_C23;
                    basketAccount.AccountAmt_C23  = dr["AMT_" + NetCommConstants.ID_ITEM_C23] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C23].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C23].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C23].ToString() : "";
                    basketAccount.AccountCnt_C23  = dr["CNT_" + NetCommConstants.ID_ITEM_C23] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C23].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C23].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C23].ToString() : "";

                    basketAccount.AccountCode_D00 = NetCommConstants.ID_ITEM_D00;
                    basketAccount.AccountAmt_D00  = dr["AMT_" + NetCommConstants.ID_ITEM_D00] != null && dr["AMT_" + NetCommConstants.ID_ITEM_D00].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_D00].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_D00].ToString() : "";
                    basketAccount.AccountCnt_D00  = dr["CNT_" + NetCommConstants.ID_ITEM_D00] != null && dr["CNT_" + NetCommConstants.ID_ITEM_D00].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_D00].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_D00].ToString() : "";

                    basketAccount.AccountCode_E00 = NetCommConstants.ID_ITEM_E00;
                    basketAccount.AccountAmt_E00  = dr["AMT_" + NetCommConstants.ID_ITEM_E00] != null && dr["AMT_" + NetCommConstants.ID_ITEM_E00].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_E00].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_E00].ToString() : "";
                    basketAccount.AccountCnt_E00  = dr["CNT_" + NetCommConstants.ID_ITEM_E00] != null && dr["CNT_" + NetCommConstants.ID_ITEM_E00].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_E00].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_E00].ToString() : "";
                    basketAccount.AccountCode_E01 = NetCommConstants.ID_ITEM_E01;
                    basketAccount.AccountAmt_E01  = dr["AMT_" + NetCommConstants.ID_ITEM_E01] != null && dr["AMT_" + NetCommConstants.ID_ITEM_E01].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_E01].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_E01].ToString() : "";
                    basketAccount.AccountCnt_E01  = dr["CNT_" + NetCommConstants.ID_ITEM_E01] != null && dr["CNT_" + NetCommConstants.ID_ITEM_E01].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_E01].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_E01].ToString() : "";
                    basketAccount.AccountCode_E02 = NetCommConstants.ID_ITEM_E02;
                    basketAccount.AccountAmt_E02  = dr["AMT_" + NetCommConstants.ID_ITEM_E02] != null && dr["AMT_" + NetCommConstants.ID_ITEM_E02].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_E02].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_E02].ToString() : "";
                    basketAccount.AccountCnt_E02  = dr["CNT_" + NetCommConstants.ID_ITEM_E02] != null && dr["CNT_" + NetCommConstants.ID_ITEM_E02].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_E02].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_E02].ToString() : "";
                    basketAccount.AccountCode_E03 = NetCommConstants.ID_ITEM_E03;
                    basketAccount.AccountAmt_E03  = dr["AMT_" + NetCommConstants.ID_ITEM_E03] != null && dr["AMT_" + NetCommConstants.ID_ITEM_E03].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_E03].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_E03].ToString() : "";
                    basketAccount.AccountCnt_E03  = dr["CNT_" + NetCommConstants.ID_ITEM_E03] != null && dr["CNT_" + NetCommConstants.ID_ITEM_E03].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_E03].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_E03].ToString() : "";
                    basketAccount.AccountCode_E04 = NetCommConstants.ID_ITEM_E04;
                    basketAccount.AccountAmt_E04  = dr["AMT_" + NetCommConstants.ID_ITEM_E04] != null && dr["AMT_" + NetCommConstants.ID_ITEM_E04].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_E04].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_E04].ToString() : "";
                    basketAccount.AccountCnt_E04  = dr["CNT_" + NetCommConstants.ID_ITEM_E04] != null && dr["CNT_" + NetCommConstants.ID_ITEM_E04].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_E04].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_E04].ToString() : "";
                    basketAccount.AccountCode_E05 = NetCommConstants.ID_ITEM_E05;
                    basketAccount.AccountAmt_E05  = dr["AMT_" + NetCommConstants.ID_ITEM_E05] != null && dr["AMT_" + NetCommConstants.ID_ITEM_E05].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_E05].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_E05].ToString() : "";
                    basketAccount.AccountCnt_E05  = dr["CNT_" + NetCommConstants.ID_ITEM_E05] != null && dr["CNT_" + NetCommConstants.ID_ITEM_E05].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_E05].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_E05].ToString() : "";
                    basketAccount.AccountCode_E10 = NetCommConstants.ID_ITEM_E10;
                    basketAccount.AccountAmt_E10  = dr["AMT_" + NetCommConstants.ID_ITEM_E10] != null && dr["AMT_" + NetCommConstants.ID_ITEM_E10].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_E10].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_E10].ToString() : "";
                    basketAccount.AccountCnt_E10  = dr["CNT_" + NetCommConstants.ID_ITEM_E10] != null && dr["CNT_" + NetCommConstants.ID_ITEM_E10].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_E10].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_E10].ToString() : "";
                    basketAccount.AccountCode_E21 = NetCommConstants.ID_ITEM_E21;
                    basketAccount.AccountAmt_E21  = dr["AMT_" + NetCommConstants.ID_ITEM_E21] != null && dr["AMT_" + NetCommConstants.ID_ITEM_E21].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_E21].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_E21].ToString() : "";
                    basketAccount.AccountCnt_E21  = dr["CNT_" + NetCommConstants.ID_ITEM_E21] != null && dr["CNT_" + NetCommConstants.ID_ITEM_E21].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_E21].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_E21].ToString() : "";
                    basketAccount.AccountCode_E22 = NetCommConstants.ID_ITEM_E22;
                    basketAccount.AccountAmt_E22  = dr["AMT_" + NetCommConstants.ID_ITEM_E22] != null && dr["AMT_" + NetCommConstants.ID_ITEM_E22].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_E22].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_E22].ToString() : "";
                    basketAccount.AccountCnt_E22  = dr["CNT_" + NetCommConstants.ID_ITEM_E22] != null && dr["CNT_" + NetCommConstants.ID_ITEM_E22].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_E22].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_E22].ToString() : "";
                    basketAccount.AccountCode_E23 = NetCommConstants.ID_ITEM_E23;
                    basketAccount.AccountAmt_E23  = dr["AMT_" + NetCommConstants.ID_ITEM_E23] != null && dr["AMT_" + NetCommConstants.ID_ITEM_E23].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_E23].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_E23].ToString() : "";
                    basketAccount.AccountCnt_E23  = dr["CNT_" + NetCommConstants.ID_ITEM_E23] != null && dr["CNT_" + NetCommConstants.ID_ITEM_E23].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_E23].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_E23].ToString() : "";
                    basketAccount.AccountCode_E24 = NetCommConstants.ID_ITEM_E24;
                    basketAccount.AccountAmt_E24  = dr["AMT_" + NetCommConstants.ID_ITEM_E24] != null && dr["AMT_" + NetCommConstants.ID_ITEM_E24].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_E24].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_E24].ToString() : "";
                    basketAccount.AccountCnt_E24  = dr["CNT_" + NetCommConstants.ID_ITEM_E24] != null && dr["CNT_" + NetCommConstants.ID_ITEM_E24].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_E24].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_E24].ToString() : "";
                    basketAccount.AccountCode_E25 = NetCommConstants.ID_ITEM_E25;
                    basketAccount.AccountAmt_E25  = dr["AMT_" + NetCommConstants.ID_ITEM_E25] != null && dr["AMT_" + NetCommConstants.ID_ITEM_E25].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_E25].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_E25].ToString() : "";
                    basketAccount.AccountCnt_E25  = dr["CNT_" + NetCommConstants.ID_ITEM_E25] != null && dr["CNT_" + NetCommConstants.ID_ITEM_E25].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_E25].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_E25].ToString() : "";
                    basketAccount.AccountCode_E30 = NetCommConstants.ID_ITEM_E30;
                    basketAccount.AccountAmt_E30  = dr["AMT_" + NetCommConstants.ID_ITEM_E30] != null && dr["AMT_" + NetCommConstants.ID_ITEM_E30].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_E30].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_E30].ToString() : "";
                    basketAccount.AccountCnt_E30  = dr["CNT_" + NetCommConstants.ID_ITEM_E30] != null && dr["CNT_" + NetCommConstants.ID_ITEM_E30].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_E30].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_E30].ToString() : "";
                    basketAccount.AccountCode_E40 = NetCommConstants.ID_ITEM_E40;
                    basketAccount.AccountAmt_E40  = dr["AMT_" + NetCommConstants.ID_ITEM_E40] != null && dr["AMT_" + NetCommConstants.ID_ITEM_E40].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_E40].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_E40].ToString() : "";
                    basketAccount.AccountCnt_E40  = dr["CNT_" + NetCommConstants.ID_ITEM_E40] != null && dr["CNT_" + NetCommConstants.ID_ITEM_E40].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_E40].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_E40].ToString() : "";

                    basketAccount.AccountCode_F00 = NetCommConstants.ID_ITEM_F00;
                    basketAccount.AccountAmt_F00  = dr["AMT_" + NetCommConstants.ID_ITEM_F00] != null && dr["AMT_" + NetCommConstants.ID_ITEM_F00].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_F00].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_F00].ToString() : "";
                    basketAccount.AccountCnt_F00  = dr["CNT_" + NetCommConstants.ID_ITEM_F00] != null && dr["CNT_" + NetCommConstants.ID_ITEM_F00].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_F00].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_F00].ToString() : "";
                    basketAccount.AccountCode_F01 = NetCommConstants.ID_ITEM_F01;
                    basketAccount.AccountAmt_F01  = dr["AMT_" + NetCommConstants.ID_ITEM_F01] != null && dr["AMT_" + NetCommConstants.ID_ITEM_F01].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_F01].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_F01].ToString() : "";
                    basketAccount.AccountCnt_F01  = dr["CNT_" + NetCommConstants.ID_ITEM_F01] != null && dr["CNT_" + NetCommConstants.ID_ITEM_F01].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_F01].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_F01].ToString() : "";
                    basketAccount.AccountCode_F02 = NetCommConstants.ID_ITEM_F02;
                    basketAccount.AccountAmt_F02  = dr["AMT_" + NetCommConstants.ID_ITEM_F02] != null && dr["AMT_" + NetCommConstants.ID_ITEM_F02].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_F02].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_F02].ToString() : "";
                    basketAccount.AccountCnt_F02  = dr["CNT_" + NetCommConstants.ID_ITEM_F02] != null && dr["CNT_" + NetCommConstants.ID_ITEM_F02].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_F02].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_F02].ToString() : "";
                    basketAccount.AccountCode_F03 = NetCommConstants.ID_ITEM_F03;
                    basketAccount.AccountAmt_F03  = dr["AMT_" + NetCommConstants.ID_ITEM_F03] != null && dr["AMT_" + NetCommConstants.ID_ITEM_F03].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_F03].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_F03].ToString() : "";
                    basketAccount.AccountCnt_F03  = dr["CNT_" + NetCommConstants.ID_ITEM_F03] != null && dr["CNT_" + NetCommConstants.ID_ITEM_F03].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_F03].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_F03].ToString() : "";
                    basketAccount.AccountCode_F04 = NetCommConstants.ID_ITEM_F04;
                    basketAccount.AccountAmt_F04  = dr["AMT_" + NetCommConstants.ID_ITEM_F04] != null && dr["AMT_" + NetCommConstants.ID_ITEM_F04].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_F04].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_F04].ToString() : "";
                    basketAccount.AccountCnt_F04  = dr["CNT_" + NetCommConstants.ID_ITEM_F04] != null && dr["CNT_" + NetCommConstants.ID_ITEM_F04].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_F04].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_F04].ToString() : "";
                    basketAccount.AccountCode_F05 = NetCommConstants.ID_ITEM_F05;
                    basketAccount.AccountAmt_F05  = dr["AMT_" + NetCommConstants.ID_ITEM_F05] != null && dr["AMT_" + NetCommConstants.ID_ITEM_F05].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_F05].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_F05].ToString() : "";
                    basketAccount.AccountCnt_F05  = dr["CNT_" + NetCommConstants.ID_ITEM_F05] != null && dr["CNT_" + NetCommConstants.ID_ITEM_F05].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_F05].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_F05].ToString() : "";

                    basketAccount.AccountCode_G00 = NetCommConstants.ID_ITEM_G00;
                    basketAccount.AccountAmt_G00  = dr["AMT_" + NetCommConstants.ID_ITEM_G00] != null && dr["AMT_" + NetCommConstants.ID_ITEM_G00].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_G00].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_G00].ToString() : "";
                    basketAccount.AccountCnt_G00  = dr["CNT_" + NetCommConstants.ID_ITEM_G00] != null && dr["CNT_" + NetCommConstants.ID_ITEM_G00].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_G00].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_G00].ToString() : "";
                    basketAccount.AccountCode_G01 = NetCommConstants.ID_ITEM_G01;
                    basketAccount.AccountAmt_G01  = dr["AMT_" + NetCommConstants.ID_ITEM_G01] != null && dr["AMT_" + NetCommConstants.ID_ITEM_G01].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_G01].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_G01].ToString() : "";
                    basketAccount.AccountCnt_G01  = dr["CNT_" + NetCommConstants.ID_ITEM_G01] != null && dr["CNT_" + NetCommConstants.ID_ITEM_G01].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_G01].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_G01].ToString() : "";
                    basketAccount.AccountCode_G02 = NetCommConstants.ID_ITEM_G02;
                    basketAccount.AccountAmt_G02  = dr["AMT_" + NetCommConstants.ID_ITEM_G02] != null && dr["AMT_" + NetCommConstants.ID_ITEM_G02].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_G02].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_G02].ToString() : "";
                    basketAccount.AccountCnt_G02  = dr["CNT_" + NetCommConstants.ID_ITEM_G02] != null && dr["CNT_" + NetCommConstants.ID_ITEM_G02].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_G02].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_G02].ToString() : "";
                    basketAccount.AccountCode_G03 = NetCommConstants.ID_ITEM_G03;
                    basketAccount.AccountAmt_G03  = dr["AMT_" + NetCommConstants.ID_ITEM_G03] != null && dr["AMT_" + NetCommConstants.ID_ITEM_G03].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_G03].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_G03].ToString() : "";
                    basketAccount.AccountCnt_G03  = dr["CNT_" + NetCommConstants.ID_ITEM_G03] != null && dr["CNT_" + NetCommConstants.ID_ITEM_G03].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_G03].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_G03].ToString() : "";

                    #endregion

                    #endregion

                    // Loc수정 06.04
                    TransManager.SaveTrans(header, new BasketBase[] { basketAccount }, transdb, trans);

                    osiMsgBar02.MessageText = WSWD.WmallPos.FX.Shared.ConfigData.Current.SysMessage.GetMessage("00390");
                    osiMsgBar02.ItemStatus  = WSWD.WmallPos.POS.FX.Win.UserControls.OpenItemStatus.OK;
                    Application.DoEvents();

                    #endregion
                }
                else
                {
                    osiMsgBar02.MessageText = "POS 정산정보 저장 실패";
                    osiMsgBar02.ItemStatus  = WSWD.WmallPos.POS.FX.Win.UserControls.OpenItemStatus.Error;
                    Application.DoEvents();
                }

                #endregion

                trans.Commit();

                // TR 완료시
                TransManager.OnTransComplete();
            }
            catch (Exception ex)
            {
                if (trans != null)
                {
                    trans.Rollback();
                }
                LogUtils.Instance.LogException(ex);
            }
            finally
            {
                transdb.EndInstance();

                if (!b301)
                {
                    osiMsgBar01.MessageText = "POS 부분매출정보 삭제 실패";
                    osiMsgBar01.ItemStatus  = WSWD.WmallPos.POS.FX.Win.UserControls.OpenItemStatus.Error;
                    Application.DoEvents();
                }
                else
                {
                    if (b302)
                    {
                        ConfigData.Current.AppConfig.PosInfo.CasNo   = string.Empty;  //계산원 코드
                        ConfigData.Current.AppConfig.PosInfo.CasName = string.Empty;  //계산원명
                        ConfigData.Current.AppConfig.PosInfo.CasPass = string.Empty;  //계산원 비밀번호
                        ConfigData.Current.AppConfig.Save();
                    }
                }
            }

            if (m_view != null)
            {
                m_view.SetTranPrint(ds, header);
            }
        }
示例#12
0
        /// <summary>
        /// 매출 SAT010T, SAT011T저장 공통함수
        /// </summary>
        /// <param name="header"></param>
        /// <param name="details"></param>
        /// <param name="trans"></param>
        public static void SaveTrans(BasketHeader header, BasketBase[] details, TranDbHelper db, SQLiteTransaction trans)
        {
            string queryStringSAT010T = Extensions.LoadSqlCommand("TransManager", "SaveTrans");
            string queryStringSAT011T = Extensions.LoadSqlCommand("TransManager", "SaveTransState");

            // buffer sequence
            int sqTrxn = 0;

            #region SAT010T - Header

            // save to SAT010T

            // add header
            db.ExecuteNonQuery(queryStringSAT010T,
                               new string[] {
                "@DD_SALE",
                "@CD_STORE",
                "@NO_POS",
                "@NO_TRXN",
                "@SQ_TRXN",
                "@VC_CONT",
                "@ID_USER",
                "@SQ_SHIFT"
            }, new object[] {
                ConfigData.Current.AppConfig.PosInfo.SaleDate,
                ConfigData.Current.AppConfig.PosInfo.StoreNo,
                ConfigData.Current.AppConfig.PosInfo.PosNo,
                ConfigData.Current.AppConfig.PosInfo.TrxnNo,
                sqTrxn.ToString().ToString(3, TypeProperties.Number),
                header.ToString(),
                ConfigData.Current.AppConfig.PosInfo.CasNo,
                ConfigData.Current.AppConfig.PosInfo.ShiftCount
            }, trans);

            sqTrxn++;

            #endregion

            #region 상세내역, BasketBase list

            if (details != null)
            {
                for (int i = 0; i < details.Length; i++)
                {
                    db.ExecuteNonQuery(queryStringSAT010T,
                                       new string[] {
                        "@DD_SALE",
                        "@CD_STORE",
                        "@NO_POS",
                        "@NO_TRXN",
                        "@SQ_TRXN",
                        "@VC_CONT",
                        "@ID_USER",
                        "@SQ_SHIFT"
                    }, new object[] {
                        ConfigData.Current.AppConfig.PosInfo.SaleDate,
                        ConfigData.Current.AppConfig.PosInfo.StoreNo,
                        ConfigData.Current.AppConfig.PosInfo.PosNo,
                        ConfigData.Current.AppConfig.PosInfo.TrxnNo,
                        sqTrxn.ToString().ToString(3, TypeProperties.Number),
                        details[i].ToString(),
                        ConfigData.Current.AppConfig.PosInfo.CasNo,
                        ConfigData.Current.AppConfig.PosInfo.ShiftCount
                    }, trans);

                    sqTrxn++;
                }
            }

            #endregion

            #region Basket end

            db.ExecuteNonQuery(queryStringSAT010T,
                               new string[] {
                "@DD_SALE",
                "@CD_STORE",
                "@NO_POS",
                "@NO_TRXN",
                "@SQ_TRXN",
                "@VC_CONT",
                "@ID_USER",
                "@SQ_SHIFT"
            }, new object[] {
                ConfigData.Current.AppConfig.PosInfo.SaleDate,
                ConfigData.Current.AppConfig.PosInfo.StoreNo,
                ConfigData.Current.AppConfig.PosInfo.PosNo,
                ConfigData.Current.AppConfig.PosInfo.TrxnNo,
                sqTrxn.ToString().ToString(3, TypeProperties.Number),
                new BasketEnd().ToString(),
                ConfigData.Current.AppConfig.PosInfo.CasNo,
                ConfigData.Current.AppConfig.PosInfo.ShiftCount
            }, trans);

            #endregion

            #region SAT011T

            db.ExecuteNonQuery(queryStringSAT011T,
                               new string[] {
                "@DD_SALE",
                "@CD_STORE",
                "@NO_POS",
                "@NO_TRXN",
                "@FG_TRXN",
                "@FG_CANC",
                "@ID_USER",
                "@DD_TIME"
            }, new object[] {
                ConfigData.Current.AppConfig.PosInfo.SaleDate,
                ConfigData.Current.AppConfig.PosInfo.StoreNo,
                ConfigData.Current.AppConfig.PosInfo.PosNo,
                ConfigData.Current.AppConfig.PosInfo.TrxnNo,
                header.TrxnType,
                header.CancType,
                ConfigData.Current.AppConfig.PosInfo.CasNo,
                DateTimeUtils.GetYearMonthDayTimeString(DateTime.Now),
            }, trans);

            #endregion
        }
示例#13
0
        /// <summary>
        /// 자동반품 - 사은품회수팝업
        /// </summary>
        /// <param name="presentList"></param>
        /// <param name="basketHeader"></param>
        /// <param name="returnData">리턴결과</param>
        /// <returns></returns>
        public DialogResult AutoRtnShowTksPresentReturnPopup(List <PQ11RespData> presentList, BasketHeader basketHeader,
                                                             out object returnData)
        {
            using (var pop = ChildManager.ShowPopup(string.Empty,
                                                    "WSWD.WmallPos.POS.SL.dll", "WSWD.WmallPos.POS.SL.VC.POS_SL_P005",
                                                    presentList, basketHeader))
            {
                returnData = null;
                var res = pop.ShowDialog(this);
                Application.DoEvents();

                if (res == DialogResult.Yes)
                {
                    returnData = pop.ReturnResult.ContainsKey("PRESENT_LIST") ?
                                 pop.ReturnResult["PRESENT_LIST"] : null;
                }

                return(res);
            }
        }
示例#14
0
 public void Add(BasketHeader basketHeader)
 {
     _dbContext.Add(basketHeader);
 }
示例#15
0
        public POS_SL_P006(BasketHeader header, List <BasketBase> baskets)
        {
            InitializeComponent();

            #region 이벤트등록

            this.btnOK.Click += new EventHandler(btnOK_Click);
            this.FormClosed  += new FormClosedEventHandler(POS_SL_P006_FormClosed);

            #endregion

            if (baskets != null)
            {
                // display error messages
                StringBuilder sb = new StringBuilder();
                foreach (var bk in baskets)
                {
                    string basketTypeTypeName = string.Empty;
                    string noAppr             = string.Empty;
                    //string ddAppr = string.Empty;
                    Int64 payAmt = 0;

                    if (BasketTypes.BasketPay.Equals(bk.BasketType))
                    {
                        BasketPay bp = (BasketPay)bk;

                        if (NetCommConstants.PAYMENT_DETAIL_CARD.Equals(bp.PayDtlCd))
                        {
                            noAppr = ((BasketPayCard)bp).OTApprNo;
                        }
                        else if (NetCommConstants.PAYMENT_DETAIL_CASH_IC.Equals(bp.PayDtlCd))
                        {
                            noAppr = ((BasketCashIC)bp).OTApprNo;
                        }
                        else if (NetCommConstants.PAYMENT_DETAIL_POINT.Equals(bp.PayDtlCd))
                        {
                            noAppr = ((BasketPoint)bp).DealApprovalNo;
                        }

                        basketTypeTypeName = NetCommConstants.PaymentTypeName(bp.PayGrpCd, bp.PayDtlCd);
                        payAmt             = TypeHelper.ToInt64(bp.PayAmt);
                    }
                    else if (BasketTypes.BasketCashRecpt.Equals(bk.BasketType))
                    {
                        basketTypeTypeName = NetCommConstants.PaymentTypeName(NetCommConstants.PAYMENT_DETAIL_CASHRCP,
                                                                              NetCommConstants.PAYMENT_DETAIL_CASHRCP);
                        noAppr = ((BasketCashRecpt)bk).NoApprOrg;
                        payAmt = TypeHelper.ToInt64(((BasketCashRecpt)bk).AmAppr);
                    }
                    else if (BasketTypes.BasketPointSave.Equals(bk.BasketType))
                    {
                        basketTypeTypeName = NetCommConstants.PaymentTypeName(NetCommConstants.PAYMENT_DETAIL_POINTSAVE,
                                                                              NetCommConstants.PAYMENT_DETAIL_POINTSAVE);
                        payAmt = 0;
                    }

                    sb.AppendFormat("- {0}", basketTypeTypeName);
                    sb.Append(payAmt > 0 ? string.Format(": {0:#,##0}", payAmt) : string.Empty);
                    sb.Append(string.IsNullOrEmpty(noAppr) ? string.Empty : string.Format(" [원승인번호:{0}]", noAppr));
                    sb.AppendLine();
                }

                sb.AppendLine();
                sb.Append("- 전산실에 확인 요망.");
                lblMessage.Text = sb.ToString();
            }
        }
示例#16
0
 public void UpdateRange(BasketHeader basketHeaders)
 {
     _dbContext.UpdateRange(basketHeaders);
 }
示例#17
0
 public void Update(BasketHeader basketHeader)
 {
     _dbContext.Update(basketHeader);
 }
示例#18
0
 public void Delete(BasketHeader basketHeader)
 {
     _dbContext.Remove(basketHeader);
 }
示例#19
0
        /// <summary>
        /// 계산원 정산
        /// </summary>
        /// <param name="strCasNm"></param>
        /// <param name="strSaleDate"></param>
        public void SetTran(WSWD.WmallPos.POS.FX.Win.UserControls.OpenStatusItem osiMsgBar01, WSWD.WmallPos.POS.FX.Win.UserControls.OpenStatusItem osiMsgBar02)
        {
            bool b301 = false;
            bool b302 = false;
            // bool b010 = false;

            DataSet      ds      = null;
            var          transdb = TranDbHelper.InitInstance();
            var          trans   = transdb.BeginTransaction();
            BasketHeader header  = new BasketHeader();

            try
            {
                #region SAT302T Insert

                transdb.ExecuteNonQuery(Extensions.LoadSqlCommand("POS_ED", "P002SetInsertSAT302T"),
                                        new string[] { "@DD_SALE", "@CD_STORE", "@NO_POS", "@ID_USER", "@SQ_SHIFT" },
                                        new object[] {
                    ConfigData.Current.AppConfig.PosInfo.SaleDate,
                    ConfigData.Current.AppConfig.PosInfo.StoreNo,
                    ConfigData.Current.AppConfig.PosInfo.PosNo,
                    ConfigData.Current.AppConfig.PosInfo.CasNo,
                    ConfigData.Current.AppConfig.PosInfo.ShiftCount
                }, trans);

                #endregion

                #region SAT301T Select

                ds = transdb.ExecuteQuery(Extensions.LoadSqlCommand("POS_ED", "GetTotal") + Extensions.LoadSqlCommand("POS_ED", "GetTotalItem") + Extensions.LoadSqlCommand("POS_ED", "P002GetSelectSAT301T"),
                                          new string[] { "@DD_SALE", "@CD_STORE", "@NO_POS", "@ID_USER" },
                                          new object[] {
                    ConfigData.Current.AppConfig.PosInfo.SaleDate,
                    ConfigData.Current.AppConfig.PosInfo.StoreNo,
                    ConfigData.Current.AppConfig.PosInfo.PosNo,
                    ConfigData.Current.AppConfig.PosInfo.CasNo
                }, trans);

                #endregion

                #region SAT010T, SAT011T Insert

                #region Basket 생성

                #region Basket header


                header.TrxnType = NetCommConstants.TRXN_TYPE_CAS_CALC;
                header.CancType = NetCommConstants.CANCEL_TYPE_NORMAL;

                #endregion

                #region Basket details

                DataRow       dr            = ds.Tables[0].Rows[0];
                BasketAccount basketAccount = new BasketAccount();
                basketAccount.BasketType      = BasketTypes.BasketAccount;
                basketAccount.AccountCode_A00 = NetCommConstants.ID_ITEM_A00;
                basketAccount.AccountAmt_A00  = dr["AMT_" + NetCommConstants.ID_ITEM_A00] != null && dr["AMT_" + NetCommConstants.ID_ITEM_A00].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_A00].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_A00].ToString() : "";
                basketAccount.AccountCnt_A00  = dr["CNT_" + NetCommConstants.ID_ITEM_A00] != null && dr["CNT_" + NetCommConstants.ID_ITEM_A00].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_A00].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_A00].ToString() : "";
                basketAccount.AccountCode_A01 = NetCommConstants.ID_ITEM_A01;
                basketAccount.AccountAmt_A01  = dr["AMT_" + NetCommConstants.ID_ITEM_A01] != null && dr["AMT_" + NetCommConstants.ID_ITEM_A01].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_A01].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_A01].ToString() : "";
                basketAccount.AccountCnt_A01  = dr["CNT_" + NetCommConstants.ID_ITEM_A01] != null && dr["CNT_" + NetCommConstants.ID_ITEM_A01].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_A01].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_A01].ToString() : "";
                basketAccount.AccountCode_A02 = NetCommConstants.ID_ITEM_A02;
                basketAccount.AccountAmt_A02  = dr["AMT_" + NetCommConstants.ID_ITEM_A02] != null && dr["AMT_" + NetCommConstants.ID_ITEM_A02].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_A02].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_A02].ToString() : "";
                basketAccount.AccountCnt_A02  = dr["CNT_" + NetCommConstants.ID_ITEM_A02] != null && dr["CNT_" + NetCommConstants.ID_ITEM_A02].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_A02].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_A02].ToString() : "";
                basketAccount.AccountCode_A03 = NetCommConstants.ID_ITEM_A03;
                basketAccount.AccountAmt_A03  = dr["AMT_" + NetCommConstants.ID_ITEM_A03] != null && dr["AMT_" + NetCommConstants.ID_ITEM_A03].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_A03].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_A03].ToString() : "";
                basketAccount.AccountCnt_A03  = dr["CNT_" + NetCommConstants.ID_ITEM_A03] != null && dr["CNT_" + NetCommConstants.ID_ITEM_A03].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_A03].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_A03].ToString() : "";
                basketAccount.AccountCode_A04 = NetCommConstants.ID_ITEM_A04;
                basketAccount.AccountAmt_A04  = dr["AMT_" + NetCommConstants.ID_ITEM_A04] != null && dr["AMT_" + NetCommConstants.ID_ITEM_A04].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_A04].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_A04].ToString() : "";
                basketAccount.AccountCnt_A04  = dr["CNT_" + NetCommConstants.ID_ITEM_A04] != null && dr["CNT_" + NetCommConstants.ID_ITEM_A04].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_A04].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_A04].ToString() : "";
                basketAccount.AccountCode_A05 = NetCommConstants.ID_ITEM_A05;
                basketAccount.AccountAmt_A05  = dr["AMT_" + NetCommConstants.ID_ITEM_A05] != null && dr["AMT_" + NetCommConstants.ID_ITEM_A05].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_A05].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_A05].ToString() : "";
                basketAccount.AccountCnt_A05  = dr["CNT_" + NetCommConstants.ID_ITEM_A05] != null && dr["CNT_" + NetCommConstants.ID_ITEM_A05].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_A05].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_A05].ToString() : "";
                basketAccount.AccountCode_A06 = NetCommConstants.ID_ITEM_A06;
                basketAccount.AccountAmt_A06  = dr["AMT_" + NetCommConstants.ID_ITEM_A06] != null && dr["AMT_" + NetCommConstants.ID_ITEM_A06].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_A06].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_A06].ToString() : "";
                basketAccount.AccountCnt_A06  = dr["CNT_" + NetCommConstants.ID_ITEM_A06] != null && dr["CNT_" + NetCommConstants.ID_ITEM_A06].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_A06].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_A06].ToString() : "";

                basketAccount.AccountCode_B00 = NetCommConstants.ID_ITEM_B00;
                basketAccount.AccountAmt_B00  = dr["AMT_" + NetCommConstants.ID_ITEM_B00] != null && dr["AMT_" + NetCommConstants.ID_ITEM_B00].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_B00].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_B00].ToString() : "";
                basketAccount.AccountCnt_B00  = dr["CNT_" + NetCommConstants.ID_ITEM_B00] != null && dr["CNT_" + NetCommConstants.ID_ITEM_B00].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_B00].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_B00].ToString() : "";
                basketAccount.AccountCode_B01 = NetCommConstants.ID_ITEM_B01;
                basketAccount.AccountAmt_B01  = dr["AMT_" + NetCommConstants.ID_ITEM_B01] != null && dr["AMT_" + NetCommConstants.ID_ITEM_B01].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_B01].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_B01].ToString() : "";
                basketAccount.AccountCnt_B01  = dr["CNT_" + NetCommConstants.ID_ITEM_B01] != null && dr["CNT_" + NetCommConstants.ID_ITEM_B01].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_B01].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_B01].ToString() : "";

                basketAccount.AccountCode_C00 = NetCommConstants.ID_ITEM_C00;
                basketAccount.AccountAmt_C00  = dr["AMT_" + NetCommConstants.ID_ITEM_C00] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C00].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C00].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C00].ToString() : "";
                basketAccount.AccountCnt_C00  = dr["CNT_" + NetCommConstants.ID_ITEM_C00] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C00].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C00].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C00].ToString() : "";
                basketAccount.AccountCode_C01 = NetCommConstants.ID_ITEM_C01;
                basketAccount.AccountAmt_C01  = dr["AMT_" + NetCommConstants.ID_ITEM_C01] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C01].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C01].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C01].ToString() : "";
                basketAccount.AccountCnt_C01  = dr["CNT_" + NetCommConstants.ID_ITEM_C01] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C01].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C01].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C01].ToString() : "";
                basketAccount.AccountCode_C02 = NetCommConstants.ID_ITEM_C02;
                basketAccount.AccountAmt_C02  = dr["AMT_" + NetCommConstants.ID_ITEM_C02] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C02].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C02].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C02].ToString() : "";
                basketAccount.AccountCnt_C02  = dr["CNT_" + NetCommConstants.ID_ITEM_C02] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C02].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C02].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C02].ToString() : "";
                basketAccount.AccountCode_C03 = NetCommConstants.ID_ITEM_C03;
                basketAccount.AccountAmt_C03  = dr["AMT_" + NetCommConstants.ID_ITEM_C03] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C03].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C03].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C03].ToString() : "";
                basketAccount.AccountCnt_C03  = dr["CNT_" + NetCommConstants.ID_ITEM_C03] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C03].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C03].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C03].ToString() : "";
                basketAccount.AccountCode_C04 = NetCommConstants.ID_ITEM_C04;
                basketAccount.AccountAmt_C04  = dr["AMT_" + NetCommConstants.ID_ITEM_C04] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C04].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C04].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C04].ToString() : "";
                basketAccount.AccountCnt_C04  = dr["CNT_" + NetCommConstants.ID_ITEM_C04] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C04].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C04].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C04].ToString() : "";
                basketAccount.AccountCode_C05 = NetCommConstants.ID_ITEM_C05;
                basketAccount.AccountAmt_C05  = dr["AMT_" + NetCommConstants.ID_ITEM_C05] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C05].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C05].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C05].ToString() : "";
                basketAccount.AccountCnt_C05  = dr["CNT_" + NetCommConstants.ID_ITEM_C05] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C05].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C05].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C05].ToString() : "";
                basketAccount.AccountCode_C06 = NetCommConstants.ID_ITEM_C06;
                basketAccount.AccountAmt_C06  = dr["AMT_" + NetCommConstants.ID_ITEM_C06] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C06].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C06].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C06].ToString() : "";
                basketAccount.AccountCnt_C06  = dr["CNT_" + NetCommConstants.ID_ITEM_C06] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C06].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C06].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C06].ToString() : "";
                basketAccount.AccountCode_C07 = NetCommConstants.ID_ITEM_C07;
                basketAccount.AccountAmt_C07  = dr["AMT_" + NetCommConstants.ID_ITEM_C07] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C07].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C07].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C07].ToString() : "";
                basketAccount.AccountCnt_C07  = dr["CNT_" + NetCommConstants.ID_ITEM_C07] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C07].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C07].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C07].ToString() : "";
                basketAccount.AccountCode_C08 = NetCommConstants.ID_ITEM_C08;
                basketAccount.AccountAmt_C08  = dr["AMT_" + NetCommConstants.ID_ITEM_C08] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C08].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C08].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C08].ToString() : "";
                basketAccount.AccountCnt_C08  = dr["CNT_" + NetCommConstants.ID_ITEM_C08] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C08].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C08].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C08].ToString() : "";
                basketAccount.AccountCode_C09 = NetCommConstants.ID_ITEM_C09;
                basketAccount.AccountAmt_C09  = dr["AMT_" + NetCommConstants.ID_ITEM_C09] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C09].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C09].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C09].ToString() : "";
                basketAccount.AccountCnt_C09  = dr["CNT_" + NetCommConstants.ID_ITEM_C09] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C09].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C09].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C09].ToString() : "";
                basketAccount.AccountCode_C10 = NetCommConstants.ID_ITEM_C10;
                basketAccount.AccountAmt_C10  = dr["AMT_" + NetCommConstants.ID_ITEM_C10] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C10].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C10].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C10].ToString() : "";
                basketAccount.AccountCnt_C10  = dr["CNT_" + NetCommConstants.ID_ITEM_C10] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C10].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C10].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C10].ToString() : "";
                basketAccount.AccountCode_C11 = NetCommConstants.ID_ITEM_C11;
                basketAccount.AccountAmt_C11  = dr["AMT_" + NetCommConstants.ID_ITEM_C11] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C11].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C11].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C11].ToString() : "";
                basketAccount.AccountCnt_C11  = dr["CNT_" + NetCommConstants.ID_ITEM_C11] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C11].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C11].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C11].ToString() : "";
                basketAccount.AccountCode_C12 = NetCommConstants.ID_ITEM_C12;
                basketAccount.AccountAmt_C12  = dr["AMT_" + NetCommConstants.ID_ITEM_C12] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C12].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C12].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C12].ToString() : "";
                basketAccount.AccountCnt_C12  = dr["CNT_" + NetCommConstants.ID_ITEM_C12] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C12].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C12].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C12].ToString() : "";
                basketAccount.AccountCode_C13 = NetCommConstants.ID_ITEM_C13;
                basketAccount.AccountAmt_C13  = dr["AMT_" + NetCommConstants.ID_ITEM_C13] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C13].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C13].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C13].ToString() : "";
                basketAccount.AccountCnt_C13  = dr["CNT_" + NetCommConstants.ID_ITEM_C13] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C13].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C13].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C13].ToString() : "";
                basketAccount.AccountCode_C14 = NetCommConstants.ID_ITEM_C14;
                basketAccount.AccountAmt_C14  = dr["AMT_" + NetCommConstants.ID_ITEM_C14] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C14].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C14].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C14].ToString() : "";
                basketAccount.AccountCnt_C14  = dr["CNT_" + NetCommConstants.ID_ITEM_C14] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C14].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C14].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C14].ToString() : "";
                basketAccount.AccountCode_C15 = NetCommConstants.ID_ITEM_C15;
                basketAccount.AccountAmt_C15  = dr["AMT_" + NetCommConstants.ID_ITEM_C15] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C15].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C15].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C15].ToString() : "";
                basketAccount.AccountCnt_C15  = dr["CNT_" + NetCommConstants.ID_ITEM_C15] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C15].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C15].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C15].ToString() : "";
                basketAccount.AccountCode_C16 = NetCommConstants.ID_ITEM_C16;
                basketAccount.AccountAmt_C16  = dr["AMT_" + NetCommConstants.ID_ITEM_C16] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C16].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C16].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C16].ToString() : "";
                basketAccount.AccountCnt_C16  = dr["CNT_" + NetCommConstants.ID_ITEM_C16] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C16].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C16].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C16].ToString() : "";
                basketAccount.AccountCode_C17 = NetCommConstants.ID_ITEM_C17;
                basketAccount.AccountAmt_C17  = dr["AMT_" + NetCommConstants.ID_ITEM_C17] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C17].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C17].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C17].ToString() : "";
                basketAccount.AccountCnt_C17  = dr["CNT_" + NetCommConstants.ID_ITEM_C17] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C17].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C17].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C17].ToString() : "";
                basketAccount.AccountCode_C18 = NetCommConstants.ID_ITEM_C18;
                basketAccount.AccountAmt_C18  = dr["AMT_" + NetCommConstants.ID_ITEM_C18] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C18].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C18].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C18].ToString() : "";
                basketAccount.AccountCnt_C18  = dr["CNT_" + NetCommConstants.ID_ITEM_C18] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C18].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C18].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C18].ToString() : "";
                basketAccount.AccountCode_C19 = NetCommConstants.ID_ITEM_C19;
                basketAccount.AccountAmt_C19  = dr["AMT_" + NetCommConstants.ID_ITEM_C19] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C19].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C19].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C19].ToString() : "";
                basketAccount.AccountCnt_C19  = dr["CNT_" + NetCommConstants.ID_ITEM_C19] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C19].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C19].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C19].ToString() : "";
                basketAccount.AccountCode_C20 = NetCommConstants.ID_ITEM_C20;
                basketAccount.AccountAmt_C20  = dr["AMT_" + NetCommConstants.ID_ITEM_C20] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C20].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C20].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C20].ToString() : "";
                basketAccount.AccountCnt_C20  = dr["CNT_" + NetCommConstants.ID_ITEM_C20] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C20].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C20].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C20].ToString() : "";
                basketAccount.AccountCode_C21 = NetCommConstants.ID_ITEM_C21;
                basketAccount.AccountAmt_C21  = dr["AMT_" + NetCommConstants.ID_ITEM_C21] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C21].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C21].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C21].ToString() : "";
                basketAccount.AccountCnt_C21  = dr["CNT_" + NetCommConstants.ID_ITEM_C21] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C21].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C21].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C21].ToString() : "";
                basketAccount.AccountCode_C22 = NetCommConstants.ID_ITEM_C22;
                basketAccount.AccountAmt_C22  = dr["AMT_" + NetCommConstants.ID_ITEM_C22] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C22].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C22].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C22].ToString() : "";
                basketAccount.AccountCnt_C22  = dr["CNT_" + NetCommConstants.ID_ITEM_C22] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C22].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C22].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C22].ToString() : "";
                basketAccount.AccountCode_C23 = NetCommConstants.ID_ITEM_C23;
                basketAccount.AccountAmt_C23  = dr["AMT_" + NetCommConstants.ID_ITEM_C23] != null && dr["AMT_" + NetCommConstants.ID_ITEM_C23].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_C23].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_C23].ToString() : "";
                basketAccount.AccountCnt_C23  = dr["CNT_" + NetCommConstants.ID_ITEM_C23] != null && dr["CNT_" + NetCommConstants.ID_ITEM_C23].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_C23].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_C23].ToString() : "";

                basketAccount.AccountCode_D00 = NetCommConstants.ID_ITEM_D00;
                basketAccount.AccountAmt_D00  = dr["AMT_" + NetCommConstants.ID_ITEM_D00] != null && dr["AMT_" + NetCommConstants.ID_ITEM_D00].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_D00].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_D00].ToString() : "";
                basketAccount.AccountCnt_D00  = dr["CNT_" + NetCommConstants.ID_ITEM_D00] != null && dr["CNT_" + NetCommConstants.ID_ITEM_D00].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_D00].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_D00].ToString() : "";

                basketAccount.AccountCode_E00 = NetCommConstants.ID_ITEM_E00;
                basketAccount.AccountAmt_E00  = dr["AMT_" + NetCommConstants.ID_ITEM_E00] != null && dr["AMT_" + NetCommConstants.ID_ITEM_E00].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_E00].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_E00].ToString() : "";
                basketAccount.AccountCnt_E00  = dr["CNT_" + NetCommConstants.ID_ITEM_E00] != null && dr["CNT_" + NetCommConstants.ID_ITEM_E00].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_E00].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_E00].ToString() : "";
                basketAccount.AccountCode_E01 = NetCommConstants.ID_ITEM_E01;
                basketAccount.AccountAmt_E01  = dr["AMT_" + NetCommConstants.ID_ITEM_E01] != null && dr["AMT_" + NetCommConstants.ID_ITEM_E01].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_E01].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_E01].ToString() : "";
                basketAccount.AccountCnt_E01  = dr["CNT_" + NetCommConstants.ID_ITEM_E01] != null && dr["CNT_" + NetCommConstants.ID_ITEM_E01].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_E01].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_E01].ToString() : "";
                basketAccount.AccountCode_E02 = NetCommConstants.ID_ITEM_E02;
                basketAccount.AccountAmt_E02  = dr["AMT_" + NetCommConstants.ID_ITEM_E02] != null && dr["AMT_" + NetCommConstants.ID_ITEM_E02].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_E02].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_E02].ToString() : "";
                basketAccount.AccountCnt_E02  = dr["CNT_" + NetCommConstants.ID_ITEM_E02] != null && dr["CNT_" + NetCommConstants.ID_ITEM_E02].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_E02].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_E02].ToString() : "";
                basketAccount.AccountCode_E03 = NetCommConstants.ID_ITEM_E03;
                basketAccount.AccountAmt_E03  = dr["AMT_" + NetCommConstants.ID_ITEM_E03] != null && dr["AMT_" + NetCommConstants.ID_ITEM_E03].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_E03].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_E03].ToString() : "";
                basketAccount.AccountCnt_E03  = dr["CNT_" + NetCommConstants.ID_ITEM_E03] != null && dr["CNT_" + NetCommConstants.ID_ITEM_E03].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_E03].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_E03].ToString() : "";
                basketAccount.AccountCode_E04 = NetCommConstants.ID_ITEM_E04;
                basketAccount.AccountAmt_E04  = dr["AMT_" + NetCommConstants.ID_ITEM_E04] != null && dr["AMT_" + NetCommConstants.ID_ITEM_E04].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_E04].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_E04].ToString() : "";
                basketAccount.AccountCnt_E04  = dr["CNT_" + NetCommConstants.ID_ITEM_E04] != null && dr["CNT_" + NetCommConstants.ID_ITEM_E04].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_E04].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_E04].ToString() : "";
                basketAccount.AccountCode_E05 = NetCommConstants.ID_ITEM_E05;
                basketAccount.AccountAmt_E05  = dr["AMT_" + NetCommConstants.ID_ITEM_E05] != null && dr["AMT_" + NetCommConstants.ID_ITEM_E05].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_E05].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_E05].ToString() : "";
                basketAccount.AccountCnt_E05  = dr["CNT_" + NetCommConstants.ID_ITEM_E05] != null && dr["CNT_" + NetCommConstants.ID_ITEM_E05].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_E05].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_E05].ToString() : "";
                basketAccount.AccountCode_E10 = NetCommConstants.ID_ITEM_E10;
                basketAccount.AccountAmt_E10  = dr["AMT_" + NetCommConstants.ID_ITEM_E10] != null && dr["AMT_" + NetCommConstants.ID_ITEM_E10].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_E10].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_E10].ToString() : "";
                basketAccount.AccountCnt_E10  = dr["CNT_" + NetCommConstants.ID_ITEM_E10] != null && dr["CNT_" + NetCommConstants.ID_ITEM_E10].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_E10].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_E10].ToString() : "";
                basketAccount.AccountCode_E21 = NetCommConstants.ID_ITEM_E21;
                basketAccount.AccountAmt_E21  = dr["AMT_" + NetCommConstants.ID_ITEM_E21] != null && dr["AMT_" + NetCommConstants.ID_ITEM_E21].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_E21].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_E21].ToString() : "";
                basketAccount.AccountCnt_E21  = dr["CNT_" + NetCommConstants.ID_ITEM_E21] != null && dr["CNT_" + NetCommConstants.ID_ITEM_E21].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_E21].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_E21].ToString() : "";
                basketAccount.AccountCode_E22 = NetCommConstants.ID_ITEM_E22;
                basketAccount.AccountAmt_E22  = dr["AMT_" + NetCommConstants.ID_ITEM_E22] != null && dr["AMT_" + NetCommConstants.ID_ITEM_E22].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_E22].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_E22].ToString() : "";
                basketAccount.AccountCnt_E22  = dr["CNT_" + NetCommConstants.ID_ITEM_E22] != null && dr["CNT_" + NetCommConstants.ID_ITEM_E22].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_E22].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_E22].ToString() : "";
                basketAccount.AccountCode_E23 = NetCommConstants.ID_ITEM_E23;
                basketAccount.AccountAmt_E23  = dr["AMT_" + NetCommConstants.ID_ITEM_E23] != null && dr["AMT_" + NetCommConstants.ID_ITEM_E23].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_E23].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_E23].ToString() : "";
                basketAccount.AccountCnt_E23  = dr["CNT_" + NetCommConstants.ID_ITEM_E23] != null && dr["CNT_" + NetCommConstants.ID_ITEM_E23].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_E23].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_E23].ToString() : "";
                basketAccount.AccountCode_E24 = NetCommConstants.ID_ITEM_E24;
                basketAccount.AccountAmt_E24  = dr["AMT_" + NetCommConstants.ID_ITEM_E24] != null && dr["AMT_" + NetCommConstants.ID_ITEM_E24].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_E24].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_E24].ToString() : "";
                basketAccount.AccountCnt_E24  = dr["CNT_" + NetCommConstants.ID_ITEM_E24] != null && dr["CNT_" + NetCommConstants.ID_ITEM_E24].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_E24].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_E24].ToString() : "";
                basketAccount.AccountCode_E25 = NetCommConstants.ID_ITEM_E25;
                basketAccount.AccountAmt_E25  = dr["AMT_" + NetCommConstants.ID_ITEM_E25] != null && dr["AMT_" + NetCommConstants.ID_ITEM_E25].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_E25].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_E25].ToString() : "";
                basketAccount.AccountCnt_E25  = dr["CNT_" + NetCommConstants.ID_ITEM_E25] != null && dr["CNT_" + NetCommConstants.ID_ITEM_E25].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_E25].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_E25].ToString() : "";
                basketAccount.AccountCode_E30 = NetCommConstants.ID_ITEM_E30;
                basketAccount.AccountAmt_E30  = dr["AMT_" + NetCommConstants.ID_ITEM_E30] != null && dr["AMT_" + NetCommConstants.ID_ITEM_E30].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_E30].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_E30].ToString() : "";
                basketAccount.AccountCnt_E30  = dr["CNT_" + NetCommConstants.ID_ITEM_E30] != null && dr["CNT_" + NetCommConstants.ID_ITEM_E30].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_E30].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_E30].ToString() : "";
                basketAccount.AccountCode_E40 = NetCommConstants.ID_ITEM_E40;
                basketAccount.AccountAmt_E40  = dr["AMT_" + NetCommConstants.ID_ITEM_E40] != null && dr["AMT_" + NetCommConstants.ID_ITEM_E40].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_E40].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_E40].ToString() : "";
                basketAccount.AccountCnt_E40  = dr["CNT_" + NetCommConstants.ID_ITEM_E40] != null && dr["CNT_" + NetCommConstants.ID_ITEM_E40].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_E40].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_E40].ToString() : "";

                basketAccount.AccountCode_F00 = NetCommConstants.ID_ITEM_F00;
                basketAccount.AccountAmt_F00  = dr["AMT_" + NetCommConstants.ID_ITEM_F00] != null && dr["AMT_" + NetCommConstants.ID_ITEM_F00].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_F00].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_F00].ToString() : "";
                basketAccount.AccountCnt_F00  = dr["CNT_" + NetCommConstants.ID_ITEM_F00] != null && dr["CNT_" + NetCommConstants.ID_ITEM_F00].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_F00].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_F00].ToString() : "";
                basketAccount.AccountCode_F01 = NetCommConstants.ID_ITEM_F01;
                basketAccount.AccountAmt_F01  = dr["AMT_" + NetCommConstants.ID_ITEM_F01] != null && dr["AMT_" + NetCommConstants.ID_ITEM_F01].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_F01].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_F01].ToString() : "";
                basketAccount.AccountCnt_F01  = dr["CNT_" + NetCommConstants.ID_ITEM_F01] != null && dr["CNT_" + NetCommConstants.ID_ITEM_F01].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_F01].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_F01].ToString() : "";
                basketAccount.AccountCode_F02 = NetCommConstants.ID_ITEM_F02;
                basketAccount.AccountAmt_F02  = dr["AMT_" + NetCommConstants.ID_ITEM_F02] != null && dr["AMT_" + NetCommConstants.ID_ITEM_F02].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_F02].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_F02].ToString() : "";
                basketAccount.AccountCnt_F02  = dr["CNT_" + NetCommConstants.ID_ITEM_F02] != null && dr["CNT_" + NetCommConstants.ID_ITEM_F02].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_F02].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_F02].ToString() : "";
                basketAccount.AccountCode_F03 = NetCommConstants.ID_ITEM_F03;
                basketAccount.AccountAmt_F03  = dr["AMT_" + NetCommConstants.ID_ITEM_F03] != null && dr["AMT_" + NetCommConstants.ID_ITEM_F03].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_F03].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_F03].ToString() : "";
                basketAccount.AccountCnt_F03  = dr["CNT_" + NetCommConstants.ID_ITEM_F03] != null && dr["CNT_" + NetCommConstants.ID_ITEM_F03].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_F03].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_F03].ToString() : "";
                basketAccount.AccountCode_F04 = NetCommConstants.ID_ITEM_F04;
                basketAccount.AccountAmt_F04  = dr["AMT_" + NetCommConstants.ID_ITEM_F04] != null && dr["AMT_" + NetCommConstants.ID_ITEM_F04].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_F04].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_F04].ToString() : "";
                basketAccount.AccountCnt_F04  = dr["CNT_" + NetCommConstants.ID_ITEM_F04] != null && dr["CNT_" + NetCommConstants.ID_ITEM_F04].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_F04].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_F04].ToString() : "";
                basketAccount.AccountCode_F05 = NetCommConstants.ID_ITEM_F05;
                basketAccount.AccountAmt_F05  = dr["AMT_" + NetCommConstants.ID_ITEM_F05] != null && dr["AMT_" + NetCommConstants.ID_ITEM_F05].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_F05].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_F05].ToString() : "";
                basketAccount.AccountCnt_F05  = dr["CNT_" + NetCommConstants.ID_ITEM_F05] != null && dr["CNT_" + NetCommConstants.ID_ITEM_F05].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_F05].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_F05].ToString() : "";

                basketAccount.AccountCode_G00 = NetCommConstants.ID_ITEM_G00;
                basketAccount.AccountAmt_G00  = dr["AMT_" + NetCommConstants.ID_ITEM_G00] != null && dr["AMT_" + NetCommConstants.ID_ITEM_G00].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_G00].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_G00].ToString() : "";
                basketAccount.AccountCnt_G00  = dr["CNT_" + NetCommConstants.ID_ITEM_G00] != null && dr["CNT_" + NetCommConstants.ID_ITEM_G00].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_G00].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_G00].ToString() : "";
                basketAccount.AccountCode_G01 = NetCommConstants.ID_ITEM_G01;
                basketAccount.AccountAmt_G01  = dr["AMT_" + NetCommConstants.ID_ITEM_G01] != null && dr["AMT_" + NetCommConstants.ID_ITEM_G01].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_G01].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_G01].ToString() : "";
                basketAccount.AccountCnt_G01  = dr["CNT_" + NetCommConstants.ID_ITEM_G01] != null && dr["CNT_" + NetCommConstants.ID_ITEM_G01].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_G01].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_G01].ToString() : "";
                basketAccount.AccountCode_G02 = NetCommConstants.ID_ITEM_G02;
                basketAccount.AccountAmt_G02  = dr["AMT_" + NetCommConstants.ID_ITEM_G02] != null && dr["AMT_" + NetCommConstants.ID_ITEM_G02].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_G02].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_G02].ToString() : "";
                basketAccount.AccountCnt_G02  = dr["CNT_" + NetCommConstants.ID_ITEM_G02] != null && dr["CNT_" + NetCommConstants.ID_ITEM_G02].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_G02].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_G02].ToString() : "";
                basketAccount.AccountCode_G03 = NetCommConstants.ID_ITEM_G03;
                basketAccount.AccountAmt_G03  = dr["AMT_" + NetCommConstants.ID_ITEM_G03] != null && dr["AMT_" + NetCommConstants.ID_ITEM_G03].ToString() != "" && dr["AMT_" + NetCommConstants.ID_ITEM_G03].ToString() != "0" ? dr["AMT_" + NetCommConstants.ID_ITEM_G03].ToString() : "";
                basketAccount.AccountCnt_G03  = dr["CNT_" + NetCommConstants.ID_ITEM_G03] != null && dr["CNT_" + NetCommConstants.ID_ITEM_G03].ToString() != "" && dr["CNT_" + NetCommConstants.ID_ITEM_G03].ToString() != "0" ? dr["CNT_" + NetCommConstants.ID_ITEM_G03].ToString() : "";

                #endregion

                #endregion

                TransManager.SaveTrans(header, new BasketBase[] { basketAccount }, transdb, trans);

                osiMsgBar02.MessageText = WSWD.WmallPos.FX.Shared.ConfigData.Current.SysMessage.GetMessage("00307");
                osiMsgBar02.ItemStatus  = WSWD.WmallPos.POS.FX.Win.UserControls.OpenItemStatus.OK;
                Application.DoEvents();

                // b010 = true;

                #endregion

                #region SAT301T Delete

                //SAT301T 삭제
                transdb.ExecuteNonQuery(Extensions.LoadSqlCommand("POS_ED", "P002SetDeleteSAT301T"),
                                        new string[] { "@DD_SALE", "@CD_STORE", "@NO_POS", "@ID_USER" },
                                        new object[] {
                    ConfigData.Current.AppConfig.PosInfo.SaleDate,
                    ConfigData.Current.AppConfig.PosInfo.StoreNo,
                    ConfigData.Current.AppConfig.PosInfo.PosNo,
                    ConfigData.Current.AppConfig.PosInfo.CasNo
                }, trans);


                osiMsgBar01.MessageText = WSWD.WmallPos.FX.Shared.ConfigData.Current.SysMessage.GetMessage("00389");
                osiMsgBar01.ItemStatus  = WSWD.WmallPos.POS.FX.Win.UserControls.OpenItemStatus.OK;
                Application.DoEvents();

                b301 = true;

                #endregion

                #region SAT302T Select

                ds = null;
                ds = transdb.ExecuteQuery(Extensions.LoadSqlCommand("POS_ED", "GetTotal") + Extensions.LoadSqlCommand("POS_ED", "GetTotalItem") + Extensions.LoadSqlCommand("POS_ED", "P002GetSelectSAT302T"),
                                          new string[] { "@DD_SALE", "@CD_STORE", "@NO_POS", "@ID_USER", "@SQ_SHIFT" },
                                          new object[] {
                    ConfigData.Current.AppConfig.PosInfo.SaleDate,
                    ConfigData.Current.AppConfig.PosInfo.StoreNo,
                    ConfigData.Current.AppConfig.PosInfo.PosNo,
                    ConfigData.Current.AppConfig.PosInfo.CasNo,
                    ConfigData.Current.AppConfig.PosInfo.ShiftCount
                }, trans);

                if (ds != null && ds.Tables.Count > 0 && ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
                {
                    b302 = true;
                }

                #endregion

                trans.Commit();

                // TR 완료시
                TransManager.OnTransComplete();
            }
            catch (Exception ex)
            {
                if (trans != null)
                {
                    trans.Rollback();
                }

                LogUtils.Instance.LogException(ex);
            }
            finally
            {
                transdb.EndInstance();

                if (!b302)
                {
                    osiMsgBar01.MessageText = "계산원 정산정보 저장 실패";
                    osiMsgBar01.ItemStatus  = WSWD.WmallPos.POS.FX.Win.UserControls.OpenItemStatus.Error;
                    Application.DoEvents();
                }
                else
                {
                    if (!b301)
                    {
                        osiMsgBar02.MessageText = "계산원 부분매출정보 삭제 실패";
                        osiMsgBar02.ItemStatus  = WSWD.WmallPos.POS.FX.Win.UserControls.OpenItemStatus.Error;
                        Application.DoEvents();
                    }
                }
            }

            if (m_view != null)
            {
                m_view.SetTranPrint(ds, header);
            }
        }
示例#20
0
        /// <summary>
        /// Db접속예제
        /// </summary>
        public void SQLiteAccess()
        {
            ///
            /// method 1
            /// Transaction 처리 안함
            ///
            using (var db = TranDbHelper.InitInstance())
            {
                string queryString = Extensions.LoadSqlCommand("FileName", "CommandName");
                db.ExecuteNonQuery(queryString,
                                   new string[] {
                    "@CD_STORE"
                }, new object[] {
                    ConfigData.Current.AppConfig.PosInfo.StoreNo
                });
            }

            ///
            /// method 2
            /// Transacition 사용
            ///
            TranDbHelper      tranDb = null;
            SQLiteTransaction trans  = null;

            try
            {
                tranDb = TranDbHelper.InitInstance();
                trans  = tranDb.BeginTransaction();

                BasketHeader header = new BasketHeader();

                #region Basket header

                // header.TxBufVer...

                #endregion

                #region Basket details

                // 준비금
                BasketPay prepareAmt = new BasketPay();
                prepareAmt.BalAmt = "112121";

                #endregion

                // SAT010T, SAT011T저장
                TransManager.SaveTrans(header, new BasketBase[] {
                    prepareAmt
                }, tranDb, trans);

                #region Summary table 처리, SAT300T...

                // get query string from file
                string queryString = Extensions.LoadSqlCommand("FileName", "CommandName");
                tranDb.ExecuteNonQuery(queryString,
                                       new string[] {
                    "@CD_STORE"
                }, new object[] {
                    ConfigData.Current.AppConfig.PosInfo.StoreNo
                }, trans);     // transaction 개체준다


                #endregion

                trans.Commit();

                // TR 완료시
                TransManager.OnTransComplete();
            }
            catch (Exception ex)
            {
                trans.Rollback();

                LogUtils.Instance.LogException(ex);
            }
            finally
            {
                if (tranDb != null)
                {
                    tranDb.Dispose();
                }
            }
        }