public bool Delete_TypeProduct(long TypePro_ID) { try { TypeProduct temp = db.TypeProducts.Find(TypePro_ID); db.TypeProducts.Remove(temp); db.SaveChanges(); return(true); } catch { return(false); } }
public bool Delete_Permission(long Per_ID) { try { Permission temp = db.Permissions.Find(Per_ID); db.Permissions.Remove(temp); db.SaveChanges(); return(true); } catch { return(false); } }
public bool Delete_TypeMaterial(long TypeMal_ID) { try { TypeMaterial temp = db.TypeMaterials.Find(TypeMal_ID); db.TypeMaterials.Remove(temp); db.SaveChanges(); return(true); } catch { return(false); } }
public bool Delete_Employee(long Emp_ID) { try { Employee temp = db.Employees.Find(Emp_ID); db.Employees.Remove(temp); db.SaveChanges(); return(true); } catch { return(false); } }
public bool Change_Pass(string user_name, string new_pass) { try { Account item = db.Accounts.Where(x => x.UserName == user_name).SingleOrDefault(); item.PassWord = new_pass; db.SaveChanges(); return(true); } catch { return(false); } }