Beispiel #1
0
 private void btnCancel_Click(object sender, EventArgs e)
 {
     SelectAll(ref m_DataSource, grdData);
     PageBase.StateButton(false, btnNew, btnEdit, btnSave, btnCancel, btnDelete);
     PageBase.VisibleColumnInGrid(grvData, false);
     grvData.OptionsView.NewItemRowPosition = DevExpress.XtraGrid.Views.Grid.NewItemRowPosition.None;
 }
Beispiel #2
0
 private void frmBaoLoi_Load(object sender, EventArgs e)
 {
     //LoadData();
     SelectAll(ref m_DataSource, grdData);
     PageBase.StateButton(false, btnNew, btnEdit, btnSave, btnCancel, btnDelete);
     PageBase.VisibleColumnInGrid(grvData, false);
 }
Beispiel #3
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     try
     {
         Save(ref m_DataSource);
         if (kt == false)
         {
             return;
         }
         else
         {
         }
         {
             grvData.OptionsView.NewItemRowPosition = DevExpress.XtraGrid.Views.Grid.NewItemRowPosition.None;
             PageBase.StateButton(false, btnNew, btnEdit, btnSave, btnCancel, btnDelete);
             PageBase.VisibleColumnInGrid(grvData, false);
             Global_Add.sFormStatus = Global_Add.FormStatus.View;
             SelectAll(ref m_DataSource, grdData);
         }
         HienThi();
         bandedGridView1.FocusedRowHandle = -1; bandedGridView1.FocusedRowHandle = 0;
     }
     catch (Exception)
     {
         throw;
     }
 }
Beispiel #4
0
 private void btnNew_Click(object sender, EventArgs e)
 {
     grvData.OptionsView.NewItemRowPosition = DevExpress.XtraGrid.Views.Grid.NewItemRowPosition.Top;
     PageBase.StateButton(true, btnNew, btnEdit, btnSave, btnCancel, btnDelete);
     PageBase.VisibleColumnInGrid(grvData, true);
     Global_Add.sFormStatus = Global_Add.FormStatus.Addnew;
 }
Beispiel #5
0
 private void btnCancel_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     SelectAll(ref m_DataSource, grdData);
     PageBase.StateButton(false, btnNew, btnSua, btnGhi, btnHuy, btnXoa);
     PageBase.VisibleColumnInGrid(grvData, false);
     grvData.OptionsView.NewItemRowPosition = DevExpress.XtraGrid.Views.Grid.NewItemRowPosition.None;
 }
Beispiel #6
0
 private void btnAddNew_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     grvData.OptionsView.NewItemRowPosition = DevExpress.XtraGrid.Views.Grid.NewItemRowPosition.Top;
     PageBase.StateButton(true, btnNew, btnSua, btnGhi, btnHuy, btnXoa);
     PageBase.VisibleColumnInGrid(grvData, true);
     Global_Add.sFormStatus = Global_Add.FormStatus.Addnew;
 }
Beispiel #7
0
 private void btnNew_Click(object sender, EventArgs e)
 {
     grvData.OptionsView.NewItemRowPosition = DevExpress.XtraGrid.Views.Grid.NewItemRowPosition.Top;
     PageBase.StateButton(true, btnNew, btnEdit, btnSave, btnCancel, btnDelete);
     PageBase.VisibleColumnInGrid(grvData, true);
     Global_Add.sFormStatus = Global_Add.FormStatus.Addnew;
     colTinhTrangKhacPhuc.OptionsColumn.AllowFocus = false;
     //colNgayKhacPhucXong.OptionsColumn.AllowFocus = false;
     colNguoiKhacPhuc.OptionsColumn.AllowFocus = false;
 }
Beispiel #8
0
 private void btnNew_Click(object sender, EventArgs e)
 {
     grvData.OptionsView.NewItemRowPosition = DevExpress.XtraGrid.Views.Grid.NewItemRowPosition.Top;
     PageBase.StateButton(true, btnNew, btnSua, btnGhi, btnHuy, btnXoa);
     PageBase.VisibleColumnInGrid(grvData, true);
     Global_Add.sFormStatus   = Global_Add.FormStatus.Addnew;
     grvData.FocusedRowHandle = GridControl.NewItemRowHandle;
     grvData.FocusedColumn    = colTenCV;
     grvData.ShowEditor();
 }
Beispiel #9
0
 private void btnGhi_Click(object sender, EventArgs e)
 {
     grvData.FocusedRowHandle = -1;
     {
         grvData.OptionsView.NewItemRowPosition = DevExpress.XtraGrid.Views.Grid.NewItemRowPosition.None;
         PageBase.StateButton(false, btnNew, btnSua, btnGhi, btnHuy, btnXoa);
         PageBase.VisibleColumnInGrid(grvData, false);
         Global_Add.sFormStatus = Global_Add.FormStatus.View;
         SelectAll(ref m_DataSource, grdData);
     }
 }
Beispiel #10
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     Save(ref m_DataSource);
     {
         grvData.OptionsView.NewItemRowPosition = DevExpress.XtraGrid.Views.Grid.NewItemRowPosition.None;
         PageBase.StateButton(false, btnNew, btnEdit, btnSave, btnCancel, btnDelete);
         PageBase.VisibleColumnInGrid(grvData, false);
         Global_Add.sFormStatus = Global_Add.FormStatus.View;
         SelectAll(ref m_DataSource, grdData);
         Source = TextUtils.Select("select * from vHangMucCongViec");
     }
 }
Beispiel #11
0
        private void frmTaoDuAn_Shown(object sender, EventArgs e)
        {
            SelectAll(ref m_DataSource, grdData);
            if (_MaDuAn != "")
            {
                searchLookUpEdit1.EditValue = _MaDuAn;
            }
            KT();
            grvData.BestFitColumns();
            PageBase.StateButton(false, btnNew, btnEdit, btnSave, btnCancel, btnDelete);
            PageBase.VisibleColumnInGrid(grvData, false);

            LeNhom.DataSource    = TextUtils.Select("SELECT Name,Code,ID FROM UserGroup");
            LeNhom.DisplayMember = "Name";
            LeNhom.ValueMember   = "ID";
        }
Beispiel #12
0
        private void frmPhanBoCongViec_Load(object sender, EventArgs e)
        {
            tinhgio();
            TextUtils.SetContainsFilter(searchLookUpEdit1View);

            TextUtils.SetContainsFilter(grvData);
            Source = TextUtils.Select("select * from vHangMucCongViec");
            NhanVien();
            loadYear();
            leYear.EditValue = DateTime.Now.Year;
            leWeek.ItemIndex = WeeksInYear(DateTime.Now) - 1;

            LoadComBo();
            grvData.BestFitColumns();
            PageBase.StateButton(false, btnNew, btnEdit, btnSave, btnCancel, btnDelete);
            PageBase.VisibleColumnInGrid(grvData, false);
            if (_maDuAn != "")
            {
                lookUpEdit1.EditValue = _maDuAn;
            }
        }
Beispiel #13
0
        string[] TimeSet;//////=new string[]();
        #endregion

        #region Constructor
        private void frmMain_Load(object sender, EventArgs e)
        {
            try
            {
                SelectAll(ref m_DataSource, grdData);
                //grvData.BestFitColumns();
                PageBase.StateButton(false, btnNew, btnSua, btnGhi, btnHuy, btnXoa);
                PageBase.VisibleColumnInGrid(grvData, false);
                // kkk();
                //Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
                //key.SetValue("Theo dõi vật tư", @Application.StartupPath+"\\TheoDoiVatTu.exe");

                grvData.OptionsView.AllowHtmlDrawHeaders            = true;
                grvData.Appearance.HeaderPanel.TextOptions.WordWrap = DevExpress.Utils.WordWrap.Wrap;
                grvData.ColumnPanelRowHeight = 40;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Beispiel #14
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     PageBase.StateButton(true, btnNew, btnEdit, btnSave, btnCancel, btnDelete);
     PageBase.VisibleColumnInGrid(grvData, true);
     Global_Add.sFormStatus = Global_Add.FormStatus.Edit;
 }
Beispiel #15
0
 private void btnSua_Click(object sender, EventArgs e)
 {
     PageBase.StateButton(true, btnNew, btnSua, btnGhi, btnHuy, btnXoa);
     PageBase.VisibleColumnInGrid(grvData, true);
     Global_Add.sFormStatus = Global_Add.FormStatus.Edit;
 }