Beispiel #1
0
        public int AddSalesPerson(SalesPerson salesperson)
        {
            SalesPersonData data = new SalesPersonData();
            int             ret  = 0;

            try
            {
                ret = data.AddUpdateSalesPerson(salesperson);
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "AddSalesPerson");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(ret);
        }
Beispiel #2
0
        public bool UpdateSalesPerson(SalesPerson salesperson)
        {
            SalesPersonData data = new SalesPersonData();
            bool            ret  = false;

            try
            {
                ret = data.UpdateSalesPerson(salesperson);
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "UpdateSalesPerson");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(ret);
        }
Beispiel #3
0
        public SalesPerson GetSalesPersons(int salesPersonID)
        {
            SalesPersonData data = new SalesPersonData();
            SalesPerson     sp   = new SalesPerson();

            try
            {
                sp = data.GetSalesPerson(salesPersonID);
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "GetSalesPersons");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(sp);
        }
 public bool Contains(SalesPerson salesPerson)
 {
     return(this.List.Contains(salesPerson));
 }
 public void Remove(SalesPerson salesPerson)
 {
     this.List.Remove(salesPerson);
 }
 public void Insert(int index, SalesPerson salesPerson)
 {
     this.List.Insert(index, salesPerson);
 }
 public int IndexOf(SalesPerson salesPerson)
 {
     return(this.List.IndexOf(salesPerson));
 }
 public int Add(SalesPerson salesPerson)
 {
     return(this.List.Add(salesPerson));
 }