Ejemplo n.º 1
0
        private void btnControl_btnEventSave_Click(object sender, EventArgs e)
        {
            if (_validateControl())
            {
                WaitDialogForm _wait = new WaitDialogForm("Đang lưu dữ liệu ...", "Vui lòng đợi giây lát");
                using (var _context = new QL_HOIVIEN_KTEntities())
                {
                    switch (_formStatus)
                    {
                    case EnumFormStatus.MODIFY:
                        if (hoivien == null)
                        {
                            hoivien = new QL_HOIVIEN();
                        }
                        if (hoivien_image == null)
                        {
                            hoivien_image = new QL_HOIVIEN_IMAGE();
                        }
                        _setObjectEntities(ref hoivien, ref hoivien_image);
                        break;

                    default:
                        break;
                    }
                }
                FormStatus = EnumFormStatus.VIEW;
                _wait.Close();
                _closeForm();
            }
        }
Ejemplo n.º 2
0
        private void btnControl_btnEventSave_Click(object sender, EventArgs e)
        {
            Boolean _dangSD = false;

            for (int i = 0; i < gvGrid.RowCount; i++)
            {
                if (clsChangeType.change_bool(gvGrid.GetRowCellValue(i, colDANGSUDUNG)))
                {
                    string strKhoaDuLieu = string.Empty;
                    clsParameter._dotMaDauThau  = gvGrid.GetRowCellValue(i, colDOT_MA) + string.Empty;
                    clsParameter._dotKhoaDuLieu = clsChangeType.change_bool(gvGrid.GetRowCellValue(i, colKHOA));
                    clsParameter._dotNgayMoThau = Convert.ToDateTime(gvGrid.GetRowCellValue(i, colMO_NGAY));

                    if (clsParameter._dotKhoaDuLieu)
                    {
                        strKhoaDuLieu = ", đang khóa dữ liệu";
                    }

                    clsParameter._barStaticLogin.Caption = string.Format("Xin chào, {0}.Bạn đang thao tác đợt đấu thầu : mã {1}, mở ngày {2:dd/MM/yyyy}{3}", clsParameter._username, clsParameter._dotMaDauThau, clsParameter._dotNgayMoThau, strKhoaDuLieu);
                    _dangSD = true;
                    break;
                }
            }

            if (!_dangSD)
            {
                clsMessage.MessageWarning("Vui lòng chọn đợt đấu thầu đang sử dụng");
                return;
            }

            Save();
            SelectData();
            this.FormStatus = EnumFormStatus.VIEW;
        }
Ejemplo n.º 3
0
 private void btnControl_btnEventAdd_Click(object sender, EventArgs e)
 {
     if (lueGoiThau_KT.EditValue == null)
     {
         clsMessage.MessageWarning("Vui lòng chọn gói thầu");
         FormStatus = EnumFormStatus.VIEW;
         return;
     }
     FormStatus = EnumFormStatus.ADD;
 }
        private void btnControl_btnEventAdd_Click(object sender, EventArgs e)
        {
            if (clsParameter._dotMaDauThau == string.Empty)
            {
                clsMessage.MessageInfo("Vui lòng chọn đợt đấu thầu cần thao tác");
                FormStatus = EnumFormStatus.VIEW;
                return;
            }

            FormStatus = EnumFormStatus.ADD;
        }
Ejemplo n.º 5
0
 private void btnControl_btnEventAdd_Click(object sender, EventArgs e)
 {
     if (lueGoiThau.EditValue == null)
     {
         clsMessage.MessageInfo("Vui lòng chọn gói thầu.");
         FormStatus = EnumFormStatus.VIEW;
         return;
     }
     chkAll.Checked = false;
     FormStatus     = EnumFormStatus.ADD;
 }
        private void btnControl_btnEventDelete_Click(object sender, EventArgs e)
        {
            if (gvGrid.FocusedRowHandle == GridControl.AutoFilterRowHandle)
            {
                XtraMessageBox.Show("Bạn chưa chọn dòng để xóa!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Question);
                return;
            }

            string Ten = gvGrid.GetRowCellValue(gvGrid.FocusedRowHandle, colSystemConfig_Id.FieldName).ToString();

            if (XtraMessageBox.Show("Bạn có chắc muốn xóa dòng đang chọn ?", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
            {
                FormStatus = EnumFormStatus.DELETE;
                Save();
                SelectData();
            }
        }
 private void btnControl_btnEventSave_Click(object sender, EventArgs e)
 {
     for (int i = 0; i < dsDanhGiaHoSoDuThau1.ChiTietHoSo.Rows.Count; i++)
     {
         if (clsChangeType.change_bool(dsDanhGiaHoSoDuThau1.ChiTietHoSo.Rows[i]["TT_BTC"]))
         {
             if ((dsDanhGiaHoSoDuThau1.ChiTietHoSo.Rows[i]["TT_GHICHU"] + string.Empty) == string.Empty)
             {
                 clsMessage.MessageWarning("Vui lòng cập nhật ghi chú khi chọn trúng thầu.");
                 return;
             }
         }
     }
     Save();
     SelectData();
     this.FormStatus = EnumFormStatus.VIEW;
 }
        private void btnControl_btnEventSave_Click(object sender, EventArgs e)
        {
            if (ValidateData())
            {
                return;
            }

            if (!KiemTraCtyMa())
            {
                clsMessage.MessageWarning("Nhập mã công ty (CTYAAAABBB) không đúng định dạng.\nAAAA: năm; BBB: số thứ thự công ty.");
                return;
            }

            if (Save())
            {
                this.FormStatus = EnumFormStatus.VIEW;
            }
        }
Ejemplo n.º 9
0
        private void btnControl_btnEventDelete_Click(object sender, EventArgs e)
        {
            FormStatus = EnumFormStatus.DELETE;
            //if (gvGrid.FocusedRowHandle == GridControl.AutoFilterRowHandle)
            //{
            //    XtraMessageBox.Show("Bạn chưa chọn dòng để xóa!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Question);
            //    return;
            //}

            //if (FunctionHelper.DataUsed("DM_GOITHAU", Convert.ToInt32(gvGrid.GetFocusedRowCellValue(colGOITHAU_ID)))) return;

            //string Ten = gvGrid.GetRowCellValue(gvGrid.FocusedRowHandle, colTEN.FieldName).ToString();
            //if (XtraMessageBox.Show("Bạn có chắc muốn xóa đơn vị tính: \"" + Ten + "\"  không ?", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
            //{
            //    gvGrid.DeleteSelectedRows();
            //    Save();
            //    SelectData();
            //}
        }
 private void btnControl_btnEventModify_Click(object sender, EventArgs e)
 {
     FormStatus = EnumFormStatus.MODIFY;
 }
Ejemplo n.º 11
0
 private void btnSearch_Click(object sender, EventArgs e)
 {
     _loadData();
     FormStatus = EnumFormStatus.VIEW;
 }
Ejemplo n.º 12
0
 protected void btnControl_btnEventPrint_Click(object sender, EventArgs e)
 {
     FormStatus = EnumFormStatus.PRINT;
 }
Ejemplo n.º 13
0
 protected void btnControl_btnEventCancel_Click(object sender, EventArgs e)
 {
     FormStatus = EnumFormStatus.CANCEL;
 }
Ejemplo n.º 14
0
 protected void btnControl_btnEventDelete_Click(object sender, EventArgs e)
 {
     FormStatus = EnumFormStatus.DELETE;
 }
Ejemplo n.º 15
0
 private void btnControl_btnEventCancel_Click(object sender, EventArgs e)
 {
     this.FormStatus = EnumFormStatus.VIEW;
 }
Ejemplo n.º 16
0
 protected void btnControl_btnEventReport_Click(object sender, EventArgs e)
 {
     FormStatus = EnumFormStatus.REPORT;
 }
Ejemplo n.º 17
0
 private void btnControl_btnEventCancel_Click(object sender, EventArgs e)
 {
     SelectData(chkAll.Checked);
     this.FormStatus = EnumFormStatus.VIEW;
 }
Ejemplo n.º 18
0
 protected void btnControl_btnEventClose_Click(object sender, EventArgs e)
 {
     FormStatus = EnumFormStatus.CLOSE;
 }
 private void btnControl_btnEventAdd_Click(object sender, EventArgs e)
 {
     FormStatus = EnumFormStatus.ADD;
 }
Ejemplo n.º 20
0
 private void btnControl_btnEventView_Click(object sender, EventArgs e)
 {
     FormStatus = EnumFormStatus.VIEW;
 }
 private void btnControl_btnEventSave_Click(object sender, EventArgs e)
 {
     Save();
     SelectData();
     this.FormStatus = EnumFormStatus.VIEW;
 }
 private void ucTinhNangKyThuat_Load(object sender, EventArgs e)
 {
     CommandData();
     FormStatus = EnumFormStatus.VIEW;
 }