public static Hang_SX Get_IdWithName(string value) { using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities()) { return(entities.Hang_SX.Where(prop => prop.name_HangSX.Contains(value)).FirstOrDefault()); } }
public static string Get_IdHangSX() { using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities()) { return(entities.Hang_SX.Max(prop => prop.id_HangSX).Trim()); } }
public static string Get_IdNhaCc() { using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities()) { return(entities.NhaCungCap.Max(prop => prop.id_NhaCC).Trim()); } }
public static List <Hang_SX> Get_HangSXList() { using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities()) { return(entities.Hang_SX.ToList()); } }
public static Get_DanhMucCustom_Result Get_DanhMucItem(string id) { using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities()) { return(entities.Get_DanhMucCustom(id).FirstOrDefault()); } }
public static List <DanhMuc> Search_DanhMucList(string value) { using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities()) { return(entities.DanhMuc.Where(p => p.id_DanhMuc.Contains(value) || p.name_DanhMuc.Contains(value)).ToList()); } }
public static DanhMuc Get_DanhMuc(string id) { using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities()) { return(entities.DanhMuc.Where(p => p.id_DanhMuc == id).FirstOrDefault()); } }
public static List <DanhMuc> Get_DanhMucList() { using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities()) { return(entities.DanhMuc.ToList()); } }
public static Get_TaiKhoan_Result Get_TaiKhoan(string value) { using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities()) { return(entities.Get_TaiKhoan(value).FirstOrDefault()); } }
public static List <TT_TaiKhoan> Search_TtTaiKhoanList(string value) { using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities()) { return(entities.TT_TaiKhoan.Where(p => p.user_Acc.Contains(value) || p.name_User.Contains(value)).ToList()); } }
public static string Get_IdDanhMuc() { using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities()) { return(entities.DanhMuc.Max(prop => prop.id_DanhMuc).Trim()); } }
public static List <NhaCungCap> Search_NhaCcList(string value) { using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities()) { return(entities.NhaCungCap.Where(p => p.id_NhaCC.Contains(value) || p.name_NhaCC.Contains(value)).ToList()); } }
public static string Get_IdBaoHanh() { using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities()) { return(entities.Bao_Hanh.Max(prop => prop.id_BaoHanh).Trim()); } }
public static List <Bao_Hanh> Search_BaoHanhList(string value) { using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities()) { return(entities.Bao_Hanh.Where(p => p.id_BaoHanh.Contains(value) || p.lim_BaoHanh.ToString().Contains(value)).ToList()); } }
public static Loai_SP Get_IdWithName(string value) { using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities()) { return(entities.Loai_SP.Where(prop => prop.name_LoaiSP.Contains(value)).FirstOrDefault()); } }
public static List <Bao_Hanh> Get_BaoHanhList() { using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities()) { return(entities.Bao_Hanh.ToList()); } }
public static List <Loai_TK> Search_LoaiTkList(string value) { using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities()) { return(entities.Loai_TK.Where(p => p.id_LoaiTK.Contains(value) || p.name_LoaiTK.Contains(value)).ToList()); } }
public static string Get_IdLoaiTk() { using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities()) { return(entities.Loai_TK.Max(prop => prop.id_LoaiTK).Trim()); } }
public static List <TT_TaiKhoan> Get_TtTaiKhoanList() { using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities()) { return(entities.TT_TaiKhoan.ToList()); } }
public static List <Loai_TK> Get_LoaiTkList() { using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities()) { return(entities.Loai_TK.ToList()); } }
public static List <Hang_SX> Search_HangSXList(string value) { using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities()) { return(entities.Hang_SX.Where(p => p.id_HangSX.Contains(value) || p.name_HangSX.Contains(value)).ToList()); } }
public static List <NhaCungCap> Get_NhaCcList() { using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities()) { return(entities.NhaCungCap.ToList()); } }
public static bool Add_NhaCc(NhaCungCap obj) { using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities()) { entities.NhaCungCap.Add(obj); entities.SaveChanges(); return(true); } }
public static bool Delete_LoaiTK(string id) { using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities()) { entities.Loai_TK.Remove(entities.Loai_TK.Where(p => p.id_LoaiTK == id).FirstOrDefault()); entities.SaveChanges(); return(true); } }
public static bool Add_LoaiTK(Loai_TK obj) { using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities()) { entities.Loai_TK.Add(obj); entities.SaveChanges(); return(true); } }
public static bool Delete_NhaCc(string id) { using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities()) { entities.NhaCungCap.Remove(entities.NhaCungCap.Where(p => p.id_NhaCC == id).FirstOrDefault()); entities.SaveChanges(); return(true); } }
//public static Bao_Hanh Get_IdWithName(string value) //{ // string[] arr = value.Split('-'); // int km = int.Parse(arr[0]); // int time = int.Parse(arr[1]); // using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities()) // { // return entities.Bao_Hanh.Where(prop => prop.km_BaoHanh == km && prop.time_BaoHanh == time).FirstOrDefault(); // } //} public static bool Add_BaoHanh(Bao_Hanh obj) { using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities()) { entities.Bao_Hanh.Add(obj); entities.SaveChanges(); return(true); } }
public static bool Add_DanhMuc(DanhMuc obj) { using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities()) { entities.DanhMuc.Add(obj); entities.SaveChanges(); } return(true); }
public static bool Delete_BaoHanh(string id) { using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities()) { entities.Bao_Hanh.Remove(entities.Bao_Hanh.Where(p => p.id_BaoHanh == id).FirstOrDefault()); entities.SaveChanges(); return(true); } }
public static bool Add_HangSX(Hang_SX obj) { using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities()) { entities.Hang_SX.Add(obj); entities.SaveChanges(); return(true); } }