コード例 #1
0
 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());
     }
 }
コード例 #2
0
 public static string Get_IdHangSX()
 {
     using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities())
     {
         return(entities.Hang_SX.Max(prop => prop.id_HangSX).Trim());
     }
 }
コード例 #3
0
 public static string Get_IdNhaCc()
 {
     using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities())
     {
         return(entities.NhaCungCap.Max(prop => prop.id_NhaCC).Trim());
     }
 }
コード例 #4
0
 public static List <Hang_SX> Get_HangSXList()
 {
     using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities())
     {
         return(entities.Hang_SX.ToList());
     }
 }
コード例 #5
0
 public static Get_DanhMucCustom_Result Get_DanhMucItem(string id)
 {
     using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities())
     {
         return(entities.Get_DanhMucCustom(id).FirstOrDefault());
     }
 }
コード例 #6
0
 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());
     }
 }
コード例 #7
0
 public static DanhMuc Get_DanhMuc(string id)
 {
     using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities())
     {
         return(entities.DanhMuc.Where(p => p.id_DanhMuc == id).FirstOrDefault());
     }
 }
コード例 #8
0
 public static List <DanhMuc> Get_DanhMucList()
 {
     using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities())
     {
         return(entities.DanhMuc.ToList());
     }
 }
コード例 #9
0
 public static Get_TaiKhoan_Result Get_TaiKhoan(string value)
 {
     using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities())
     {
         return(entities.Get_TaiKhoan(value).FirstOrDefault());
     }
 }
コード例 #10
0
 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());
     }
 }
コード例 #11
0
 public static string Get_IdDanhMuc()
 {
     using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities())
     {
         return(entities.DanhMuc.Max(prop => prop.id_DanhMuc).Trim());
     }
 }
コード例 #12
0
 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());
     }
 }
コード例 #13
0
 public static string Get_IdBaoHanh()
 {
     using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities())
     {
         return(entities.Bao_Hanh.Max(prop => prop.id_BaoHanh).Trim());
     }
 }
コード例 #14
0
 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());
     }
 }
コード例 #15
0
 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());
     }
 }
コード例 #16
0
 public static List <Bao_Hanh> Get_BaoHanhList()
 {
     using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities())
     {
         return(entities.Bao_Hanh.ToList());
     }
 }
コード例 #17
0
 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());
     }
 }
コード例 #18
0
 public static string Get_IdLoaiTk()
 {
     using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities())
     {
         return(entities.Loai_TK.Max(prop => prop.id_LoaiTK).Trim());
     }
 }
コード例 #19
0
 public static List <TT_TaiKhoan> Get_TtTaiKhoanList()
 {
     using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities())
     {
         return(entities.TT_TaiKhoan.ToList());
     }
 }
コード例 #20
0
 public static List <Loai_TK> Get_LoaiTkList()
 {
     using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities())
     {
         return(entities.Loai_TK.ToList());
     }
 }
コード例 #21
0
 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());
     }
 }
コード例 #22
0
 public static List <NhaCungCap> Get_NhaCcList()
 {
     using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities())
     {
         return(entities.NhaCungCap.ToList());
     }
 }
コード例 #23
0
 public static bool Add_NhaCc(NhaCungCap obj)
 {
     using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities())
     {
         entities.NhaCungCap.Add(obj);
         entities.SaveChanges();
         return(true);
     }
 }
コード例 #24
0
 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);
     }
 }
コード例 #25
0
 public static bool Add_LoaiTK(Loai_TK obj)
 {
     using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities())
     {
         entities.Loai_TK.Add(obj);
         entities.SaveChanges();
         return(true);
     }
 }
コード例 #26
0
 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);
     }
 }
コード例 #27
0
        //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);
            }
        }
コード例 #28
0
 public static bool Add_DanhMuc(DanhMuc obj)
 {
     using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities())
     {
         entities.DanhMuc.Add(obj);
         entities.SaveChanges();
     }
     return(true);
 }
コード例 #29
0
 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);
     }
 }
コード例 #30
0
 public static bool Add_HangSX(Hang_SX obj)
 {
     using (ThanhHa_MotorCycleEntities entities = new ThanhHa_MotorCycleEntities())
     {
         entities.Hang_SX.Add(obj);
         entities.SaveChanges();
         return(true);
     }
 }