コード例 #1
0
        /// <summary>
        /// 이전 준비금 및 회차 조회
        /// </summary>
        public void GetCash()
        {
            var     transdb = TranDbHelper.InitInstance();
            DataSet ds      = null;

            try
            {
                ds = transdb.ExecuteQuery(Extensions.LoadSqlCommand("POS_IO", "M001SelectSAT300T"),
                                          new string[] {
                    "@DD_SALE",
                    "@CD_STORE",
                    "@NO_POS",
                    "@ID_ITEM"
                },
                                          new object[] {
                    ConfigData.Current.AppConfig.PosInfo.SaleDate,
                    ConfigData.Current.AppConfig.PosInfo.StoreNo,
                    ConfigData.Current.AppConfig.PosInfo.PosNo,
                    NetCommConstants.ID_ITEM_D00
                });
            }
            catch (Exception ex)
            {
                LogUtils.Instance.LogException(ex);
            }
            finally
            {
                transdb.EndInstance();
            }

            if (m_view != null)
            {
                m_view.SetBeforeCash(ds);
            }
        }
コード例 #2
0
ファイル: POS_ST_M001.cs プロジェクト: nhhuy1804/Wmall
        /// <summary>
        /// DB에서 마지막거래번호를 가져온다
        /// </summary>
        /// <returns></returns>
        int GetLastTrxnNoDb()
        {
            int lastTrxnNo = 0;

            // 디비에서 마직막번호 확인
            var db = TranDbHelper.InitInstance();

            try
            {
                var sql = Extensions.LoadSqlCommand("POS_SD", "GetLastTrxnNo");
                var tn  = db.ExecuteScalar(sql,
                                           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
                });

                if (tn != null)
                {
                    lastTrxnNo = TypeHelper.ToInt32(tn.ToString());
                }
            }
            catch (Exception ex)
            {
                LogUtils.Instance.LogException(ex);
            }
            finally
            {
                db.Dispose();
            }

            return(lastTrxnNo);
        }
コード例 #3
0
ファイル: EDP004presenter.cs プロジェクト: nhhuy1804/Wmall
        /// <summary>
        /// TR전송, 결락전송 데이터 조회
        /// </summary>
        /// <param name="strType">전송구분(0:TR전송, 1:결락전송)</param>
        public void GetTRData(string strType)
        {
            var     db = TranDbHelper.InitInstance();
            DataSet ds = null;

            try
            {
                ds = db.ExecuteQuery(Extensions.LoadSqlCommand("POS_ED", strType == "0" ? "GetTRDataAll" : "GetTRDataLoss"),
                                     new string[] { "@DD_SALE", "@CD_STORE", "@NO_POS" },
                                     new object[] {
                    //ConfigData.Current.AppConfig.PosInfo.SaleDate,
                    m_view.TRTransDate,
                    ConfigData.Current.AppConfig.PosInfo.StoreNo,
                    ConfigData.Current.AppConfig.PosInfo.PosNo,
                });
            }
            catch (Exception ex)
            {
                LogUtils.Instance.LogException(ex);
            }
            finally
            {
                db.EndInstance();
            }

            if (m_view != null)
            {
                //TR전송, 결락전송 데이터 결과 셋팅
                m_view.SetTRData(ds);
            }
        }
コード例 #4
0
        /// <summary>
        /// 중간입금 금액 조회
        /// </summary>
        public void GetMiddleDeposit()
        {
            var     transdb = TranDbHelper.InitInstance();
            DataSet ds      = null;

            try
            {
                ds = transdb.ExecuteQuery(Extensions.LoadSqlCommand("POS_IO", "M002SelectTotalAmtSAT300T"),
                                          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
                });
            }
            catch (Exception ex)
            {
                LogUtils.Instance.LogException(ex);
            }
            finally
            {
                transdb.EndInstance();
            }

            if (m_view != null)
            {
                //중간입금 차수 및 각각의 차수 금액 셋팅
                m_view.SetMiddleDeposit(ds);
            }
        }
コード例 #5
0
ファイル: EDP001presenter.cs プロジェクト: nhhuy1804/Wmall
        /// <summary>
        /// 합계 점검 조회
        /// </summary>
        public void GetTotalChkResult()
        {
            string strSql = Extensions.LoadSqlCommand("POS_ED", "GetTotal") + Extensions.LoadSqlCommand("POS_ED", "P001GetTotalChkSAT300T");

            var     db = TranDbHelper.InitInstance();
            DataSet ds = null;

            try
            {
                ds = db.ExecuteQuery(strSql,
                                     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
                });
            }
            catch (Exception ex)
            {
                LogUtils.Instance.LogException(ex);
            }
            finally
            {
                db.EndInstance();
            }

            if (m_view != null)
            {
                m_view.SetTotalChkResult(ds);
            }
        }
コード例 #6
0
ファイル: IQP004presenter.cs プロジェクト: nhhuy1804/Wmall
        /// <summary>
        /// 영수증 조회
        /// </summary>
        /// <param name="strSaleDate">조회일자</param>
        /// <param name="strPosNo">포스번호</param>
        /// <param name="strTrxnNo">거래번호</param>
        public void GetReceipt(string strSaleDate, string strPosNo, string strTrxnNo)
        {
            DataSet dsTrans = null;
            var     transdb = TranDbHelper.InitInstance();

            try
            {
                string strTemp = string.Empty;

                if (strTrxnNo.Length > 0)
                {
                    strTemp = strTrxnNo.PadLeft(6, '0');
                }

                dsTrans = transdb.ExecuteQuery(Extensions.LoadSqlCommand("POS_IQ", "P004GetReceiptSAT010T"),
                                               new string[] { "@DD_SALE", "@NO_POS", "@NO_TRXN" },
                                               new object[] { strSaleDate, strPosNo, strTemp });
            }
            catch (Exception ex)
            {
                LogUtils.Instance.LogException(ex);
            }
            finally
            {
                transdb.EndInstance();
            }

            if (m_view != null)
            {
                // 영수증 조회 내역 셋팅
                m_view.SetReceiptList(dsTrans);
            }
        }
コード例 #7
0
        /// <summary>
        /// SAT900 보류확인
        /// </summary>
        public void GetWait()
        {
            var    db     = TranDbHelper.InitInstance();
            string strCnt = "0";

            try
            {
                strCnt = Convert.ToString(db.ExecuteScalar(Extensions.LoadSqlCommand("POS_ED", "P003GetSAT900T"),
                                                           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
                }));
            }
            catch (Exception ex)
            {
                LogUtils.Instance.LogException(ex);
            }
            finally
            {
                db.EndInstance();
            }

            if (m_view != null)
            {
                m_view.SetWait(TypeHelper.ToInt32(strCnt));
            }
        }
コード例 #8
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="ddSale"></param>
        /// <param name="noBoru"></param>
        public void LoadHoldItems(string ddSale, string noBoru)
        {
            var db = TranDbHelper.InitInstance();

            try
            {
                #region 보류상품항목 가져오기

                string query = "P003HoldSelectTop".POSSLQuerySQL();
                var    ds    = db.ExecuteQuery(query,
                                               new string[] {
                    "@DD_SALE", "@CD_STORE", "@NO_POS", "@NO_BORU"
                },
                                               new object[] {
                    ddSale,
                    ConfigData.Current.AppConfig.PosInfo.StoreNo,
                    ConfigData.Current.AppConfig.PosInfo.PosNo,
                    noBoru
                });

                if (ds.Tables[0].Rows.Count == 0)
                {
                    m_view.ReportError(SLP003HoldErrorState.NoBoruNotExists);
                }
                else
                {
                    List <SAT900TItemData> holdList = new List <SAT900TItemData>();
                    foreach (DataRow dr in ds.Tables[0].Rows)
                    {
                        string     vcCont = TypeHelper.ToString(dr["VC_CONT"]);
                        BasketItem bi     = (BasketItem)BasketItem.Parse(typeof(BasketItem), vcCont);
                        holdList.Add(new SAT900TItemData()
                        {
                            NoBoru = TypeHelper.ToString(dr["NO_BORU"]),
                            NmItem = bi.NmItem,
                            QtItem = TypeHelper.ToInt32(bi.CntItem),
                            AmItem = TypeHelper.ToInt32(bi.AmSale),
                            SqBoru = TypeHelper.ToInt32(dr["SQ_BORU"]),
                            Basket = bi,
                            VcCont = vcCont
                        });
                    }

                    m_view.ReportError(SLP003HoldErrorState.NoError);
                    m_view.BindHoldItems(holdList.ToArray());
                }

                #endregion
            }
            catch (Exception ex)
            {
                LogUtils.Instance.LogException(ex);
            }
            finally
            {
                db.Dispose();
            }
        }
コード例 #9
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);
            }
        }
コード例 #10
0
        /// <summary>
        ///
        /// </summary>
        static bool AppInitialize()
        {
            var exists = AppConfig.Exists() &&
                         DevConfig.Exists() &&
                         KeyMapConfig.Exists();

            exists &= MasterDbHelper.DbExists() && TranDbHelper.DbExists();

            if (exists)
            {
                // Create directories
                ConfigData config = new ConfigData()
                {
                    AppConfig    = AppConfig.Load(),
                    DevConfig    = DevConfig.Load(),
                    KeyMapConfig = KeyMapConfig.Load(),
                    SysMessage   = SysMessage.Load()
                };

                ConfigData.Initialize(config);

                exists &= !string.IsNullOrEmpty(config.AppConfig.PosInfo.PosNo) &&
                          !string.IsNullOrEmpty(config.AppConfig.PosInfo.StoreNo);
            }

            if (!exists)
            {
                new MessageDialog(MessageDialogType.Warning, null, string.Empty,
                                  MSG_POS_ENV_INVALID).ShowDialog();
            }
            else
            {
                // set path to damo
                AddPathSegments(FXConsts.FOLDER_DAMO.GetLibFolder());

                // DAMO 암호화 모듈 초기설정
                DataUtils.DamoInitialize();

                // OCXRegister
                string ksNetFile = FXConsts.FOLDER_OCX.GetLibFolder() + "\\KSNet_Dongle.ocx";
                FileUtils.RegSvr32(ksNetFile);

                string keyBoardHookFile = FXConsts.FOLDER_OCX.GetLibFolder() + "\\KeyboardHook.ocx";
                FileUtils.RegSvr32(keyBoardHookFile);
            }

            return(exists);
        }
コード例 #11
0
        /// <summary>
        /// Return null of there is more than 2 hold trxn
        /// Else return full data
        /// </summary>
        /// <param name="noBoru"></param>
        /// <returns></returns>
        public bool CheckHoldTrxnExists(string noBoru)
        {
            var db = TranDbHelper.InitInstance();

            try
            {
                string query = "P003HoldCount".POSSLQuerySQL();
                var    count = db.ExecuteScalar(query,
                                                new string[] {
                    "@DD_SALE", "@CD_STORE",
                    "@NO_POS", "@NO_BORU"
                },
                                                new object[] {
                    ConfigData.Current.AppConfig.PosInfo.SaleDate,
                    ConfigData.Current.AppConfig.PosInfo.StoreNo,
                    ConfigData.Current.AppConfig.PosInfo.PosNo,
                    noBoru
                });

                int cCount = Convert.ToInt32(count);

                if (cCount == 0)
                {
                    return(false);
                }

                if (cCount > 1)
                {
                    m_mainView.ShowHoldList();
                }
                else
                {
                    var holdItems = ReleaseHoldTrxn(noBoru);
                    m_mainView.LoadItems(holdItems.Select(p => p.Basket).ToArray());
                }
            }
            catch (Exception ex)
            {
                LogUtils.Instance.LogException(ex);
            }
            finally
            {
                db.Dispose();
            }

            return(true);
        }
コード例 #12
0
        public void LoadHoldList()
        {
            var db = TranDbHelper.InitInstance();

            try
            {
                string query = "P003HoldList".POSSLQuerySQL();
                var    ds    = db.ExecuteQuery(query,
                                               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
                });

                List <SAT900TData> holdList = new List <SAT900TData>();
                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    string time = TypeHelper.ToString(dr["DD_TIME"]);
                    time = time.Length == 14 ? time.Substring(8, 2) + ":" + time.Substring(10, 2) : string.Empty;
                    holdList.Add(new SAT900TData()
                    {
                        NoBoru = TypeHelper.ToString(dr["NO_BORU"]),
                        AmSale = (long)TypeHelper.ToDouble(dr["AM_SALE"]),
                        DdTime = time
                    });
                }

                m_view.BindHoldList(holdList.ToArray());
            }
            catch (Exception ex)
            {
                LogUtils.Instance.LogException(ex);
            }
            finally
            {
                db.Dispose();
            }
        }
コード例 #13
0
ファイル: EDEODValidator.cs プロジェクト: nhhuy1804/Wmall
        /// <summary>
        /// 보류건 있는지확인
        /// </summary>
        /// <param name="errorMessage"></param>
        /// <returns></returns>
        public bool ValidateMenuOnClick(out string errorMessage)
        {
            var db = TranDbHelper.InitInstance();

            errorMessage = string.Empty;
            int nCnt = 0;

            try
            {
                var cnt = db.ExecuteScalar(Extensions.LoadSqlCommand("POS_ED", "P003GetSAT900T"),
                                           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
                });

                nCnt = TypeHelper.ToInt32(cnt);
                if (nCnt > 0)
                {
                    errorMessage = string.Format(MSG_HOLD_COUNT_EXISTS, nCnt);
                }
            }
            catch (Exception ex)
            {
                LogUtils.Instance.LogException(ex);
            }
            finally
            {
                db.EndInstance();
            }

            return(nCnt == 0);
        }
コード例 #14
0
ファイル: SOPresenter.cs プロジェクト: nhhuy1804/Wmall
        /// <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);
        }
コード例 #15
0
ファイル: TransManager.cs プロジェクト: nhhuy1804/Wmall
        /// <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
        }
コード例 #16
0
        /// <summary>
        /// 보류진짜 해제한다
        /// </summary>
        /// <param name="noBoru"></param>
        /// <returns></returns>
        public SAT900TItemData[] ReleaseHoldTrxn(string noBoru)
        {
            var db    = TranDbHelper.InitInstance();
            var trans = db.BeginTransaction();

            try
            {
                #region 보류상품항목 가져오기

                string query = "P003HoldSelectTop".POSSLQuerySQL();
                var    ds    = db.ExecuteQuery(query,
                                               new string[] {
                    "@DD_SALE", "@CD_STORE", "@NO_POS", "@NO_BORU"
                },
                                               new object[] {
                    ConfigData.Current.AppConfig.PosInfo.SaleDate,
                    ConfigData.Current.AppConfig.PosInfo.StoreNo,
                    ConfigData.Current.AppConfig.PosInfo.PosNo,
                    noBoru
                }, trans);

                List <SAT900TItemData> holdList = new List <SAT900TItemData>();
                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    string     vcCont = TypeHelper.ToString(dr["VC_CONT"]);
                    BasketItem bi     = (BasketItem)BasketItem.Parse(typeof(BasketItem), vcCont);
                    holdList.Add(new SAT900TItemData()
                    {
                        NoBoru = TypeHelper.ToString(dr["NO_BORU"]),
                        NmItem = bi.NmItem,
                        QtItem = TypeHelper.ToInt32(bi.CntItem),
                        AmItem = TypeHelper.ToInt32(bi.AmSale),
                        SqBoru = TypeHelper.ToInt32(dr["SQ_BORU"]),
                        Basket = bi,
                        VcCont = vcCont
                    });
                }

                #endregion

                #region 보류항목해제 상태저장

                if (holdList.Count > 0)
                {
                    query = "P003HoldTrxnRelease".POSSLQuerySQL();
                    db.ExecuteNonQuery(query,
                                       new string[] {
                        "@DD_SALE", "@CD_STORE", "@NO_POS", "@NO_BORU"
                    },
                                       new object[] {
                        ConfigData.Current.AppConfig.PosInfo.SaleDate,
                        ConfigData.Current.AppConfig.PosInfo.StoreNo,
                        ConfigData.Current.AppConfig.PosInfo.PosNo,
                        holdList[0].NoBoru
                    }, trans);
                }

                #endregion

                trans.Commit();
                return(holdList.ToArray());
            }
            catch (Exception ex)
            {
                if (trans != null)
                {
                    trans.Rollback();
                }
                LogUtils.Instance.LogException(ex);
                return(null);
            }
            finally
            {
                db.Dispose();
                trans.Dispose();
            }
        }
コード例 #17
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);
            }
        }
コード例 #18
0
        /// <summary>
        /// 여전법 추가 0621
        ///
        /// 디비에 개인정보, 카드번호를
        /// 00으로 마스킹한다
        /// 85일
        ///
        ///
        /// </summary>
        public void Clear85DaysSensData()
        {
            int lastDate = Convert.ToInt32(string.IsNullOrEmpty(ConfigData.Current.AppConfig.PosOption.LastDeleteSensData) ? "0" : ConfigData.Current.AppConfig.PosOption.LastDeleteSensData);

            string keepDates = ConfigData.Current.AppConfig.PosOption.SensDataKeepDays;

            if (string.IsNullOrEmpty(keepDates))
            {
                keepDates = "85";
                ConfigData.Current.AppConfig.PosOption.SensDataKeepDays = keepDates;
            }

            var dToDate = DateTime.Today.AddDays(Convert.ToInt32(keepDates) * -1);
            int toDate  = Convert.ToInt32(dToDate.ToString("yyyyMMdd"));

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

            try
            {
                string selectDataSql = Extensions.LoadSqlCommand("POS_ST", "POSClearSensData90DaysSelect");
                string updateDataSql = Extensions.LoadSqlCommand("POS_ST", "POSClearSensData90DaysUpdate");

                var data = db.ExecuteQuery(selectDataSql,
                                           new string[] {
                    "@CD_STORE",
                    "@NO_POS",
                    "@BSK_TYPE1",
                    "@BSK_TYPE2",
                    "@FR_DATE",
                    "@TO_DATE"
                },
                                           new object[] {
                    ConfigData.Current.AppConfig.PosInfo.StoreNo,
                    ConfigData.Current.AppConfig.PosInfo.PosNo,
                    "101",
                    "400",
                    lastDate,
                    toDate
                }, trans);

                foreach (DataRow item in data.Tables[0].Rows)
                {
                    bool changed = false;

                    // Parse BasketCardPay
                    string vcCont = item["VC_CONT"].ToString();

                    // BasketBase bb = (BasketBase)BasketBase.Parse(typeof(BasketBase), vcCont);
                    string basketType = vcCont.Substring(0, 3);

                    if (basketType.Equals(BasketTypes.BasketCashRecpt))
                    {
                        BasketCashRecpt bcrcp = (BasketCashRecpt)BasketCashRecpt.Parse(typeof(BasketCashRecpt), vcCont);
                        if (bcrcp.InputWcc.Equals("A"))
                        {
                            changed = true;
                            bcrcp.NoPersonal.ResetZero();
                            bcrcp.NoTrack.ResetZero();
                            vcCont = bcrcp.ToString();
                        }
                    }
                    else if (basketType.Equals(BasketTypes.BasketPay))
                    {
                        BasketPay bp = (BasketPay)BasketPay.Parse(typeof(BasketPay), vcCont);

                        if (bp.PayDtlCd.Equals(NetCommConstants.PAYMENT_DETAIL_CARD) &&
                            bp.PayGrpCd.Equals(NetCommConstants.PAYMENT_GROUP_CARD))
                        {
                            BasketPayCard bpc = (BasketPayCard)BasketPayCard.Parse(typeof(BasketPayCard), vcCont);

                            // Masking
                            changed = true;
                            bpc.CardNo.ResetZero();

                            // 여전법 추가 0623
                            // 저장 하지 않아서 reset zero 필요 없음
                            // bpc.TrackII.ResetZero();
                            vcCont = bpc.ToString();
                        }
                    }

                    // 변경 없음
                    if (!changed)
                    {
                        continue;
                    }


                    // 다시 업데이트
                    db.ExecuteNonQuery(updateDataSql,
                                       new string[] {
                        "@CD_STORE",
                        "@NO_POS",
                        "@DD_SALE",
                        "@NO_TRXN",
                        "@SQ_TRXN",
                        "@VC_CONT"
                    },
                                       new object[] {
                        ConfigData.Current.AppConfig.PosInfo.StoreNo,
                        ConfigData.Current.AppConfig.PosInfo.PosNo,
                        item["DD_SALE"],
                        item["NO_TRXN"],
                        item["SQ_TRXN"],
                        vcCont
                    }, trans);
                }

                // Update Config
                ConfigData.Current.AppConfig.PosOption.LastDeleteSensData = toDate.ToString();
                ConfigData.Current.AppConfig.Save();

                trans.Commit();
            }
            catch (Exception ex)
            {
                trans.Rollback();
                LogUtils.Instance.LogException(ex);
            }
            finally
            {
                trans.Dispose();
                db.EndInstance();
            }
        }
コード例 #19
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);
            }
        }
コード例 #20
0
ファイル: EDP002presenter.cs プロジェクト: nhhuy1804/Wmall
        /// <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);
            }
        }
コード例 #21
0
ファイル: TestUtils.cs プロジェクト: nhhuy1804/Wmall
        /// <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();
                }
            }
        }