Ejemplo n.º 1
0
        private async void mnuViewSanad_Click(object sender, EventArgs e)
        {
            try
            {
                if (DGrid.RowCount <= 0 || DGrid.CurrentRow == null)
                {
                    return;
                }
                var guid     = (Guid)DGrid[dgGuid.Index, DGrid.CurrentRow.Index].Value;
                var avalDore = (bool)DGrid[dgAvalDore.Index, DGrid.CurrentRow.Index].Value;
                if (!avalDore)
                {
                    var str = await ReceptionCheckBussines.GetAsync(guid);

                    var rec = await ReceptionBussines.GetAsync(str.MasterGuid.Value);

                    var sanad = await SanadBussines.GetAsync(rec.SanadNumber);

                    var frm_ = new frmSanadMain(sanad.Guid, true);
                    frm_.ShowDialog(this);
                    return;
                }

                var frm = new frmCheckM_AvalDore(guid, true);
                frm.ShowDialog(this);
            }
            catch (Exception ex)
            {
                WebErrorLog.ErrorInstence.StartErrorLog(ex);
            }
        }
Ejemplo n.º 2
0
        private async void mnuEdit_Click(object sender, EventArgs e)
        {
            try
            {
                if (DGrid.RowCount <= 0 || DGrid.CurrentRow == null)
                {
                    return;
                }
                var avalDore = (bool)DGrid[dgAvalDore.Index, DGrid.CurrentRow.Index].Value;
                if (!avalDore)
                {
                    frmNotification.PublicInfo.ShowMessage("جهت ویرایش چک طی دوره، لطفا از سند دریافت اقدام نمایید");
                    return;
                }

                var guid = (Guid)DGrid[dgGuid.Index, DGrid.CurrentRow.Index].Value;

                var frm = new frmCheckM_AvalDore(guid, false);
                if (frm.ShowDialog(this) == DialogResult.OK)
                {
                    await LoadDataAsync(txtSearch.Text);
                }
            }
            catch (Exception ex)
            {
                WebErrorLog.ErrorInstence.StartErrorLog(ex);
            }
        }
Ejemplo n.º 3
0
        private void mnuView_Click(object sender, EventArgs e)
        {
            try
            {
                if (DGrid.RowCount <= 0 || DGrid.CurrentRow == null)
                {
                    return;
                }
                var guid     = (Guid)DGrid[dgGuid.Index, DGrid.CurrentRow.Index].Value;
                var avalDore = (bool)DGrid[dgAvalDore.Index, DGrid.CurrentRow.Index].Value;
                if (!avalDore)
                {
                    var frm_ = new frmReceptionCheck(guid);
                    frm_.ShowDialog(this);
                    return;
                }

                var frm = new frmCheckM_AvalDore(guid, true);
                frm.ShowDialog(this);
            }
            catch (Exception ex)
            {
                WebErrorLog.ErrorInstence.StartErrorLog(ex);
            }
        }
Ejemplo n.º 4
0
 private async void mnuInsAvalDore_Click(object sender, EventArgs e)
 {
     try
     {
         var frm = new frmCheckM_AvalDore();
         if (frm.ShowDialog(this) == DialogResult.OK)
         {
             await LoadDataAsync();
         }
     }
     catch (Exception ex)
     {
         WebErrorLog.ErrorInstence.StartErrorLog(ex);
     }
 }