Exemple #1
0
        public DataTable SelectRewardsForReferral(int nTypeID, string strBranchCode)
        {
            string cmdText = "select strDescription='',dRewardsValue='' union Select strDescription,dRewardsValue From tblRewards A, tblRewardsBRanch B Where A.strRewardsCode = B.strRewardsCode AND " +
                             "A.nTypeID = @nTypeID AND A.dtValidStart <= convert(varchar(10),getdate(),120) AND " +
                             " A.dtValidEnd >= convert(varchar(10),getdate(),120) AND strBranchCode=@strBranchCode ";

            ACMSDAL.TblRewards reward         = new ACMSDAL.TblRewards();
            DataTable          tblRewardsCode = reward.LoadData(cmdText, new string[] { "@nTypeID", "@strBranchCode" },
                                                                new object[] { nTypeID, strBranchCode });

            return(tblRewardsCode);
        }
Exemple #2
0
        public string SelectRewards(int SalesCategory, string strBranchCode)
        {
            string cmdText = "Select * From tblRewards A, tblRewardsBRanch B, tblcategory C Where A.strRewardsCode = B.strRewardsCode AND " +
                             "A.nSalesCategoryID = C.nSalesCategoryID AND A.nTypeID = 1 AND A.dtValidStart <= @dtDate AND " +
                             " A.dtValidEnd >= @dtDate AND B.strBranchCode = @strBranchCode AND A.nSalesCategoryID in (select nSalesCategoryID from tblCategory where nCategoryID = @nSalesCategoryID) ";

            ACMSDAL.TblRewards reward         = new ACMSDAL.TblRewards();
            DataTable          tblRewardsCode = reward.LoadData(cmdText, new string [] { "@nSalesCategoryID", "@dtDate", "@strBranchCode" },
                                                                new object[] { SalesCategory, DateTime.Today.Date, strBranchCode });
            string myRewardsCode = tblRewardsCode.Rows[0]["strRewardsCode"].ToString();

            return(myRewardsCode);
        }
Exemple #3
0
        public DataTable SelectRewardsForReferral(int nTypeID, string strBranchCode)
        {
            string cmdText = "select strDescription='',dRewardsValue='' union Select strDescription,dRewardsValue From tblRewards A, tblRewardsBRanch B Where A.strRewardsCode = B.strRewardsCode AND " +
                "A.nTypeID = @nTypeID AND A.dtValidStart <= convert(varchar(10),getdate(),120) AND " +
                " A.dtValidEnd >= convert(varchar(10),getdate(),120) AND strBranchCode=@strBranchCode ";

            ACMSDAL.TblRewards reward = new ACMSDAL.TblRewards();
            DataTable tblRewardsCode = reward.LoadData(cmdText, new string[] { "@nTypeID", "@strBranchCode" },
                new object[] { nTypeID, strBranchCode });

            return tblRewardsCode;
        }
Exemple #4
0
        public string SelectRewards(int SalesCategory,string strBranchCode)
        {
            string cmdText = "Select * From tblRewards A, tblRewardsBRanch B, tblcategory C Where A.strRewardsCode = B.strRewardsCode AND " +
                "A.nSalesCategoryID = C.nSalesCategoryID AND A.nTypeID = 1 AND A.dtValidStart <= @dtDate AND " +
                " A.dtValidEnd >= @dtDate AND B.strBranchCode = @strBranchCode AND A.nSalesCategoryID in (select nSalesCategoryID from tblCategory where nCategoryID = @nSalesCategoryID) ";

            ACMSDAL.TblRewards reward = new ACMSDAL.TblRewards();
            DataTable tblRewardsCode = reward.LoadData(cmdText, new string []{"@nSalesCategoryID", "@dtDate", "@strBranchCode" },
                new object[] {SalesCategory, DateTime.Today.Date, strBranchCode});
            string myRewardsCode = tblRewardsCode.Rows[0]["strRewardsCode"].ToString();
            return myRewardsCode;
        }
Exemple #5
0
        public DataTable SelectRewards(int SalesCategory,string strBranchCode)
        {
            string cmdText = "Select * From tblRewards A, tblRewardsBRanch B Where A.strRewardsCode = B.strRewardsCode AND " +
                " A.nTypeID = 1 AND A.nSalesCategoryID = @nSalesCategoryID AND A.dtValidStart <= @dtDate AND " +
                " A.dtValidEnd >= @dtDate AND B.strBranchCode = @strBranchCode ";

            ACMSDAL.TblRewards reward = new ACMSDAL.TblRewards();
            myDataTable = reward.LoadData(cmdText, new string []{"@nSalesCategoryID", "@dtDate", "@strBranchCode" },
                new object[] {SalesCategory, DateTime.Today.Date, strBranchCode});
            return myDataTable;
        }
Exemple #6
0
        public override void Refresh()
        {
            string cmdText = "Select * From tblRewards A, tblRewardsBRanch B Where A.strRewardsCode = B.strRewardsCode AND " +
                " A.nTypeID = 1 AND A.nSalesCategoryID = @nSalesCategoryID AND A.dtValidStart <= @dtDate AND " +
                " A.dtValidEnd >= @dtDate AND B.strBranchCode = @strBranchCode ";

            ACMSDAL.TblRewards reward = new ACMSDAL.TblRewards();
            myDataTable = reward.LoadData(cmdText, new string []{"@nSalesCategoryID", "@dtDate", "@strBranchCode" },
                new object[] {mySalesCategory, DateTime.Today.Date, myStrBranchCode});
            Init();
        }