void LayLichsuTamung() { try { objLuotkham = Utility.getKcbLuotkhamFromGrid(grdList); m_dtTamung = new KCB_THAMKHAM().NoitruTimkiemlichsuNoptientamung(Utility.sDbnull(grdList.GetValue(KcbLuotkham.Columns.MaLuotkham)), Utility.Int32Dbnull(grdList.GetValue(KcbLuotkham.Columns.IdBenhnhan)), 0, -1, (byte)1 ); Utility.SetDataSourceForDataGridEx_Basic(grdTamung, m_dtTamung, false, true, "1=1", NoitruTamung.Columns.NgayTamung + " desc"); grdTamung.MoveFirst(); if (grdTamung.GetDataRows().Length <= 0) { objTamung = null; dtpNgaythu.Value = globalVariables.SysDate; txtSotien.Text = "0"; txtLydo.SetCode("-1"); txtNguoithu.SetId(globalVariables.gv_intIDNhanvien); } } catch (Exception ex) { } finally { setTongtienStatus(); ShowLSuTamung(); } }
void LayLichsuTamung() { try { m_dtTamung = new KCB_THAMKHAM().NoitruTimkiemlichsuNoptientamung(objLuotkham.MaLuotkham, Utility.Int32Dbnull(objLuotkham.IdBenhnhan, 0), 0, -1, (byte)(objLuotkham.TrangthaiNoitru > 0 ?1:0));//objLuotkham.TrangthaiNoitru > 0 ? Utility.Int32Dbnull(objLuotkham.IdKhoanoitru, 0) : -1,(byte)(objLuotkham.TrangthaiNoitru > 0 ?1:0)); Utility.SetDataSourceForDataGridEx_Basic(grdTamung, m_dtTamung, false, true, "1=1", NoitruTamung.Columns.NgayTamung + " desc"); grdTamung.MoveFirst(); if (grdTamung.GetDataRows().Length <= 0) { objTamung = null; dtpNgaythu.Value = globalVariables.SysDate; txtSotien.Text = "0"; txtLydo.SetCode("-1"); txtNguoithu.SetId(globalVariables.gv_intIDNhanvien); } } catch (Exception ex) { } finally { AllowedChanged = true; setTongtienStatus(); ShowLSuTamung(); } }
public static bool NoptienTamung(NoitruTamung objTamung) { try { using (var scope = new TransactionScope()) { using (var sh = new SharedDbConnectionScope()) { objTamung.Save(); KcbLuotkham objKcbLuotkham = Utility.getKcbLuotkham(objTamung.IdBenhnhan, objTamung.MaLuotkham); if (objKcbLuotkham != null) { objKcbLuotkham.IsNew = false; objKcbLuotkham.MarkOld(); if (Utility.ByteDbnull(objKcbLuotkham.TrangthaiNoitru, 0) == 1) { objKcbLuotkham.TrangthaiNoitru = 2; objKcbLuotkham.Save(); } } } scope.Complete(); } return true; } catch (Exception ex) { return false; } }
public static bool NoptienTamung(NoitruTamung objTamung) { try { using (var scope = new TransactionScope()) { using (var sh = new SharedDbConnectionScope()) { objTamung.Save(); KcbLuotkham objKcbLuotkham = Utility.getKcbLuotkham(objTamung.IdBenhnhan, objTamung.MaLuotkham); if (objKcbLuotkham != null) { objKcbLuotkham.IsNew = false; objKcbLuotkham.MarkOld(); if (Utility.ByteDbnull(objKcbLuotkham.TrangthaiNoitru, 0) == 1) { objKcbLuotkham.TrangthaiNoitru = 2; objKcbLuotkham.Save(); } } } scope.Complete(); } return(true); } catch (Exception ex) { return(false); } }
void FillData() { try { if (!Utility.isValidGrid(grdTamung)) { objTamung = null; dtpNgaythu.Value = globalVariables.SysDate; txtSotien.Text = "0"; txtLydo.SetCode("-1"); txtNguoithu.SetCode("-1"); } else { objTamung = NoitruTamung.FetchByID(Utility.Int32Dbnull(grdTamung.GetValue(NoitruTamung.Columns.Id))); if (objTamung == null) { dtpNgaythu.Value = globalVariables.SysDate; txtSotien.Text = "0"; txtLydo.SetCode("-1"); txtNguoithu.SetCode("-1"); } else { objTamung.IsNew = false; objTamung.MarkOld(); dtpNgaythu.Value = objTamung.NgayTamung.Value; txtSotien.Text = objTamung.SoTien.ToString(); txtLydo._Text = objTamung.MotaThem; txtNguoithu.SetId(objTamung.IdTnv); } } } catch (Exception ex) { } finally { ModifyCommand(); //SetControlStatus(); } }
public static bool XoaTienTamung(NoitruTamung objTamung, bool VanConTamung, string lydohuy) { try { using (var scope = new TransactionScope()) { using (var sh = new SharedDbConnectionScope()) { KcbLoghuy objHuy = new KcbLoghuy(); objHuy.IdBenhnhan = objTamung.IdBenhnhan; objHuy.MaLuotkham = objTamung.MaLuotkham; objHuy.LoaiphieuHuy = 2;//0= hủy thanh toán;1= hủy phiếu chi;2= hủy tạm ứng objHuy.LydoHuy = lydohuy; objHuy.SotienHuy = Utility.DecimaltoDbnull(objTamung.SoTien, 0); objHuy.IdNhanvien = globalVariables.gv_intIDNhanvien; objHuy.NgayHuy = globalVariables.SysDate; objHuy.NguoiTao = globalVariables.UserName; objHuy.NgayTao = globalVariables.SysDate; objHuy.IsNew = true; objHuy.Save(); new Delete().From(NoitruTamung.Schema).Where(NoitruTamung.Columns.Id).IsEqualTo(objTamung.Id).Execute(); NoitruPhieudieutri objNoitruPhieudieutri = Utility.getNoitruPhieudieutri(objTamung.IdBenhnhan, objTamung.MaLuotkham); KcbLuotkham objKcbLuotkham = Utility.getKcbLuotkham(objTamung.IdBenhnhan, objTamung.MaLuotkham); if (Utility.Byte2Bool(objKcbLuotkham.TrangthaiNoitru) && objNoitruPhieudieutri == null && !VanConTamung)//Chỉ update nếu là nội trú { objKcbLuotkham.IsNew = false; objKcbLuotkham.TrangthaiNoitru = 1; objKcbLuotkham.MarkOld(); objKcbLuotkham.Save(); } } scope.Complete(); } return(true); } catch (Exception ex) { return(false); } }
private void SetControlStatus() { try { grdTamung.Enabled = false; AllowedChanged = false; switch (m_enAct) { case action.Insert: //Cho phép nhập liệu mã loại đối tượng,vị trí, tên loại đối tượng và mô tả thêm Utility.DisabledTextBox(txtID); dtpNgaythu.Enabled = true; txtSotien.Enabled = true; txtLydo.Enabled = true; txtNguoithu.Enabled = true; objTamung = null; dtpNgaythu.Value = globalVariables.SysDate; txtSotien.Text = "0"; txtLydo.SetCode("-1"); txtNguoithu.SetCode("-1"); //-------------------------------------------------------------- //Thiết lập trạng thái các nút Insert, Update, Delete... //Không cho phép nhấn Insert, Update,Delete cmdthemmoi.Enabled = false; cmdSua.Enabled = false; cmdxoa.Enabled = false; cmdGhi.Enabled = true; cmdHuy.Enabled = true; cmdGhi.BringToFront(); cmdHuy.BringToFront(); //-------------------------------------------------------------- //Không cho phép chọn trên lưới dữ liệu được fill vào các Control AllowedChanged = false; //Tự động Focus đến mục ID để người dùng nhập liệu txtID.Text = "Tự sinh"; cmdHuy.Text = "Hủy"; txtSotien.Focus(); break; case action.Update: //Không cho phép cập nhật lại mã loại đối tượng Utility.DisabledTextBox(txtID); //Cho phép cập nhật lại vị trí, tên loại đối tượng và mô tả thêm dtpNgaythu.Enabled = true; txtLydo.Enabled = true; txtNguoithu.Enabled = true; txtSotien.Enabled = true; //-------------------------------------------------------------- //Thiết lập trạng thái các nút Insert, Update, Delete... //Không cho phép nhấn Insert, Update,Delete cmdthemmoi.Enabled = false; cmdSua.Enabled = false; cmdxoa.Enabled = false; cmdGhi.Enabled = true; cmdHuy.Enabled = true; cmdGhi.BringToFront(); cmdHuy.BringToFront(); cmdHuy.Text = "Hủy"; //-------------------------------------------------------------- //Không cho phép chọn trên lưới dữ liệu được fill vào các Control AllowedChanged = false; //Tự động Focus đến mục Position để người dùng nhập liệu txtSotien.Focus(); break; case action.FirstOrFinished: //Hủy hoặc trạng thái ban đầu khi mới hiển thị Form AllowedChanged_maskedEdit = false; grdTamung.Enabled = true; AllowedChanged = true; //Không cho phép nhập liệu mã loại đối tượng, tên loại đối tượng và mô tả thêm Utility.DisabledTextBox(txtID); dtpNgaythu.Enabled = false; txtLydo.Enabled = false; txtNguoithu.Enabled = false; txtSotien.Enabled = false; //-------------------------------------------------------------- //Thiết lập trạng thái các nút Insert, Update, Delete... //Sau khi nhấn Ghi thành công hoặc Hủy thao tác thì quay về trạng thái ban đầu //Cho phép thêm mới cmdGhi.Enabled = false; cmdHuy.Enabled = false; cmdGhi.SendToBack(); cmdHuy.SendToBack(); //Nút Hủy biến thành nút thoát cmdHuy.Text = "Thoát"; //-------------------------------------------------------------- //Cho phép chọn trên lưới dữ liệu được fill vào các Control AllowedChanged = true; //Tự động chọn dòng hiện tại trên lưới để hiển thị lại trên Control grdTamung_SelectionChanged(grdTamung, new EventArgs()); //Tự động Focus đến nút thêm mới? cmdthemmoi.Focus(); break; default: break; } } catch (Exception ex) { } finally { grdTamung.Enabled = true; setTongtienStatus(); } }
void cmdGhi_Click(object sender, EventArgs e) { if (!isValidData()) { return; } try { if (m_enAct == action.Insert) { objTamung = new NoitruTamung(); objTamung.IdBenhnhan = objLuotkham.IdBenhnhan; objTamung.MaLuotkham = objLuotkham.MaLuotkham; objTamung.IdKhoanoitru = objLuotkham.IdKhoanoitru; objTamung.IdBuonggiuong = objLuotkham.IdRavien; objTamung.IdBuong = objLuotkham.IdBuong; objTamung.IdGiuong = objLuotkham.IdGiuong; objTamung.Noitru = (byte)(objLuotkham.TrangthaiNoitru <= 0 ? 0 : 1); objTamung.KieuTamung = 0; objTamung.MotaThem = txtLydo.Text; objTamung.IdTnv = Utility.Int32Dbnull(txtNguoithu.MyID, -1); objTamung.SoTien = Utility.DecimaltoDbnull(txtSotien.Text); objTamung.NgayTamung = dtpNgaythu.Value; objTamung.TrangThai = 0; objTamung.IsNew = true; if (noitru_TamungHoanung.NoptienTamung(objTamung)) { DataRow newDr = m_dtTamung.NewRow(); Utility.FromObjectToDatarow(objTamung, ref newDr); newDr["sngay_tamung"] = dtpNgaythu.Value.ToString("dd/MM/yyyy"); newDr["ten_khoanoitru"] = ""; newDr["ten_nhanvien"] = txtNguoithu.Text; m_dtTamung.Rows.Add(newDr); m_dtTamung.AcceptChanges(); Utility.GotoNewRowJanus(grdTamung, NoitruTamung.Columns.Id, objTamung.Id.ToString()); if (chkSaveAndPrint.Checked) { cmdIn_Click(cmdIn, e); } m_enAct = action.FirstOrFinished; } } else { objTamung.SoTien = Utility.DecimaltoDbnull(txtSotien.Text); objTamung.NgayTamung = dtpNgaythu.Value; objTamung.MotaThem = txtLydo.Text; objTamung.IdTnv = Utility.Int32Dbnull(txtNguoithu.MyID, -1); objTamung.IsNew = false; objTamung.MarkOld(); if (noitru_TamungHoanung.NoptienTamung(objTamung)) { DataRow _myDr = ((DataRowView)grdTamung.CurrentRow.DataRow).Row; _myDr[NoitruTamung.Columns.SoTien] = Utility.DecimaltoDbnull(txtSotien.Text); _myDr[NoitruTamung.Columns.NgayTamung] = dtpNgaythu.Value; _myDr[NoitruTamung.Columns.MotaThem] = txtLydo.Text; _myDr[NoitruTamung.Columns.IdTnv] = Utility.Int32Dbnull(txtNguoithu.MyID, -1); _myDr["sngay_tamung"] = dtpNgaythu.Value.ToString("dd/MM/yyyy"); _myDr["ten_khoanoitru"] = ""; _myDr["ten_nhanvien"] = txtNguoithu.Text; m_dtTamung.AcceptChanges(); m_enAct = action.FirstOrFinished; } } setTongtienStatus(); SetControlStatus(); if (_OnChangedData != null) { _OnChangedData(); } } catch (Exception ex) { } finally { } }
public void Insert(long IdBenhnhan,string MaLuotkham,decimal? SoTien,byte TrangThai,DateTime? NgayTamung,byte? KieuTamung,string MotaThem,int? IdTnv,string NguoiSua,DateTime? NgaySua,string NguoiTao,DateTime? NgayTao,short? IdKhoanoitru,int? IdBuonggiuong,int? IdBuong,int? IdGiuong) { NoitruTamung item = new NoitruTamung(); item.IdBenhnhan = IdBenhnhan; item.MaLuotkham = MaLuotkham; item.SoTien = SoTien; item.TrangThai = TrangThai; item.NgayTamung = NgayTamung; item.KieuTamung = KieuTamung; item.MotaThem = MotaThem; item.IdTnv = IdTnv; item.NguoiSua = NguoiSua; item.NgaySua = NgaySua; item.NguoiTao = NguoiTao; item.NgayTao = NgayTao; item.IdKhoanoitru = IdKhoanoitru; item.IdBuonggiuong = IdBuonggiuong; item.IdBuong = IdBuong; item.IdGiuong = IdGiuong; item.Save(UserName); }
public static bool XoaTienTamung(NoitruTamung objTamung,bool VanConTamung,string lydohuy) { try { using (var scope = new TransactionScope()) { using (var sh = new SharedDbConnectionScope()) { KcbLoghuy objHuy = new KcbLoghuy(); objHuy.IdBenhnhan = objTamung.IdBenhnhan; objHuy.MaLuotkham = objTamung.MaLuotkham; objHuy.LoaiphieuHuy = 2;//0= hủy thanh toán;1= hủy phiếu chi;2= hủy tạm ứng objHuy.LydoHuy = lydohuy; objHuy.SotienHuy =Utility.DecimaltoDbnull( objTamung.SoTien,0); objHuy.IdNhanvien = globalVariables.gv_intIDNhanvien; objHuy.NgayHuy=globalVariables.SysDate; objHuy.NguoiTao=globalVariables.UserName; objHuy.NgayTao=globalVariables.SysDate; objHuy.IsNew=true; objHuy.Save(); new Delete().From(NoitruTamung.Schema).Where(NoitruTamung.Columns.Id).IsEqualTo(objTamung.Id).Execute(); NoitruPhieudieutri objNoitruPhieudieutri = Utility.getNoitruPhieudieutri(objTamung.IdBenhnhan, objTamung.MaLuotkham); KcbLuotkham objKcbLuotkham = Utility.getKcbLuotkham(objTamung.IdBenhnhan, objTamung.MaLuotkham); if (Utility.Byte2Bool(objKcbLuotkham.TrangthaiNoitru) && objNoitruPhieudieutri == null && !VanConTamung)//Chỉ update nếu là nội trú { objKcbLuotkham.IsNew = false; objKcbLuotkham.TrangthaiNoitru = 1; objKcbLuotkham.MarkOld(); objKcbLuotkham.Save(); } } scope.Complete(); } return true; } catch (Exception ex) { return false; } }
private void SetControlStatus() { try { grdTamung.Enabled = false; AllowedChanged = false; switch (m_enAct) { case action.Insert: //Cho phép nhập liệu mã loại đối tượng,vị trí, tên loại đối tượng và mô tả thêm Utility.DisabledTextBox(txtID); dtpNgaythu.Enabled = true; txtSotien.Enabled = true; txtLydo.Enabled = true; txtNguoithu.Enabled = true; objTamung = null; dtpNgaythu.Value = globalVariables.SysDate; txtSotien.Text = "0"; txtLydo.SetCode("-1"); txtNguoithu.SetCode("-1"); //-------------------------------------------------------------- //Thiết lập trạng thái các nút Insert, Update, Delete... //Không cho phép nhấn Insert, Update,Delete cmdthemmoi.Enabled = false; cmdSua.Enabled = false; cmdxoa.Enabled = false; cmdGhi.Enabled = true; cmdHuy.Enabled = true; cmdGhi.BringToFront(); cmdHuy.BringToFront(); //-------------------------------------------------------------- //Không cho phép chọn trên lưới dữ liệu được fill vào các Control AllowedChanged = false; //Tự động Focus đến mục ID để người dùng nhập liệu txtID.Text = "Tự sinh"; cmdHuy.Text = "Hủy"; txtSotien.Focus(); break; case action.Update: //Không cho phép cập nhật lại mã loại đối tượng Utility.DisabledTextBox(txtID); //Cho phép cập nhật lại vị trí, tên loại đối tượng và mô tả thêm dtpNgaythu.Enabled = true; txtLydo.Enabled = true; txtNguoithu.Enabled = true; txtSotien.Enabled = true; //-------------------------------------------------------------- //Thiết lập trạng thái các nút Insert, Update, Delete... //Không cho phép nhấn Insert, Update,Delete cmdthemmoi.Enabled = false; cmdSua.Enabled = false; cmdxoa.Enabled = false; cmdGhi.Enabled = true; cmdHuy.Enabled = true; cmdGhi.BringToFront(); cmdHuy.BringToFront(); cmdHuy.Text = "Hủy"; //-------------------------------------------------------------- //Không cho phép chọn trên lưới dữ liệu được fill vào các Control AllowedChanged = false; //Tự động Focus đến mục Position để người dùng nhập liệu txtSotien.Focus(); break; case action.FirstOrFinished://Hủy hoặc trạng thái ban đầu khi mới hiển thị Form AllowedChanged_maskedEdit = false; grdTamung.Enabled = true; AllowedChanged = true; //Không cho phép nhập liệu mã loại đối tượng, tên loại đối tượng và mô tả thêm Utility.DisabledTextBox(txtID); dtpNgaythu.Enabled = false; txtLydo.Enabled = false; txtNguoithu.Enabled = false; txtSotien.Enabled = false; //-------------------------------------------------------------- //Thiết lập trạng thái các nút Insert, Update, Delete... //Sau khi nhấn Ghi thành công hoặc Hủy thao tác thì quay về trạng thái ban đầu //Cho phép thêm mới cmdGhi.Enabled = false; cmdHuy.Enabled = false; cmdGhi.SendToBack(); cmdHuy.SendToBack(); //Nút Hủy biến thành nút thoát cmdHuy.Text = "Thoát"; //-------------------------------------------------------------- //Cho phép chọn trên lưới dữ liệu được fill vào các Control AllowedChanged = true; //Tự động chọn dòng hiện tại trên lưới để hiển thị lại trên Control grdTamung_SelectionChanged(grdTamung, new EventArgs()); //Tự động Focus đến nút thêm mới? cmdthemmoi.Focus(); break; default: break; } } catch (Exception ex) { } finally { grdTamung.Enabled = true; setTongtienStatus(); } }
void LayLichsuTamung() { try { m_dtTamung = new KCB_THAMKHAM().NoitruTimkiemlichsuNoptientamung(objLuotkham.MaLuotkham, Utility.Int32Dbnull( objLuotkham.IdBenhnhan,0), 0,Utility.Int32Dbnull(objLuotkham.IdKhoanoitru,0)); Utility.SetDataSourceForDataGridEx_Basic(grdTamung, m_dtTamung, false, true, "1=1", NoitruTamung.Columns.NgayTamung + " desc"); grdTamung.MoveFirst(); if (grdTamung.GetDataRows().Length <= 0) { objTamung = null; dtpNgaythu.Value = globalVariables.SysDate; txtSotien.Text = "0"; txtLydo.SetCode("-1"); txtNguoithu.SetId(globalVariables.gv_intIDNhanvien); } } catch (Exception ex) { } finally { setTongtienStatus(); ShowLSuTamung(); } }
void cmdGhi_Click(object sender, EventArgs e) { if (!isValidData()) return; try { if (m_enAct == action.Insert) { objTamung = new NoitruTamung(); objTamung.IdBenhnhan = objLuotkham.IdBenhnhan; objTamung.MaLuotkham =objLuotkham.MaLuotkham; objTamung.IdKhoanoitru =objLuotkham.IdKhoanoitru; objTamung.IdBuonggiuong = objLuotkham.IdRavien; objTamung.IdBuong = objLuotkham.IdBuong; objTamung.IdGiuong =objLuotkham.IdGiuong; objTamung.KieuTamung = 0; objTamung.MotaThem = txtLydo.Text; objTamung.IdTnv = Utility.Int32Dbnull(txtNguoithu.MyID, -1); objTamung.SoTien = Utility.DecimaltoDbnull(txtSotien.Text); objTamung.NgayTamung = dtpNgaythu.Value; objTamung.TrangThai = 0; objTamung.IsNew = true; if (noitru_TamungHoanung.NoptienTamung(objTamung)) { DataRow newDr = m_dtTamung.NewRow(); Utility.FromObjectToDatarow(objTamung, ref newDr); newDr["sngay_tamung"] = dtpNgaythu.Value.ToString("dd/MM/yyyy"); newDr["ten_khoanoitru"] = ""; newDr["ten_nhanvien"] = txtNguoithu.Text; m_dtTamung.Rows.Add(newDr); m_dtTamung.AcceptChanges(); Utility.GotoNewRowJanus(grdTamung, NoitruTamung.Columns.Id, objTamung.Id.ToString()); if (chkSaveAndPrint.Checked) cmdIn_Click(cmdIn, e); m_enAct = action.FirstOrFinished; } } else { objTamung.SoTien = Utility.DecimaltoDbnull(txtSotien.Text); objTamung.NgayTamung = dtpNgaythu.Value; objTamung.MotaThem = txtLydo.Text; objTamung.IdTnv = Utility.Int32Dbnull(txtNguoithu.MyID, -1); objTamung.IsNew = false; objTamung.MarkOld(); if (noitru_TamungHoanung.NoptienTamung(objTamung)) { DataRow _myDr = ((DataRowView)grdTamung.CurrentRow.DataRow).Row; _myDr[NoitruTamung.Columns.SoTien] = Utility.DecimaltoDbnull(txtSotien.Text); _myDr[NoitruTamung.Columns.NgayTamung] = dtpNgaythu.Value; _myDr[NoitruTamung.Columns.MotaThem] = txtLydo.Text; _myDr[NoitruTamung.Columns.IdTnv] = Utility.Int32Dbnull(txtNguoithu.MyID, -1); _myDr["sngay_tamung"] = dtpNgaythu.Value.ToString("dd/MM/yyyy"); _myDr["ten_khoanoitru"] = ""; _myDr["ten_nhanvien"] = txtNguoithu.Text; m_dtTamung.AcceptChanges(); m_enAct = action.FirstOrFinished; } } setTongtienStatus(); SetControlStatus(); if (_OnChangedData != null) _OnChangedData(); } catch (Exception ex) { } finally { } }
public void Update(long Id,long IdBenhnhan,string MaLuotkham,decimal? SoTien,byte TrangThai,DateTime? NgayTamung,byte? KieuTamung,string MotaThem,int? IdTnv,string NguoiSua,DateTime? NgaySua,string NguoiTao,DateTime? NgayTao,short? IdKhoanoitru,int? IdBuonggiuong,int? IdBuong,int? IdGiuong,int? IdThanhtoan,decimal? PtramTung,DateTime? NgayThanhtoan,byte? TrangthaiChuyen,string LydoHuy) { NoitruTamung item = new NoitruTamung(); item.MarkOld(); item.IsLoaded = true; item.Id = Id; item.IdBenhnhan = IdBenhnhan; item.MaLuotkham = MaLuotkham; item.SoTien = SoTien; item.TrangThai = TrangThai; item.NgayTamung = NgayTamung; item.KieuTamung = KieuTamung; item.MotaThem = MotaThem; item.IdTnv = IdTnv; item.NguoiSua = NguoiSua; item.NgaySua = NgaySua; item.NguoiTao = NguoiTao; item.NgayTao = NgayTao; item.IdKhoanoitru = IdKhoanoitru; item.IdBuonggiuong = IdBuonggiuong; item.IdBuong = IdBuong; item.IdGiuong = IdGiuong; item.IdThanhtoan = IdThanhtoan; item.PtramTung = PtramTung; item.NgayThanhtoan = NgayThanhtoan; item.TrangthaiChuyen = TrangthaiChuyen; item.LydoHuy = LydoHuy; item.Save(UserName); }