public void AproveAllPendingVendors()
 {
     using (var p2 = new BTv7DbContext())
     {
         int e = p2.Database.ExecuteSqlCommand("UPDATE Logins SET AccessStatusID = '1', RegistrationStatusID = '2' WHERE RegistrationStatusID = '1' AND UserDesignationID = '6';");
     }
 }
 public void AproveUser(int id)
 {
     using (var p2 = new BTv7DbContext())
     {
         int e = p2.Database.ExecuteSqlCommand("UPDATE Logins SET AccessStatusID = '1', RegistrationStatusID = '2' WHERE ID = " + id + ";");
     }
 }
 public void UpdatePassword(Login log)
 {
     using (var login = new BTv7DbContext())
     {
         int noOfLoginRowAffected = login.Database.ExecuteSqlCommand("UPDATE Logins SET Password = '******' WHERE ID = " + log.ID + ";");
     }
 }
 public void EnableLogin(Login log)
 {
     using (var login2 = new BTv7DbContext())
     {
         int e = login2.Database.ExecuteSqlCommand("UPDATE Logins SET AccessStatusID = '" + log.AccessStatusID + "' WHERE ID = " + log.ID + ";");
     }
 }
 public void UpdateNoticeDetails(Notice n)
 {
     using (var notice = new BTv7DbContext())
     {
         int noOfNoticeRowAffected = notice.Database.ExecuteSqlCommand("UPDATE Notices SET Subject = '" + n.Subject + "', Description = '" + n.Description + "', EmployeeID = '" + n.EmployeeID + "', PostDate = '" + n.PostDate + "' WHERE ID = " + n.ID + ";");
     }
 }
 public void UpdateEmployeeLoginDetails(Login log)
 {
     using (var login = new BTv7DbContext())
     {
         int noOfLoginRowAffected = login.Database.ExecuteSqlCommand("UPDATE Logins SET Email = '" + log.Email + "', Mobile = '" + log.Mobile + "', UserDesignationID = '" + log.UserDesignationID + "' WHERE ID = " + log.ID + ";");
     }
 }
 public void UpdateProductDetails(Product product)
 {
     using (var pro = new BTv7DbContext())
     {
         pro.Database.ExecuteSqlCommand("UPDATE Products SET Name = '" + product.Name + "' , Quantity= '" + product.Quantity + "' , BuyPrice= '" + product.BuyPrice + "' , SellPrice= '" + product.SellPrice + "' , ProductTypeID= '" + product.ProductTypeID + "' WHERE ID = " + product.ID + ";");
     }
 }
 public void ProductStatusUpdate(Product product)
 {
     using (var pro = new BTv7DbContext())
     {
         pro.Database.ExecuteSqlCommand("UPDATE Products SET ProductStatusID = '" + product.ProductStatusID + "' WHERE ID = " + product.ID + ";");
     }
 }
 public void AproveProduct(int id)
 {
     using (var p2 = new BTv7DbContext())
     {
         int e = p2.Database.ExecuteSqlCommand("UPDATE Products SET ProductStatusID = '1' WHERE ProductStatusID = '3' AND ID = '" + id + "';");
     }
 }
 public void RejectProduct(int id)
 {
     using (var p2 = new BTv7DbContext())
     {
         int noOfRowDeleted = p2.Database.ExecuteSqlCommand("DELETE FROM Products WHERE ID = '" + id + "';");
     }
 }
 public void EnableProduct(int id)
 {
     using (var p2 = new BTv7DbContext())
     {
         int e = p2.Database.ExecuteSqlCommand("UPDATE Products SET ProductStatusID = '1' WHERE VendorID = " + id + ";");
     }
 }
 public void UpdateCustomerDetails(Customer customer)
 {
     using (var customerr = new BTv7DbContext())
     {
         customerr.Database.ExecuteSqlCommand("UPDATE Customers SET Name = '" + customer.Name + "' WHERE ID = " + customer.ID + ";");
     }
 }
Пример #13
0
 public void UpdateEmployeeDetails(Employee emp)
 {
     using (var employee = new BTv7DbContext())
     {
         int noOfEmployeeRowAffected = employee.Database.ExecuteSqlCommand("UPDATE Employees SET Name = '" + emp.Name + "', Salary = '" + emp.Salary + "' WHERE ID = " + emp.ID + ";");
     }
 }
Пример #14
0
 public void UpdateVendorDetails(Vendor vendor)
 {
     using (var vendorr = new BTv7DbContext())
     {
         vendorr.Database.ExecuteSqlCommand("UPDATE Vendors SET Name = '" + vendor.Name + "' WHERE ID = " + vendor.ID + ";");
     }
 }
Пример #15
0
        //Approve Order

        //Cancel Order
        public void UpdateOrderStatusCancel(Order order)
        {
            using (var pro = new BTv7DbContext())
            {
                pro.Database.ExecuteSqlCommand("UPDATE Orders SET OrderStatusID='" + order.OrderStatusID + "' WHERE ID = " + order.ID + ";");
            }
        }