public void AddNewSupplier(SuppliersView model, string userId)
        {
            using (var supplier = new SuppliersRepository())
            {
                var supp = new Suppliers
                {
                    SupplierId = model.SupplierId,
                    EmailAddress = model.EmailAddress,
                    PhysicalAddress = model.PhysicalAddress,
                    Status = "Waiting For Approval",
                    SupplierCellNo = model.SupplierCellNo,
                    SupplierLastName = model.SupplierLastName,
                    SupplierName = model.SupplierName,
                    SupplierTelNo = model.SupplierTelNo,
                    UserId = userId,
                    ShortCode = ""
                };
                supplier.Insert(supp);

                //update
                supp.ShortCode = (Guid.NewGuid().ToString().Substring(0, 4) + "-" + supp.SupplierId + "-"
                                  + model.SupplierName.Substring(0, 1) + model.SupplierLastName.Substring(0, 1)).ToUpper();
                supplier.Update(supp);

            }
        }
 public void Update(Suppliers model)
 {
     _suppliersRepository.Update(model);
 }
 public void Insert(Suppliers model)
 {
     _suppliersRepository.Insert(model);
 }
 public void Delete(Suppliers model)
 {
     _suppliersRepository.Delete(model);
 }