Ejemplo n.º 1
0
        //Validating & Deleting Distributor
        public static bool DeleteDistributorBL(int deleteDistributorID)
        {
            bool distributorDeleted = false;

            try
            {
                if (deleteDistributorID > 0)
                {
                    DistributorDAL distributorDAL = new DistributorDAL();
                    distributorDeleted = distributorDAL.DeleteDistributorDAL(deleteDistributorID);
                }
                else
                {
                    throw new InventoryException("Invalid Distributor ID");
                }
            }
            catch (InventoryException)
            {
                throw;
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(distributorDeleted);
        }
Ejemplo n.º 2
0
 /// <summary>
 ///Invokes Deserialize method of DAL.
 /// </summary>
 public static void Deserialize()
 {
     try
     {
         DistributorDAL.Deserialize();
     }
     catch (Exception)
     {
         throw;
     }
 }
Ejemplo n.º 3
0
        public Boolean Delete(SqlInt32 DistributorID)
        {
            DistributorDAL distributorDAL = new DistributorDAL();

            if (distributorDAL.Delete(DistributorID))
            {
                return(true);
            }
            else
            {
                this.Message = distributorDAL.Message;
                return(true);
            }
        }
Ejemplo n.º 4
0
        public Boolean Update(DistributorENT entDistributor)
        {
            DistributorDAL distributorDAL = new DistributorDAL();

            if (distributorDAL.Update(entDistributor))
            {
                return(true);
            }
            else
            {
                this.Message = distributorDAL.Message;
                return(false);
            }
        }
Ejemplo n.º 5
0
        public string DeleteDistributorById(string DistirbutorId)
        {
            string result = string.Empty;

            try
            {
                DistributorDAL dal = new DistributorDAL();
                result = dal.DeleteDistributorById(DistirbutorId);
            }
            catch (Exception ex)
            {
                throw;
            }
            return(result);
        }
Ejemplo n.º 6
0
        public List <DistributorMaster> GetAllDistributors()
        {
            List <DistributorMaster> DistributorList = new List <DistributorMaster>();

            try
            {
                DistributorDAL dal = new DistributorDAL();
                DistributorList = dal.GetAllDistributors();
            }
            catch (Exception ex)
            {
                throw;
            }
            return(DistributorList);
        }
Ejemplo n.º 7
0
        public string InsertUpdateDistributor(DistributorMaster distributor)
        {
            string result = string.Empty;

            try
            {
                DistributorDAL dal = new DistributorDAL();
                result = dal.InsertUpdateDistributor(distributor);
            }
            catch (Exception ex)
            {
                throw;
            }
            return(result);
        }
Ejemplo n.º 8
0
        public List <DistributorCategory> GetAllDistributorCategories()
        {
            List <DistributorCategory> DistributorCategoryList = new List <DistributorCategory>();

            try
            {
                DistributorDAL dal = new DistributorDAL();
                DistributorCategoryList = dal.GetAllDistributorCategories();
            }
            catch (Exception ex)
            {
                throw;
            }
            return(DistributorCategoryList);
        }
Ejemplo n.º 9
0
        public List <SubRegion> GetAllSubReigons()
        {
            List <SubRegion> subRegionList = new List <SubRegion>();

            try
            {
                DistributorDAL dal = new DistributorDAL();
                subRegionList = dal.GetAllSubRegion();
            }
            catch (Exception ex)
            {
                throw;
            }
            return(subRegionList);
        }
Ejemplo n.º 10
0
        //Returning complete list of distributors
        public static List <Distributor> GetAllDistributorsBL()
        {
            List <Distributor> distributorList = null;

            try
            {
                DistributorDAL distributorDAL = new DistributorDAL();
                distributorList = distributorDAL.GetAllDistributorsDAL();
            }
            catch (InventoryException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(distributorList);
        }
Ejemplo n.º 11
0
        //Validating & Searching Distributor by using Distributor ID as parameter
        public static Distributor SearchDistributorBL(int searchDistributorID)
        {
            Distributor searchDistributor = null;

            try
            {
                DistributorDAL distributorDAL = new DistributorDAL();
                searchDistributor = distributorDAL.SearchDistributorDAL(searchDistributorID);
            }
            catch (InventoryException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(searchDistributor);
        }
Ejemplo n.º 12
0
        //Validating & Adding Distributor
        public static bool AddDistributorBL(Distributor newdistributor)
        {
            bool distributorAdded = false;

            try
            {
                if (ValidateDistributor(newdistributor))
                {
                    DistributorDAL distributorDAL = new DistributorDAL();
                    distributorAdded = distributorDAL.AddDistributorDAL(newdistributor);
                }
            }
            catch (InventoryException)
            {
                throw;
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(distributorAdded);
        }
Ejemplo n.º 13
0
        public DistributorENT SelectByPK(SqlInt32 DistributorID)
        {
            DistributorDAL dalDistributor = new DistributorDAL();

            return(dalDistributor.SelectByPK(DistributorID));
        }
Ejemplo n.º 14
0
        public DataTable SelectAll()
        {
            DistributorDAL dalDistributor = new DistributorDAL();

            return(dalDistributor.SelectAll());
        }
        public DataTable DistributorSelectSearch(SqlInt32 DistributorID, SqlInt32 BranchID, SqlString MobileNo)
        {
            DistributorDAL dalDistributor = new DistributorDAL();

            return(dalDistributor.DistributorSelectSearch(DistributorID, BranchID, MobileNo));
        }
Ejemplo n.º 16
0
        public DataTable SelectDropDownList()
        {
            DistributorDAL dalDistributor = new DistributorDAL();

            return(dalDistributor.SelectDropDownList());
        }
        public DataTable SelectDropDownList(SqlInt32 BranchID)
        {
            DistributorDAL dalDistributor = new DistributorDAL();

            return(dalDistributor.SelectDropDownBranchToDistributorList(BranchID));
        }