private void frmCalendar_KeyDown(object sender, KeyEventArgs e) { try { switch (e.KeyCode) { case Keys.Escape: if (!string.IsNullOrEmpty(txtSearch.Text)) { txtSearch.Text = ""; return; } Close(); break; case Keys.Down: if (txtSearch.Focused) { DGrid.Focus(); } break; case Keys.F: if (e.Control) { txtSearch.Focus(); } break; } } catch (Exception ex) { WebErrorLog.ErrorInstence.StartErrorLog(ex); } }
public frmShowAdvisor(bool status = true) { InitializeComponent(); ucHeader.Text = "نمایش لیست مشاوران"; _st = status; DGrid.Focus(); }
public frmShowFloorCover(bool status = true) { InitializeComponent(); _st = status; SetAccess(); DGrid.Focus(); ucHeader.Text = "نمایش لیست انواع کفپوش"; }
public frmShowBuildingCondition(bool status = true) { InitializeComponent(); _st = status; SetAccess(); DGrid.Focus(); ucHeader.Text = "نمایش لیست انواع بنا"; }
public frmShowDocumentType(bool status = true) { InitializeComponent(); _st = status; SetAccess(); DGrid.Focus(); ucHeader.Text = "نمایش لیست انواع سند"; }
public frmShowBanks(bool status = true) { InitializeComponent(); ucHeader.Text = "نمایش لیست حساب های بانکی"; _st = status; DGrid.Focus(); SetAccess(); }
public frmShowBuildingAccountType(bool status = true) { InitializeComponent(); _st = status; SetAccess(); DGrid.Focus(); ucHeader.Text = "نمایش لیست کاربری ملک"; }
public frmShowBuildingView(bool status = true) { InitializeComponent(); _st = status; SetAccess(); DGrid.Focus(); ucHeader.Text = "نمایش لیست نمای املاک"; }
public frmShowBuildingOption(bool status = true) { InitializeComponent(); _st = status; SetAccess(); DGrid.Focus(); ucHeader.Text = "نمایش لیست امکانات ملک"; }
public frmShowDasteCheck(bool status = true) { InitializeComponent(); ucHeader.Text = "نمایش لیست دسته چک ها"; _st = status; DGrid.Focus(); SetAccess(); }
public frmShowRentalAuthority(bool status = true) { InitializeComponent(); _st = status; SetAccess(); DGrid.Focus(); ucHeader.Text = "نمایش لیست انواع ارجحیت اجاره"; }
public frmShowHazine(bool status = true) { InitializeComponent(); ucHeader.Text = "نمایش لیست هزینه ها"; _st = status; DGrid.Focus(); SetAccess(); }
public frmShowKitchenService(bool status = true) { InitializeComponent(); _st = status; SetAccess(); DGrid.Focus(); ucHeader.Text = "نمایش لیست انواع سرویس آشپزخانه"; }
public frmShowSandouq(bool status = true) { InitializeComponent(); ucHeader.Text = "نمایش لیست صندوق ها"; _st = status; DGrid.Focus(); SetAccess(); }
public frmShowCities(bool status = true) { InitializeComponent(); _st = status; SetAccess(); DGrid.Focus(); ucHeader.Text = "نمایش لیست شهرها"; }
public frmShowRequest(bool status = true) { InitializeComponent(); ucHeader.Text = "نمایش لیست تقاضاها"; _st = status; SetAccess(); DGrid.Focus(); SetColumns(); }
public frmShowRegions(bool status = true) { InitializeComponent(); ucHeader.Text = "نمایش لیست مناطق"; _st = status; rbtnMyRegion.Checked = true; SetAccess(); DGrid.Focus(); }
private void frmShowDesc_KeyDown(object sender, KeyEventArgs e) { try { switch (e.KeyCode) { case Keys.Insert: mnuAdd.PerformClick(); break; case Keys.F7: mnuEdit.PerformClick(); break; case Keys.Delete: mnuDelete.PerformClick(); break; case Keys.Escape: if (!string.IsNullOrEmpty(txtSearch.Text)) { txtSearch.Text = ""; return; } Close(); break; case Keys.Down: if (txtSearch.Focused) { DGrid.Focus(); } break; case Keys.F: if (e.Control) { txtSearch.Focus(); } break; case Keys.Enter: if (DGrid.RowCount <= 0 || DGrid.CurrentRow == null) { return; } Description = DGrid[dgDesc.Index, DGrid.CurrentRow.Index].Value.ToString(); DialogResult = DialogResult.OK; Close(); break; } } catch (Exception ex) { WebErrorLog.ErrorInstence.StartErrorLog(ex); } }
private void frmShowPardakht_KeyDown(object sender, KeyEventArgs e) { try { switch (e.KeyCode) { case Keys.Insert: mnuAdd.PerformClick(); break; case Keys.F7: mnuEdit.PerformClick(); break; case Keys.Delete: mnuDelete.PerformClick(); break; case Keys.F12: mnuView.PerformClick(); break; case Keys.Escape: if (!string.IsNullOrEmpty(txtSearch.Text)) { txtSearch.Text = ""; return; } Close(); break; case Keys.Down: if (txtSearch.Focused) { DGrid.Focus(); } break; case Keys.F: if (e.Control) { txtSearch.Focus(); } break; case Keys.Enter: mnuEdit.PerformClick(); break; } } catch (Exception ex) { WebErrorLog.ErrorInstence.StartErrorLog(ex); } }
private void mnuDelete_Click(object sender, EventArgs e) { var res = new ReturnedSaveFuncInfo(); try { if (DGrid.RowCount <= 0 || DGrid.CurrentRow == null) { return; } if (DGrid[DGType.Index, DGrid.CurrentRow.Index].Value.ToString() == "چک") { var str = (ReceptionCheckBussines)GetRowInfo(DGrid.CurrentRow.Index); if (str.CheckStatus != EnCheckM.Mojoud) { res.AddError("جهت ابطال چک از صفحه چکها استفاده نمایید ."); return; } } if (MessageBox.Show("مایل به حذف سطر جاری هستید ؟", "هشدار", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2, MessageBoxOptions.RightAlign) == DialogResult.No) { return; } DGrid.Rows.RemoveAt(DGrid.CurrentRow.Index); DGrid.Focus(); } catch (Exception ex) { WebErrorLog.ErrorInstence.StartErrorLog(ex); res.AddReturnedValue(ex); } finally { if (res.HasError) { this.ShowError(res, "خطا در حذف ریز دریافت"); } else { FetchData(); SetLables(); } } }
private void frmShowCheckM_KeyDown(object sender, KeyEventArgs e) { try { switch (e.KeyCode) { case Keys.Escape: if (!string.IsNullOrEmpty(txtSearch.Text)) { txtSearch.Text = ""; return; } Close(); break; case Keys.Down: if (txtSearch.Focused) { DGrid.Focus(); } break; case Keys.F: if (e.Control) { txtSearch.Focus(); } break; case Keys.Enter: if (isSelectMode) { SelectCheck(); } else { mnuEdit.PerformClick(); } break; } } catch (Exception ex) { WebErrorLog.ErrorInstence.StartErrorLog(ex); } }
private void mnuDelete_Click(object sender, EventArgs e) { var res = new ReturnedSaveFuncInfo(); try { if (DGrid.RowCount <= 0 || DGrid.CurrentRow == null) { return; } if (MessageBox.Show("مایل به حذف سطر جاری هستید ؟", "هشدار", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2, MessageBoxOptions.RightAlign) == DialogResult.No) { return; } DGrid.Rows.RemoveAt(DGrid.CurrentRow.Index); DGrid.Focus(); } catch (Exception ex) { WebErrorLog.ErrorInstence.StartErrorLog(ex); res.AddReturnedValue(ex); } finally { if (res.HasError) { this.ShowError(res, "خطا در حذف ریز پرداخت"); } else { FetchData(); SetLables(); } } }
public frmSelectTafsil(HesabType htype = HesabType.All) { InitializeComponent(); _type = htype; DGrid.Focus(); }
public frmSelectTafsil(bool isFromReception) { InitializeComponent(); _isFromReception = isFromReception; DGrid.Focus(); }
public frmShowDesc() { InitializeComponent(); DGrid.Focus(); }