public static DataTable AllCategoriesDrugsByParent(int? p_ParentCategoryID, bool p_isShowAll)
 {
     StoredProcedure sp = new StoredProcedure("p_CategoriesDrugs_sl_ByParent");
     sp["@CategoryID"].Value = p_ParentCategoryID == null ? DBNull.Value : (object)p_ParentCategoryID;
     sp["@ShowAll"].Value = p_isShowAll;
     return sp.ExecuteDataTable();
 }
        public static DataTable GetCategory(int p_CategoryID)
        {
            StoredProcedure sp = new StoredProcedure("p_Categories_s");
            sp["@CategoryID"].Value = p_CategoryID;

            return sp.ExecuteDataTable();
        }
 public static DataTable AllByParent(int? p_ParentCategoryID, bool p_ShowDisable)
 {
     StoredProcedure sp = new StoredProcedure("p_Categories_sl_ByParent");
     sp["@ParentCategoryID"].Value = p_ParentCategoryID==null?DBNull.Value:(object)p_ParentCategoryID;
     sp["@ShowDisable"].Value = p_ShowDisable;
     return sp.ExecuteDataTable();
 }
 public static DataRow GetBanner(int p_BannerID)
 {
     StoredProcedure sp = new StoredProcedure("p_Banners_s");
     sp["@BannerID"].Value = p_BannerID;
     DataTable l_dtRes = sp.ExecuteDataTable();
     if (l_dtRes.Rows.Count<=0) return null;
     return l_dtRes.Rows[0];
 }
 public static DataRow GetCategoryByCode(string  p_CategoryCode)
 {
     StoredProcedure sp = new StoredProcedure("p_Categories_s_byCategoryCode");
     sp["@CategoryCode"].Value = p_CategoryCode;
     DataTable l_dtRes = sp.ExecuteDataTable();
     if (l_dtRes.Rows.Count>0)
     {
         return l_dtRes.Rows[0];
     }else {return null;}
 }
 public static DataTable All()
 {
     StoredProcedure sp = new StoredProcedure("p_Banners_sl");
     return sp.ExecuteDataTable();
 }
Exemple #7
0
 public static DataTable GetPossibleDeliveries(string p_DrugIDs)
 {
     StoredProcedure sp = new StoredProcedure("p_DeliveryMethods_s_ByDrugs");
     sp["@DrugIDs"].Value = p_DrugIDs;
     return sp.ExecuteDataTable();
 }
 public static DataTable GetCategoryByDrugId(int p_DrugID)
 {
     StoredProcedure sp = new StoredProcedure("p_Category_sl_byDrugID");
     sp["@DrugID"].Value = p_DrugID;
     return sp.ExecuteDataTable();
 }
 public static DataTable All(bool p_ShowDisable)
 {
     StoredProcedure sp = new StoredProcedure("p_Categories_sl");
     sp["@ShowDisable"].Value = p_ShowDisable;
     return sp.ExecuteDataTable();
 }
 public static DataRow GetCategoryParentByID(int p_CategoryID)
 {
     StoredProcedure sp = new StoredProcedure("p_Categories_s_ParentbyCategoryID");
     sp["@CategoryID"].Value = p_CategoryID;
     DataTable l_dtRes = sp.ExecuteDataTable();
     if (l_dtRes.Rows.Count > 0)
     {
         return l_dtRes.Rows[0];
     }
     else { return null; }
 }
 public static DataTable GetCustomerAddresses(int p_CustomerID)
 {
     StoredProcedure sp = new StoredProcedure("p_CustomerAddresses_sl");
     sp["@CustomerID"].Value = p_CustomerID;
     return sp.ExecuteDataTable();
 }
 private static DataTable GetCustomerByCredentials(string p_Login, string p_Password, bool p_isCheckPass)
 {
     StoredProcedure sp = new StoredProcedure("p_Customers_s_byLogin");
     sp["@Login"].Value = p_Login.Trim();
     sp["@Password"].Value = p_Password.Trim();
     sp["@isCheckPass"].Value = p_isCheckPass;
     return sp.ExecuteDataTable();
 }