/// <summary>
        /// Selects a single record from the Encargado table.
        /// </summary>
        public EncargadoEntidad Select(decimal numCedula)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@NumCedula", numCedula)
            };

            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "EncargadoSelect", parameters))
            {
                if (dataReader.Read())
                {
                    return(MapDataReader(dataReader));
                }
                else
                {
                    return(null);
                }
            }
        }
예제 #2
0
        /// <summary>
        /// Selects all records from the sol_CategoryButtons table by a foreign key.
        /// </summary>
        public virtual List <Sol_CategoryButton> _SelectAllByCategoryID(int categoryID)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@CategoryID", categoryID)
            };

            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "sol_CategoryButtons_SelectAllByCategoryID", parameters))
            {
                List <Sol_CategoryButton> sol_CategoryButtonList = new List <Sol_CategoryButton>();
                while (dataReader.Read())
                {
                    Sol_CategoryButton sol_CategoryButton = MakeSol_CategoryButton(dataReader);
                    sol_CategoryButtonList.Add(sol_CategoryButton);
                }

                return(sol_CategoryButtonList);
            }
        }
        /// <summary>
        /// Selects a single record from the CHI_TIET_PHIEU_DAT_XE table.
        /// </summary>
        public CHITIETPHIEUDATXE_DTO Select(int Ma)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@MA", Ma)
            };

            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(m_ConnectionString, CommandType.StoredProcedure, "PROC_ChiTietPhieuDatXe_Select", parameters))
            {
                if (dataReader.Read())
                {
                    return(MakeCHITIETPHIEUDATXE_DTO(dataReader));
                }
                else
                {
                    return(null);
                }
            }
        }
예제 #4
0
        /// <summary>
        /// Selects a single record from the Sol_WS_ErrorCodes table.
        /// </summary>
        public virtual Sol_WS_ErrorCode Select(int errorNumber)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@ErrorNumber", errorNumber)
            };

            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "Sol_WS_ErrorCodes_Select", parameters))
            {
                if (dataReader.Read())
                {
                    return(MakeSol_WS_ErrorCode(dataReader));
                }
                else
                {
                    return(null);
                }
            }
        }
        /// <summary>
        /// Selects all records from the Transaccion table by a foreign key.
        /// </summary>
        public List <TransaccionEntidad> SelectAllByIdDiagnostico(decimal idDiagnostico)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@IdDiagnostico", idDiagnostico)
            };

            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "TransaccionSelectAllByIdDiagnostico", parameters))
            {
                List <TransaccionEntidad> transaccionEntidadList = new List <TransaccionEntidad>();
                while (dataReader.Read())
                {
                    TransaccionEntidad transaccionEntidad = MapDataReader(dataReader);
                    transaccionEntidadList.Add(transaccionEntidad);
                }

                return(transaccionEntidadList);
            }
        }
예제 #6
0
        /// <summary>
        /// Selects all records from the sol_Entries table by a foreign key.
        /// </summary>
        public virtual List <Sol_Entrie> _SelectAllByExpenseTypeID(int expenseTypeID)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@ExpenseTypeID", expenseTypeID)
            };

            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "sol_Entries_SelectAllByExpenseTypeID", parameters))
            {
                List <Sol_Entrie> sol_EntrieList = new List <Sol_Entrie>();
                while (dataReader.Read())
                {
                    Sol_Entrie sol_Entrie = MakeSol_Entrie(dataReader);
                    sol_EntrieList.Add(sol_Entrie);
                }

                return(sol_EntrieList);
            }
        }
예제 #7
0
        /// <summary>
        /// Selects a single record from the sol_Products table by ProductCode
        /// </summary>
        public virtual Sol_Product SelectProductCode(string productCode)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@ProductCode", productCode)
            };

            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "sol_Products_SelectProductCode", parameters))
            {
                if (dataReader.Read())
                {
                    return(MakeSol_Product(dataReader));
                }
                else
                {
                    return(null);
                }
            }
        }
예제 #8
0
        /// <summary>
        /// Selects a single record from the sol_QueryDate table.
        /// </summary>
        public virtual Sol_QueryDate Select(string userName)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@DateFrom", dateFrom)
            };

            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "sol_QueryDate_Select", parameters))
            {
                if (dataReader.Read())
                {
                    return(MakeSol_QueryDate(dataReader));
                }
                else
                {
                    return(null);
                }
            }
        }
예제 #9
0
        /// <summary>
        /// Selects all records from the PHIEU_XUAT_XE table by a foreign key.
        /// </summary>
        public List <PHIEUXUATXE_DTO> SelectAllByMaNhanVien(int MaNhanVien)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@MA_NHAN_VIEN", MaNhanVien)
            };

            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(m_ConnectionString, CommandType.StoredProcedure, "PROC_PhieuXuatXeSelectAllByMaNhanVien", parameters))
            {
                List <PHIEUXUATXE_DTO> PhieuXuatXeList = new List <PHIEUXUATXE_DTO>();
                while (dataReader.Read())
                {
                    PHIEUXUATXE_DTO PhieuXuatXe = MakePHIEUXUATXE_DTO(dataReader);
                    PhieuXuatXeList.Add(PhieuXuatXe);
                }

                return(PhieuXuatXeList);
            }
        }
예제 #10
0
        /// <summary>
        /// Selects all records from the Qds_Drop table.
        /// </summary>
        public virtual List <Qds_Drop> SelectAllByOrderTpe(string orderType)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@OrderType", orderType)
            };

            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "Qds_Drop_SelectAllByOrderType", parameters))
            {
                List <Qds_Drop> qds_DropList = new List <Qds_Drop>();
                while (dataReader.Read())
                {
                    Qds_Drop qds_Drop = MakeQds_Drop(dataReader);
                    qds_DropList.Add(qds_Drop);
                }

                return(qds_DropList);
            }
        }
예제 #11
0
        /// <summary>
        /// Selects a single record from the Qds_Drop table.
        /// </summary>
        public virtual bool IsReady(int dropID)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@DropID", dropID)
            };

            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "Qds_Drop_IsReady", parameters))
            {
                if (dataReader.Read())
                {
                    return(SqlClientUtility.GetBoolean(dataReader, "Ready", false));
                }
                else
                {
                    return(false);
                }
            }
        }
예제 #12
0
        /// <summary>
        /// Selects all records from the sol_Orders table by a foreign key.
        /// </summary>
        public virtual Sol_Order _SelectByOrderID(int orderID)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@OrderID", orderID)
            };

            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "sol_Orders_SelectByOrderID", parameters))
            {
                if (dataReader.Read())
                {
                    return(MakeSol_Order(dataReader));
                }
                else
                {
                    return(null);
                }
            }
        }
예제 #13
0
        /// <summary>
        /// Selects all records from the sol_Orders table by a foreign key.
        /// </summary>
        public virtual List <Sol_Order> _SelectAllByFeeID(int feeID)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@FeeID", feeID)
            };

            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "sol_Orders_SelectAllByFeeID", parameters))
            {
                List <Sol_Order> sol_OrderList = new List <Sol_Order>();
                while (dataReader.Read())
                {
                    Sol_Order sol_Order = MakeSol_Order(dataReader);
                    sol_OrderList.Add(sol_Order);
                }

                return(sol_OrderList);
            }
        }
        /// <summary>
        /// Selects all records from the MAU_XE table by a foreign key.
        /// </summary>
        public List <MAUXE_DTO> SelectAllByMaXe(int MaXe)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@MA_XE", MaXe)
            };

            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(m_ConnectionString, CommandType.StoredProcedure, "PROC_MauXe_SelectAllByMa_Xe", parameters))
            {
                List <MAUXE_DTO> MauXeList = new List <MAUXE_DTO>();
                while (dataReader.Read())
                {
                    MAUXE_DTO MauXe = MakeMAUXE_DTO(dataReader);
                    MauXeList.Add(MauXe);
                }

                return(MauXeList);
            }
        }
예제 #15
0
        /// <summary>
        /// Selects a single record from the Rule table.
        /// </summary>
        public virtual Rule Select(int iD)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@ID", iD)
            };

            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "RuleSelect", parameters))
            {
                if (dataReader.Read())
                {
                    return(MakeRule(dataReader));
                }
                else
                {
                    return(null);
                }
            }
        }
        /// <summary>
        /// Selects a single record from the LOAI_NHAN_VIEN table.
        /// </summary>
        public LOAINHANVIEN_DTO Select(int Ma)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@MA", Ma)
            };

            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(m_ConnectionString, CommandType.StoredProcedure, "PROC_LoaiNhanVien_Select", parameters))
            {
                if (dataReader.Read())
                {
                    return(MakeLOAINHANVIEN_DTO(dataReader));
                }
                else
                {
                    return(null);
                }
            }
        }
예제 #17
0
        /// <summary>
        /// Selects a single record from the Sol_Settings table.
        /// </summary>
        public virtual Sol_Setting Select(string name)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@Name", name)
            };

            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "Sol_Settings_Select", parameters))
            {
                if (dataReader.Read())
                {
                    return(MakeSol_Setting(dataReader));
                }
                else
                {
                    return(null);
                }
            }
        }
예제 #18
0
        /// <summary>
        /// Selects a single record from the Sol_OrderCardLink table.
        /// </summary>
        public virtual Sol_OrderCardLink SelectByCardNumber(string cardNumber)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@CardNumber", cardNumber)
            };

            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "Sol_OrderCardLink_SelectByCardNumber", parameters))
            {
                if (dataReader.Read())
                {
                    return(MakeSol_OrderCardLink(dataReader));
                }
                else
                {
                    return(null);
                }
            }
        }
예제 #19
0
        /// <summary>
        /// Selects all records from the sol_Products table by a foreign key.
        /// </summary>
        public virtual List <Sol_Product> _SelectAllByStandardDozenID(int standardDozenID)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@StandardDozenID", standardDozenID)
            };

            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "sol_Products_SelectAllByStandardDozenID", parameters))
            {
                List <Sol_Product> sol_ProductList = new List <Sol_Product>();
                while (dataReader.Read())
                {
                    Sol_Product sol_Product = MakeSol_Product(dataReader);
                    sol_ProductList.Add(sol_Product);
                }

                return(sol_ProductList);
            }
        }
예제 #20
0
        /// <summary>
        /// Selects all records from the Sol_OrderCardLink table by a foreign key.
        /// </summary>
        public virtual List <Sol_OrderCardLink> SelectAllByCardNumber(string cardNumber)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@CardNumber", cardNumber)
            };

            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "Sol_OrderCardLink_SelectByCardNumber", parameters))
            {
                List <Sol_OrderCardLink> sol_OrderCardLinkList = new List <Sol_OrderCardLink>();
                while (dataReader.Read())
                {
                    Sol_OrderCardLink sol_OrderCardLink = MakeSol_OrderCardLink(dataReader);
                    sol_OrderCardLinkList.Add(sol_OrderCardLink);
                }

                return(sol_OrderCardLinkList);
            }
        }
예제 #21
0
        /// <summary>
        /// Selects all records from the Sac_MoneyInventory table by a foreign key.
        /// </summary>
        public virtual List <Sac_MoneyInventory> _SelectAllByClientID(string clientID)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@ClientID", clientID)
            };

            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "Sac_MoneyInventory_SelectAllByClientID", parameters))
            {
                List <Sac_MoneyInventory> sac_MoneyInventoryList = new List <Sac_MoneyInventory>();
                while (dataReader.Read())
                {
                    Sac_MoneyInventory sac_MoneyInventory = MakeSac_MoneyInventory(dataReader);
                    sac_MoneyInventoryList.Add(sac_MoneyInventory);
                }

                return(sac_MoneyInventoryList);
            }
        }
예제 #22
0
        public XE_DTO SelectByTenXe(string TenXe)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@TEN_XE", TenXe)
            };

            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(m_ConnectionString, CommandType.StoredProcedure, "PROC_Xe_SelectByTenXe", parameters))
            {
                if (dataReader.Read())
                {
                    return(MakeXE_DTO(dataReader));
                }
                else
                {
                    return(null);
                }
            }
        }
예제 #23
0
        /// <summary>
        /// Selects a single record from the DON_DAT_HANG table.
        /// </summary>
        public DONDATHANG_DTO Select(int Ma)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@MA", Ma)
            };

            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(m_ConnectionString, CommandType.StoredProcedure, "PROC_DonDatHang_Select", parameters))
            {
                if (dataReader.Read())
                {
                    return(MakeDONDATHANG_DTO(dataReader));
                }
                else
                {
                    return(null);
                }
            }
        }
예제 #24
0
        /// <summary>
        /// Selects all records from the XE table by a foreign key.
        /// </summary>
        public List <XE_DTO> SelectAllByMaKieuXe(int MaKieuXe)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@MA_KIEU_XE", MaKieuXe)
            };

            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(m_ConnectionString, CommandType.StoredProcedure, "PROC_XeSelectAllByMaKieuXe", parameters))
            {
                List <XE_DTO> XeList = new List <XE_DTO>();
                while (dataReader.Read())
                {
                    XE_DTO Xe = MakeXE_DTO(dataReader);
                    XeList.Add(Xe);
                }

                return(XeList);
            }
        }
        /// <summary>
        /// Selects a single record from the Transaccion table.
        /// </summary>
        public TransaccionEntidad Select(decimal idTransaccion)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@IdTransaccion", idTransaccion)
            };

            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "TransaccionSelect", parameters))
            {
                if (dataReader.Read())
                {
                    return(MapDataReader(dataReader));
                }
                else
                {
                    return(null);
                }
            }
        }
예제 #26
0
        /// <summary>
        /// Selects a single record from the Syc_UpdateLog table.
        /// </summary>
        public virtual Syc_UpdateLog Select(int tempID)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@TempID", tempID)
            };

            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "Syc_UpdateLog_Select", parameters))
            {
                if (dataReader.Read())
                {
                    return(MakeSyc_UpdateLog(dataReader));
                }
                else
                {
                    return(null);
                }
            }
        }
예제 #27
0
        /// <summary>
        /// Selects a single record from the sol_ContainerTypes table.
        /// </summary>
        public virtual Sol_ContainerType Select(int containerTypeID)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@ContainerTypeID", containerTypeID)
            };

            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "sol_ContainerTypes_Select", parameters))
            {
                if (dataReader.Read())
                {
                    return(MakeSol_ContainerType(dataReader));
                }
                else
                {
                    return(null);
                }
            }
        }
예제 #28
0
        /// <summary>
        /// Selects a single record from the Sol_WS_Plants table.
        /// </summary>
        public virtual Sol_WS_Plant Select(int plantID)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@PlantID", plantID)
            };

            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "Sol_WS_Plants_Select", parameters))
            {
                if (dataReader.Read())
                {
                    return(MakeSol_WS_Plant(dataReader));
                }
                else
                {
                    return(null);
                }
            }
        }
        /// <summary>
        /// Selects all records from the CHI_TIET_PHIEU_DAT_XE table by a foreign key.
        /// </summary>
        public List <CHITIETPHIEUDATXE_DTO> SelectAllByMaXe(int MaXe)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@MA_XE", MaXe)
            };

            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(m_ConnectionString, CommandType.StoredProcedure, "PROC_ChiTietPhieuDatXeSelectAllByMaXe", parameters))
            {
                List <CHITIETPHIEUDATXE_DTO> ChiTietPhieuDatXeList = new List <CHITIETPHIEUDATXE_DTO>();
                while (dataReader.Read())
                {
                    CHITIETPHIEUDATXE_DTO ChiTietPhieuDatXe = MakeCHITIETPHIEUDATXE_DTO(dataReader);
                    ChiTietPhieuDatXeList.Add(ChiTietPhieuDatXe);
                }

                return(ChiTietPhieuDatXeList);
            }
        }
예제 #30
0
        /// <summary>
        /// Selects all records from the Sol_SupplyInventory table by a foreign key.
        /// </summary>
        public virtual List <Sol_SupplyInventory> _SelectAllByShipmentID(int shipmentID)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@ShipmentID", shipmentID)
            };

            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "Sol_SupplyInventory_SelectAllByShipmentID", parameters))
            {
                List <Sol_SupplyInventory> sol_SupplyInventoryList = new List <Sol_SupplyInventory>();
                while (dataReader.Read())
                {
                    Sol_SupplyInventory sol_SupplyInventory = MakeSol_SupplyInventory(dataReader);
                    sol_SupplyInventoryList.Add(sol_SupplyInventory);
                }

                return(sol_SupplyInventoryList);
            }
        }