예제 #1
0
        public List <WarehousingModels> SelectRows_Nhapkho_ma(WarehousingModels clParam)
        {
            logger.Start("SelectRows_Nhapkho");
            List <WarehousingModels> lstResult = new List <WarehousingModels>();

            try
            {
                Hashtable param = new Hashtable();
                param = base.SetDataToHashtable(false, clParam);
                if (param["manhapkho"].ToString() == "")
                {
                    param["manhapkho"] = "";
                }

                IList        ilist = sqlMap.ExecuteQueryForList("Nhapkho.SelectRows_Nhapkho_ma", param);
                CastDataType cast  = new CastDataType();
                lstResult = cast.AdvanceCastDataToList <WarehousingModels>(ilist);
            }
            catch (Exception ex)
            {
                logger.Error("Loi ---> " + ex.Message);
            }
            logger.End("SelectRows_Nhapkho");
            return(lstResult);
        }
예제 #2
0
        public List <WarehousingModels> SelectRows_Nhapkho(WarehousingModels clParam, int trangbd, int trangkt, string tungay, string denngay)
        {
            logger.Start("SelectRows_Nhapkho");
            List <WarehousingModels> lstResult = new List <WarehousingModels>();

            try
            {
                Hashtable param = new Hashtable();
                param = base.SetDataToHashtable(false, clParam);
                if (param["manhapkho"].ToString() == "")
                {
                    param["manhapkho"] = "";
                }

                if (param["nguoitao"].ToString() == "0" || param["nguoitao"].ToString() == "1")
                {
                    param["nguoitao"] = "";
                }

                param["tungay"]  = tungay;
                param["denngay"] = denngay;

                param["trangbd"] = trangbd;
                param["trangkt"] = trangkt;

                IList        ilist = sqlMap.ExecuteQueryForList("Nhapkho.SelectRows_Nhapkho", param);
                CastDataType cast  = new CastDataType();
                lstResult = cast.AdvanceCastDataToList <WarehousingModels>(ilist);
            }
            catch (Exception ex)
            {
                logger.Error("Loi ---> " + ex.Message);
            }
            logger.End("SelectRows_Nhapkho");
            return(lstResult);
        }
예제 #3
0
        public int CountRows(WarehousingModels clparam)
        {
            logger.Start("CountRows");
            int iResult = 0;

            try
            {
                Hashtable param = new Hashtable();
                param = base.SetDataToHashtable(false, clparam);
                if (param["nguoitao"].ToString() == "0" || param["nguoitao"].ToString() == "1")
                {
                    param["nguoitao"] = "";
                }
                iResult = (int)sqlMap.ExecuteQueryForObject("Nhapkho.CountRows_Nhapkho", param);
            }
            catch (Exception ex)
            {
                sqlMap.RollbackTransaction();
                iResult = 0;
                logger.Error(ex.Message);
            }
            logger.End("CountRows");
            return(iResult);
        }