Esempio n. 1
0
        private void btnXoa_Click(object sender, System.EventArgs e)
        {
            DialogResult dg = BaseMessages.ShowQuestionMessage("Bạn có chắc chắn muốn xóa?");

            if (dg == DialogResult.Yes)
            {
                try
                {
                    clsPhieuXuat_ChiTiet cls0 = new clsPhieuXuat_ChiTiet();
                    cls0.ID_PhieuXuat = int.Parse(fgQDX[fgQDX.Row, "ID_PhieuXuat"].ToString());
                    cls0.DeleteWID_PhieuXuatLogic();
                    clsPhieuXuat_ChiTiet_TheKho cls1 = new clsPhieuXuat_ChiTiet_TheKho();
                    cls1.ID_PhieuXuat = int.Parse(fgQDX[fgQDX.Row, "ID_PhieuXuat"].ToString());
                    cls1.DeleteWID_PhieuXuatLogic();
                    clsQD_XuatVatTu cls = new clsQD_XuatVatTu();
                    cls.ID_PhieuXuat = int.Parse(fgQDX[fgQDX.Row, "ID_PhieuXuat"].ToString());
                    cls.Delete();
                    BaseMessages.ShowInformationMessage("Xóa thành công.");
                    Loadfg();
                }
                catch (Exception ex)
                {
                    BaseMessages.ShowErrorMessage("Lỗi" + ex.ToString());
                }
            }
        }
Esempio n. 2
0
 private void cmdChon_Click(object sender, EventArgs e)
 {
     if (fgNhanSu.Row < fgNhanSu.Rows.Fixed)
     {
         return;
     }
     if (BaseMessages.ShowQuestionMessage("Chọn nhân sự này ?") == DialogResult.No)
     {
         return;
     }
     sHoTen     = fgNhanSu.GetDataDisplay(fgNhanSu.Row, "Hoten");
     iID_NhanSu = fgNhanSu.GetIntValue(fgNhanSu.Row, "ID_NhanSu");
     //sTen_ChucVu = fgNhanSu.GetDataDisplay(fgNhanSu.Row, "Ten_ChucVu");
     //siID_ChucVu = (Int16)fgNhanSu.GetIntValue(fgNhanSu.Row, "ID_ChucVu");
     //sTen_DonVi = fgNhanSu.GetDataDisplay(fgNhanSu.Row, "Ten_DonVi");
     //sTen_BoPhan = fgNhanSu.GetDataDisplay(fgNhanSu.Row, "Ten_BoPhan");
     //sTen_LoaiHopDong = fgNhanSu.GetDataDisplay(fgNhanSu.Row, "Ten_LoaiHopDong");
     //iID_DonVi = fgNhanSu.GetIntValue(fgNhanSu.Row, "ID_DonVi");
     //iID_BoPhan = fgNhanSu.GetIntValue(fgNhanSu.Row, "ID_BoPhan");
     sMaNS    = fgNhanSu.GetDataDisplay(fgNhanSu.Row, "MaNS");
     bIs_Save = true;
     this.Close();
 }