예제 #1
0
        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);
            }
        }
예제 #2
0
 public frmShowAdvisor(bool status = true)
 {
     InitializeComponent();
     ucHeader.Text = "نمایش لیست مشاوران";
     _st           = status;
     DGrid.Focus();
 }
예제 #3
0
 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 = "نمایش لیست انواع بنا";
 }
예제 #5
0
 public frmShowDocumentType(bool status = true)
 {
     InitializeComponent();
     _st = status;
     SetAccess();
     DGrid.Focus();
     ucHeader.Text = "نمایش لیست انواع سند";
 }
예제 #6
0
 public frmShowBanks(bool status = true)
 {
     InitializeComponent();
     ucHeader.Text = "نمایش لیست حساب های بانکی";
     _st           = status;
     DGrid.Focus();
     SetAccess();
 }
예제 #7
0
 public frmShowBuildingAccountType(bool status = true)
 {
     InitializeComponent();
     _st = status;
     SetAccess();
     DGrid.Focus();
     ucHeader.Text = "نمایش لیست کاربری ملک";
 }
예제 #8
0
 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 = "نمایش لیست امکانات ملک";
 }
예제 #10
0
 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 = "نمایش لیست انواع ارجحیت اجاره";
 }
예제 #12
0
 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 = "نمایش لیست انواع سرویس آشپزخانه";
 }
예제 #14
0
 public frmShowSandouq(bool status = true)
 {
     InitializeComponent();
     ucHeader.Text = "نمایش لیست صندوق ها";
     _st           = status;
     DGrid.Focus();
     SetAccess();
 }
예제 #15
0
 public frmShowCities(bool status = true)
 {
     InitializeComponent();
     _st = status;
     SetAccess();
     DGrid.Focus();
     ucHeader.Text = "نمایش لیست شهرها";
 }
예제 #16
0
 public frmShowRequest(bool status = true)
 {
     InitializeComponent();
     ucHeader.Text = "نمایش لیست تقاضاها";
     _st           = status;
     SetAccess();
     DGrid.Focus();
     SetColumns();
 }
예제 #17
0
 public frmShowRegions(bool status = true)
 {
     InitializeComponent();
     ucHeader.Text        = "نمایش لیست مناطق";
     _st                  = status;
     rbtnMyRegion.Checked = true;
     SetAccess();
     DGrid.Focus();
 }
예제 #18
0
        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);
            }
        }
예제 #19
0
        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);
            }
        }
예제 #20
0
        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();
                }
            }
        }
예제 #21
0
        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);
            }
        }
예제 #22
0
        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();
                }
            }
        }
예제 #23
0
 public frmSelectTafsil(HesabType htype = HesabType.All)
 {
     InitializeComponent();
     _type = htype;
     DGrid.Focus();
 }
예제 #24
0
 public frmSelectTafsil(bool isFromReception)
 {
     InitializeComponent();
     _isFromReception = isFromReception;
     DGrid.Focus();
 }
예제 #25
0
 public frmShowDesc()
 {
     InitializeComponent();
     DGrid.Focus();
 }