コード例 #1
0
 private SanadDetailBussines GenerateDet()
 {
     try
     {
         var tafsil = TafsilBussines.Get(_tafsilGuid);
         var moein  = MoeinBussines.Get(_moeinGuid);
         var res    = new SanadDetailBussines
         {
             Guid        = Guid.NewGuid(),
             Modified    = DateTime.Now,
             Description = txtRowDesc.Text,
             Debit       = txtDebit.TextDecimal,
             Credit      = txtCredit.TextDecimal,
             TafsilGuid  = (tafsil?.Guid ?? Guid.Empty),
             MoeinGuid   = (moein?.Guid ?? Guid.Empty),
             MoeinCode   = moein?.Code,
             MoeinName   = moein?.Name,
             TafsilCode  = tafsil?.Code,
             TafsilName  = tafsil?.Name
         };
         return(res);
     }
     catch (Exception ex)
     {
         WebErrorLog.ErrorInstence.StartErrorLog(ex);
         return(null);
     }
 }
コード例 #2
0
 public frmCheckM_Vagozar(ReceptionCheckAvalDoreBussines cls, HesabType hType)
 {
     InitializeComponent();
     _oldTafsil    = TafsilBussines.Get(cls.SandouqTafsilGuid);
     _isAvalDore   = true;
     _newHesabType = hType;
     recAvalDore   = cls;
 }
コード例 #3
0
 private void SetData()
 {
     try
     {
         txtSerial.Text      = cls?.SerialNumber;
         txtDesc.Text        = cls?.Description;
         txtFromNumber.Value = cls?.FromNumber ?? 0;
         txtToNumber.Value   = cls?.ToNumber ?? 0;
         txtBankName.Text    = TafsilBussines.Get(cls.BankGuid)?.Name;
     }
     catch (Exception ex)
     {
         WebErrorLog.ErrorInstence.StartErrorLog(ex);
     }
 }
コード例 #4
0
 private void btnRegion_Click(object sender, EventArgs e)
 {
     try
     {
         var frm = new frmSelectTafsil(HesabType.Bank);
         if (frm.ShowDialog(this) != DialogResult.OK)
         {
             return;
         }
         _bankGuid        = frm.SelectedGuid;
         txtBankName.Text = TafsilBussines.Get(_bankGuid)?.Name;
     }
     catch (Exception ex)
     {
         WebErrorLog.ErrorInstence.StartErrorLog(ex);
     }
 }
コード例 #5
0
 public frmTafsilMain(Guid guid, bool isShowMode, HesabType?htype = null)
 {
     InitializeComponent();
     cls                 = TafsilBussines.Get(guid);
     ucHeader.Text       = !isShowMode ? $"ویرایش حساب تفصیلی {cls.Name}" : $"مشاهده حساب تفصیلی {cls.Name}";
     ucHeader.IsModified = true;
     grp.Enabled         = !isShowMode;
     btnFinish.Enabled   = !isShowMode;
     if (htype != null)
     {
         cmbType.Enabled = false;
         this.hType      = htype.Value;
         if (hType == HesabType.Hazine || hType == HesabType.Bank)
         {
             cmbAccount.Enabled = txtAccount_.Enabled = false;
         }
     }
 }
コード例 #6
0
 private void SetTafsil()
 {
     try
     {
         var frm = new frmSelectTafsil();
         if (frm.ShowDialog(this) == DialogResult.OK)
         {
             var tafsil = TafsilBussines.Get(frm.SelectedGuid);
             if (tafsil != null)
             {
                 txtTafsilName.Text = tafsil.Name;
                 _tafsilGuid        = tafsil.Guid;
             }
         }
     }
     catch (Exception ex)
     {
         WebErrorLog.ErrorInstence.StartErrorLog(ex);
     }
 }
コード例 #7
0
 private void btnSearchTafsil2_Click(object sender, EventArgs e)
 {
     try
     {
         var frm = new frmSelectTafsil();
         if (frm.ShowDialog() == DialogResult.OK)
         {
             var tafsil = TafsilBussines.Get(frm.SelectedGuid);
             if (tafsil == null)
             {
                 return;
             }
             txtCode2.Value = tafsil.Code.ParseToDecimal();
         }
     }
     catch (Exception ex)
     {
         WebErrorLog.ErrorInstence.StartErrorLog(ex);
     }
 }
コード例 #8
0
        private void mnuView_Click(object sender, EventArgs e)
        {
            try
            {
                if (DGrid.RowCount <= 0)
                {
                    return;
                }
                if (DGrid.CurrentRow == null)
                {
                    return;
                }
                var guid   = (Guid)DGrid[dgGuid.Index, DGrid.CurrentRow.Index].Value;
                var tafsil = TafsilBussines.Get(guid);
                if (tafsil == null)
                {
                    frmNotification.PublicInfo.ShowMessage("حساب انتخاب شده معتبر نمی باشد");
                    return;
                }
                if (tafsil.HesabType == HesabType.Customer)
                {
                    var frm = new frmPeoples(guid, true);
                    frm.ShowDialog(this);
                    return;
                }
                if (tafsil.HesabType == HesabType.Bank)
                {
                    var frm = new frmBankMain(guid, true);
                    frm.ShowDialog(this);
                    return;
                }

                var _frm = new frmTafsilMain(guid, true);
                _frm.ShowDialog(this);
            }
            catch (Exception ex)
            {
                WebErrorLog.ErrorInstence.StartErrorLog(ex);
            }
        }
コード例 #9
0
 private void AddToGrid(object temp)
 {
     try
     {
         if ((temp) is PardakhtNaqdBussines)
         {
             DGrid.Rows.Add(1);
             DGrid[DGType.Index, DGrid.RowCount - 1].Value        = "نقد";
             DGrid[DGPrice.Index, DGrid.RowCount - 1].Value       = ((PardakhtNaqdBussines)temp).Price;
             DGrid[DgGuid.Index, DGrid.RowCount - 1].Value        = ((PardakhtNaqdBussines)temp).Guid;
             DGrid[DGTafsilGuid.Index, DGrid.RowCount - 1].Value  = ((PardakhtNaqdBussines)temp).SandouqTafsilGuid;
             DGrid[DGDescription.Index, DGrid.RowCount - 1].Value =
                 TafsilBussines.Get(((PardakhtNaqdBussines)temp).SandouqTafsilGuid).Name + " " +
                 ((PardakhtNaqdBussines)temp).Description;
             DGrid[DG_TempDescription.Index, DGrid.RowCount - 1].Value = ((PardakhtNaqdBussines)temp).Description;
             DGrid[DGNumber.Index, DGrid.RowCount - 1].Value           = ((PardakhtNaqdBussines)temp).Description;
         }
         else if ((temp) is PardakhtHavaleBussines)
         {
             DGrid.Rows.Add(1);
             DGrid[DGType.Index, DGrid.RowCount - 1].Value        = "حواله";
             DGrid[DGTafsilGuid.Index, DGrid.RowCount - 1].Value  = ((PardakhtHavaleBussines)temp).BankTafsilGuid;
             DGrid[DGNumber.Index, DGrid.RowCount - 1].Value      = ((PardakhtHavaleBussines)temp).Number;
             DGrid[DGPrice.Index, DGrid.RowCount - 1].Value       = ((PardakhtHavaleBussines)temp).Price;
             DGrid[DGDescription.Index, DGrid.RowCount - 1].Value =
                 "پرداخت از بانک:" + TafsilBussines.Get(((PardakhtHavaleBussines)temp).BankTafsilGuid).Name +
                 " * " +
                 " درتاریخ:" + Calendar.MiladiToShamsi(DateTime.Now) + " * " +
                 " شماره : " + ((PardakhtHavaleBussines)temp).Number;
             DGrid[DG_TempDescription.Index, DGrid.RowCount - 1].Value = ((PardakhtHavaleBussines)temp).Description;
             DGrid[DgGuid.Index, DGrid.RowCount - 1].Value             = ((PardakhtHavaleBussines)temp).Guid;
         }
         else if ((temp) is PardakhtCheckMoshtariBussines)
         {
             DGrid.Rows.Add(1);
             DGrid[DGType.Index, DGrid.RowCount - 1].Value             = "چک دریافتی";
             DGrid[DGPrice.Index, DGrid.RowCount - 1].Value            = ((PardakhtCheckMoshtariBussines)temp).Price;
             DGrid[DG_TempDescription.Index, DGrid.RowCount - 1].Value = ((PardakhtCheckMoshtariBussines)temp).Description;
             DGrid[DGDescription.Index, DGrid.RowCount - 1].Value      =
                 $"خرج چک دریافتی از مشتری * شرح: {((PardakhtCheckMoshtariBussines)temp).Description}";
             DGrid[DgGuid.Index, DGrid.RowCount - 1].Value      = ((PardakhtCheckMoshtariBussines)temp).Guid;
             DGrid[dgCheckGuid.Index, DGrid.RowCount - 1].Value = ((PardakhtCheckMoshtariBussines)temp).CheckGuid;
         }
         else if ((temp) is PardakhtCheckShakhsiBussines)
         {
             DGrid.Rows.Add(1);
             DGrid[DGType.Index, DGrid.RowCount - 1].Value             = "چک شخصی";
             DGrid[DGPrice.Index, DGrid.RowCount - 1].Value            = ((PardakhtCheckShakhsiBussines)temp).Price;
             DGrid[DG_TempDescription.Index, DGrid.RowCount - 1].Value = ((PardakhtCheckShakhsiBussines)temp).Description;
             DGrid[DGDescription.Index, DGrid.RowCount - 1].Value      =
                 $"پرداخت چک شخصی * شرح: {((PardakhtCheckShakhsiBussines)temp).Description}";
             DGrid[DgGuid.Index, DGrid.RowCount - 1].Value         = ((PardakhtCheckShakhsiBussines)temp).Guid;
             DGrid[dgCheckGuid.Index, DGrid.RowCount - 1].Value    = ((PardakhtCheckShakhsiBussines)temp).CheckPageGuid;
             DGrid[DGNumber.Index, DGrid.RowCount - 1].Value       = ((PardakhtCheckShakhsiBussines)temp).Number;
             DGrid[DGDateSarresid.Index, DGrid.RowCount - 1].Value = ((PardakhtCheckShakhsiBussines)temp).DateSarResid;
         }
         SetLables();
     }
     catch (Exception ex)
     {
         WebErrorLog.ErrorInstence.StartErrorLog(ex);
     }
 }
コード例 #10
0
 private void AddToGrid(object temp)
 {
     try
     {
         if ((temp) is ReceptionNaqdBussines)
         {
             DGrid.Rows.Add(1);
             DGrid[DGType.Index, DGrid.RowCount - 1].Value        = "نقد";
             DGrid[DGPrice.Index, DGrid.RowCount - 1].Value       = ((ReceptionNaqdBussines)temp).Price;
             DGrid[DgGuid.Index, DGrid.RowCount - 1].Value        = ((ReceptionNaqdBussines)temp).Guid;
             DGrid[DGTafsilGuid.Index, DGrid.RowCount - 1].Value  = ((ReceptionNaqdBussines)temp).SandouqTafsilGuid;
             DGrid[DGDescription.Index, DGrid.RowCount - 1].Value =
                 TafsilBussines.Get(((ReceptionNaqdBussines)temp).SandouqTafsilGuid).Name + " " +
                 ((ReceptionNaqdBussines)temp).Description;
             DGrid[DG_TempDescription.Index, DGrid.RowCount - 1].Value = ((ReceptionNaqdBussines)temp).Description;
             DGrid[DGNumber.Index, DGrid.RowCount - 1].Value           = ((ReceptionNaqdBussines)temp).Description;
             DGrid[DGDate.Index, DGrid.RowCount - 1].Value             = ((ReceptionNaqdBussines)temp).DateM;
         }
         else if ((temp) is ReceptionHavaleBussines)
         {
             DGrid.Rows.Add(1);
             DGrid[DGType.Index, DGrid.RowCount - 1].Value        = "حواله";
             DGrid[DGTafsilGuid.Index, DGrid.RowCount - 1].Value  = ((ReceptionHavaleBussines)temp).BankTafsilGuid;
             DGrid[DGDate.Index, DGrid.RowCount - 1].Value        = ((ReceptionHavaleBussines)temp).DateM;
             DGrid[DGNumber.Index, DGrid.RowCount - 1].Value      = ((ReceptionHavaleBussines)temp).PeygiriNumber;
             DGrid[DGPrice.Index, DGrid.RowCount - 1].Value       = ((ReceptionHavaleBussines)temp).Price;
             DGrid[DGDescription.Index, DGrid.RowCount - 1].Value =
                 "واریز به بانک:" + TafsilBussines.Get(((ReceptionHavaleBussines)temp).BankTafsilGuid).Name +
                 " * " +
                 " درتاریخ:" + Calendar.MiladiToShamsi(((ReceptionHavaleBussines)temp).DateM) + " * " +
                 " شماره : " + ((ReceptionHavaleBussines)temp).PeygiriNumber;
             DGrid[DG_TempDescription.Index, DGrid.RowCount - 1].Value = ((ReceptionHavaleBussines)temp).Description;
             DGrid[DgGuid.Index, DGrid.RowCount - 1].Value             = ((ReceptionHavaleBussines)temp).Guid;
         }
         else if ((temp) is ReceptionCheckBussines)
         {
             if (((ReceptionCheckBussines)temp).CheckStatus != EnCheckM.Batel)
             {
                 DGrid.Rows.Add(1);
                 DGrid[DGType.Index, DGrid.RowCount - 1].Value             = "چک";
                 DGrid[DGPrice.Index, DGrid.RowCount - 1].Value            = ((ReceptionCheckBussines)temp).Price;
                 DGrid[DGCheckBankName.Index, DGrid.RowCount - 1].Value    = ((ReceptionCheckBussines)temp).BankName;
                 DGrid[DGDate.Index, DGrid.RowCount - 1].Value             = ((ReceptionCheckBussines)temp).DateM;
                 DGrid[DGDateSarresid.Index, DGrid.RowCount - 1].Value     = ((ReceptionCheckBussines)temp).DateSarResid;
                 DGrid[DGCheckStatus.Index, DGrid.RowCount - 1].Value      = (int)((ReceptionCheckBussines)temp).CheckStatus;
                 DGrid[DGPoshtNomre.Index, DGrid.RowCount - 1].Value       = ((ReceptionCheckBussines)temp).PoshtNomre;
                 DGrid[DGNumber.Index, DGrid.RowCount - 1].Value           = ((ReceptionCheckBussines)temp).CheckNumber;
                 DGrid[DG_TempDescription.Index, DGrid.RowCount - 1].Value = ((ReceptionCheckBussines)temp).Description;
                 DGrid[DGDescription.Index, DGrid.RowCount - 1].Value      =
                     "تاريخ سررسيد : " + ((ReceptionCheckBussines)temp).DateSarresidSh + " * " +
                     "شماره : " + ((ReceptionCheckBussines)temp).CheckNumber + " * " +
                     "بانک :" + DGrid[DGCheckBankName.Index, DGrid.RowCount - 1].Value + " * " +
                     "شرح: " + ((ReceptionCheckBussines)temp).Description + " * " +
                     "وضعيت در سيستم: " + ((ReceptionCheckBussines)temp).CheckStatus.GetDisplay() + " * " +
                     "محل واگذاری: " + TafsilBussines.Get(((ReceptionCheckBussines)temp).SandouqTafsilGuid)
                     ?.Name;
                 DGrid[DgGuid.Index, DGrid.RowCount - 1].Value       = ((ReceptionCheckBussines)temp).Guid;
                 DGrid[DGTafsilGuid.Index, DGrid.RowCount - 1].Value = ((ReceptionCheckBussines)temp).SandouqTafsilGuid;
             }
         }
         SetLables();
     }
     catch (Exception ex)
     {
         WebErrorLog.ErrorInstence.StartErrorLog(ex);
     }
 }
コード例 #11
0
 public frmPeoplesBankAccount(Guid guid)
 {
     InitializeComponent();
     ParentGuid    = guid;
     ucHeader.Text = $"نمایش لیست حساب های بانکی {TafsilBussines.Get(ParentGuid)?.Name ?? ""}";
 }