public void Insert(string MaDiachinh, string TenDiachinh, string MaCha, short?SttHthi, byte?LoaiDiachinh, string MotaThem)
        {
            DmucDiachinh item = new DmucDiachinh();

            item.MaDiachinh = MaDiachinh;

            item.TenDiachinh = TenDiachinh;

            item.MaCha = MaCha;

            item.SttHthi = SttHthi;

            item.LoaiDiachinh = LoaiDiachinh;

            item.MotaThem = MotaThem;


            item.Save(UserName);
        }
        public void Update(string MaDiachinh, string TenDiachinh, string MaCha, short?SttHthi, byte?LoaiDiachinh, string MotaThem)
        {
            DmucDiachinh item = new DmucDiachinh();

            item.MarkOld();
            item.IsLoaded = true;

            item.MaDiachinh = MaDiachinh;

            item.TenDiachinh = TenDiachinh;

            item.MaCha = MaCha;

            item.SttHthi = SttHthi;

            item.LoaiDiachinh = LoaiDiachinh;

            item.MotaThem = MotaThem;

            item.Save(UserName);
        }
 public bool Destroy(object MaDiachinh)
 {
     return(DmucDiachinh.Destroy(MaDiachinh) == 1);
 }
 public bool Delete(object MaDiachinh)
 {
     return(DmucDiachinh.Delete(MaDiachinh) == 1);
 }