示例#1
0
 public override void SaveModel()
 {
     if (this.Validation())
     {
         DIC_HUYEN     huyen = (DIC_HUYEN)this.GetModel();
         SqlResultType flag;
         if (this.actions == Common.Common.Class.Actions.AddNew)
         {
             flag = new DistrictProvider().Insert(huyen);
         }
         else
         {
             flag = new DistrictProvider().Update(huyen);
         }
         SaveCompleteEventArgs args = new SaveCompleteEventArgs();
         args.Result  = flag == SqlResultType.OK;
         args.Model   = huyen;
         args.Message = "Không lưu được thông tin huyện";
         this.SaveCompleteSuccess(huyen, args);
     }
     else
     {
         XtraMessageBox.Show("Thông tin chưa hợp lệ kiểm tra lại thông tin.");
     }
 }
示例#2
0
 public override void SaveModel()
 {
     if (this.Validation())
     {
         DIC_DTBN      doituongbenhnhan = (DIC_DTBN)this.GetModel();
         SqlResultType flag;
         if (this.actions == Common.Common.Class.Actions.AddNew)
         {
             flag = new PatientObjectProvider().Insert(doituongbenhnhan);
         }
         else
         {
             flag = new PatientObjectProvider().Update(doituongbenhnhan);
         }
         SaveCompleteEventArgs args = new SaveCompleteEventArgs();
         args.Result  = flag == SqlResultType.OK;
         args.Model   = doituongbenhnhan;
         args.Message = "Không lưu được thông tin đối tượng bệnh nhân";
         this.SaveCompleteSuccess(doituongbenhnhan, args);
     }
     else
     {
         XtraMessageBox.Show("Thông tin chưa hợp lệ kiểm tra lại thông tin.");
     }
 }
示例#3
0
 public override void SaveModel()
 {
     if (this.Validation())
     {
         DIC_XAPHUONG  xa = (DIC_XAPHUONG)this.GetModel();
         SqlResultType flag;
         if (this.actions == Common.Common.Class.Actions.AddNew)
         {
             flag = new RuralCommuneProvider().Insert(xa);
         }
         else
         {
             flag = new RuralCommuneProvider().Update(xa);
         }
         SaveCompleteEventArgs args = new SaveCompleteEventArgs();
         args.Result  = flag == SqlResultType.OK;
         args.Model   = xa;
         args.Message = "Không lưu được thông tin xã phường";
         this.SaveCompleteSuccess(xa, args);
     }
     else
     {
         XtraMessageBox.Show("Thông tin chưa hợp lệ kiểm tra lại thông tin.");
     }
 }
示例#4
0
 public override void SaveModel()
 {
     if (this.Validation())
     {
         DIC_BENHVIEN  benhvien = (DIC_BENHVIEN)this.GetModel();
         SqlResultType flag;
         if (this.actions == Common.Common.Class.Actions.AddNew)
         {
             flag = new HospitalProvider().Insert(benhvien);
         }
         else
         {
             flag = new HospitalProvider().Update(benhvien);
         }
         SaveCompleteEventArgs args = new SaveCompleteEventArgs();
         args.Result = flag == SqlResultType.OK;
         args.Action = this.actions;
         args.Model  = benhvien;
         this.SaveCompleteSuccess(benhvien, args);
     }
     else
     {
         XtraMessageBox.Show("Thông tin chưa hợp lệ kiểm tra lại thông tin.");
     }
 }
示例#5
0
 public override void SaveModel()
 {
     if (this.Validation())
     {
         ChuyenKhoa    chuyenKhoa = (ChuyenKhoa)this.GetModel();
         SqlResultType flag;
         if (this.actions == Common.Common.Class.Actions.AddNew)
         {
             flag = new SpecialtyProvider().Insert(chuyenKhoa);
         }
         else
         {
             flag = new SpecialtyProvider().Update(chuyenKhoa);
         }
         SaveCompleteEventArgs args = new SaveCompleteEventArgs();
         args.Result  = flag == SqlResultType.OK;
         args.Model   = chuyenKhoa;
         args.Message = "Không lưu được thông tin chuyên khoa";
         this.SaveCompleteSuccess(chuyenKhoa, args);
     }
     else
     {
         XtraMessageBox.Show("Thông tin chưa hợp lệ kiểm tra lại thông tin.");
     }
 }
 public override void SaveModel()
 {
     if (this.Validation())
     {
         DIC_TINH      tinhthanh = (DIC_TINH)this.GetModel();
         SqlResultType flag;
         if (this.actions == Common.Common.Class.Actions.AddNew)
         {
             flag = new ProvinceProvider().Insert(tinhthanh);
         }
         else
         {
             flag = new ProvinceProvider().Update(tinhthanh);
         }
         SaveCompleteEventArgs args = new SaveCompleteEventArgs();
         args.Result  = flag == SqlResultType.OK;
         args.Model   = tinhthanh;
         args.Message = "Không lưu được thông tin tỉnh thành";
         this.SaveCompleteSuccess(tinhthanh, args);
     }
     else
     {
         XtraMessageBox.Show("Thông tin chưa hợp lệ kiểm tra lại thông tin.");
     }
 }
示例#7
0
 public override void SaveModel()
 {
     if (this.Validation())
     {
         DanToc        danToc = (DanToc)this.GetModel();
         SqlResultType flag;
         if (this.actions == Common.Common.Class.Actions.AddNew)
         {
             flag = new EthnicProvider().Insert(danToc);
         }
         else
         {
             flag = new EthnicProvider().Update(danToc);
         }
         SaveCompleteEventArgs args = new SaveCompleteEventArgs();
         args.Result  = flag == SqlResultType.OK;
         args.Model   = danToc;
         args.Message = "Không lưu được thông tin dân tộc";
         this.SaveCompleteSuccess(danToc, args);
     }
     else
     {
         XtraMessageBox.Show("Thông tin chưa hợp lệ kiểm tra lại thông tin.");
     }
 }
示例#8
0
    protected void SaveComplete(object sender, SaveCompleteEventArgs e)
    {
        // Check the SaveType to determine action to perform
        switch (e.SaveType)
        {
        // Save the file to disk when saving or downloading
        case SaveType.Save:
        case SaveType.Download:

            break;

        // Ignore all other save types
        default:

            break;
        }
    }