예제 #1
0
        public static List <KhoCuonBDO> LayTatCa(string productSku)
        {
            var parameters = new Dictionary <string, object>();

            parameters.Add("SKU_SAN_PHAM", productSku);


            var tblKHO_SAN_PHAM = CalcDbExecutor.ExecuteQuery("SELECT * FROM KHO_SAN_PHAM_SPC WHERE SKU_SAN_PHAM = @SKU_SAN_PHAM ORDER BY THU_TU ASC", parameters);

            List <KhoCuonBDO> lst = new List <KhoCuonBDO>();

            foreach (DataRow row in tblKHO_SAN_PHAM.Rows)
            {
                lst.Add(new KhoCuonBDO
                {
                    ID                      = (long)row["ID"],
                    TEN_KHO                 = (string)row["TEN_KHO"],
                    THU_TU                  = (long)row["THU_TU"],
                    SKU_SAN_PHAM            = (string)row["SKU_SAN_PHAM"],
                    MA_TO_IN_AP             = (string)row["MA_TO_IN_AP"],
                    SO_CON_TR_TO_CHAY       = (int)row["SO_CON_TR_TO_CHAY"],
                    MA_LOI_NHUAN_THEO_TRANG = (string)row["MA_LOI_NHUAN_THEO_TRANG"]
                });
            }

            return(lst);
        }
예제 #2
0
        //
        public static List <SoLuongPhangBDO> LayTatCa(string productSku)
        {
            var parameters = new Dictionary <string, object>();

            parameters.Add("SKU_SAN_PHAM", productSku);


            var tblSO_LUONG_CUON = CalcDbExecutor.ExecuteQuery("SELECT * FROM SO_LUONG_THANH_PHAM_SPP WHERE SKU_SAN_PHAM = @SKU_SAN_PHAM ORDER BY THU_TU ASC", parameters);

            List <SoLuongPhangBDO> lst = new List <SoLuongPhangBDO>();


            foreach (DataRow row in tblSO_LUONG_CUON.Rows)
            {
                lst.Add(new SoLuongPhangBDO
                {
                    ID                  = (long)row["ID"],
                    TEN_SO_LUONG        = (string)row["TEN_SO_LUONG"],
                    THU_TU              = (long)row["THU_TU"],
                    SKU_SAN_PHAM        = (string)row["SKU_SAN_PHAM"],
                    SO_LUONG            = (int)row["SO_LUONG"],
                    MUC_LOI_NHUAN_IN_TP = (int)row["MUC_LOI_NHUAN_IN_TP"],
                    SO_TO_CHAY_BU_HAO   = (int)row["SO_TO_CHAY_BU_HAO"]
                });
            }

            return(lst);
        }
예제 #3
0
        //-------
        public static List <RuotCuonBDO> LayTatCa(string productSku)
        {
            var parameters = new Dictionary <string, object>();

            parameters.Add("SKU_SAN_PHAM", productSku);


            var tblRUOT = CalcDbExecutor.ExecuteQuery("SELECT * FROM RUOT_SPC WHERE SKU_SAN_PHAM = @SKU_SAN_PHAM ORDER BY THU_TU ASC", parameters);

            List <RuotCuonBDO> lst = new List <RuotCuonBDO>();

            foreach (DataRow row in tblRUOT.Rows)
            {
                lst.Add(new RuotCuonBDO
                {
                    ID           = (long)row["ID"],
                    TEN_RUOT     = (string)row["TEN_RUOT"],
                    THU_TU       = (long)row["THU_TU"],
                    SKU_SAN_PHAM = (string)row["SKU_SAN_PHAM"],
                    SO_TRANG     = (int)row["SO_TRANG"]
                });
            }

            return(lst);
        }
예제 #4
0
        //------
        public static List <CachInPhangBDO> LayTatCa(string productSku)
        {
            var parameters = new Dictionary <string, object>();

            parameters.Add("SKU_SAN_PHAM", productSku);


            var tblGIAY_IN_RUOT = CalcDbExecutor.ExecuteQuery("SELECT * FROM CACH_IN_SPP WHERE SKU_SAN_PHAM = @SKU_SAN_PHAM ORDER BY THU_TU ASC", parameters);

            List <CachInPhangBDO> lst = new List <CachInPhangBDO>();

            foreach (DataRow row in tblGIAY_IN_RUOT.Rows)
            {
                lst.Add(new CachInPhangBDO
                {
                    ID           = (long)row["ID"],
                    TEN_CACH_IN  = (string)row["TEN_CACH_IN"],
                    THU_TU       = (long)row["THU_TU"],
                    SKU_SAN_PHAM = (string)row["SKU_SAN_PHAM"],
                    SO_MAT       = (int)row ["SO_MAT"]
                });
            }

            return(lst);
        }
예제 #5
0
        //====
        public static List <LoiNhuanTheoSoLuongBDO> LayTatCa()
        {
            var parameters = new Dictionary <string, object>();

            var tblGIAY_IN_RUOT = CalcDbExecutor.ExecuteQuery("SELECT * FROM TO_IN_DIGI");

            List <LoiNhuanTheoSoLuongBDO> lst = new List <LoiNhuanTheoSoLuongBDO>();

            foreach (DataRow row in tblGIAY_IN_RUOT.Rows)
            {
                lst.Add(new LoiNhuanTheoSoLuongBDO
                {
                    MA_SO           = (string)row["MA_SO"],
                    TEN             = (string)row["TEN"],
                    DAY_SO_LUONG    = (string)row["DAY_SO_LUONG"],
                    DAY_LOI_NHUAN   = (string)row["DAY_LOI_NHUAN"],
                    DON_VI_SO_LUONG = (string)row["DON_VI_SO_LUONG"],
                    THU_TU          = (int)row["THU_TU"]
                });
            }

            return(lst);
        }