예제 #1
0
 void LoadGrid()
 {
     try
     {
         dataGridView1.AutoGenerateColumns = false;
         IList <StokHarRpr> rpr = mngSth.GetByFisNoAndSubeKodu(_fisNo, UserInfo.Sube.Id);
         dataGridView1.DataSource = rpr;
         HesaplaGenelToplam hes = new HesaplaGenelToplam(rpr, true);
         txtGenelAraTop.Text = hes.AraToplam().ToString("F2");
         //txtGenelBrut.Text = hes.BrutHesapla().ToString("F2");
         txtGenelGenelTop.Text = hes.GenelToplam().ToString("F2");
         txtGenelTopKdv.Text   = hes.ToplamaKdvHesapla().ToString("F2");
         genelToplamlar        = hes;
     }
     catch (Exception exc)
     {
         MessageBox.Show(exc.Message);
         LogWrite.Write(exc);
     }
 }
예제 #2
0
 void HesaplaGenelToplamlari(IList <StokHarRpr> stokListe)
 {
     try
     {
         if (stokListe == null)
         {
             stokListe = mngSipKal.GetByFisNoAndSubeKodu(txtFatNo.Text, UserInfo.Sube.Id, _ftirsip);
         }
         HesaplaGenelToplam hes = new HesaplaGenelToplam(stokListe, chkKdvDahilmi.Checked);
         txtGenelAraTop.Text   = hes.AraToplam().ToString("F2");
         txtGenelBrut.Text     = hes.BrutHesapla().ToString("F2");
         txtGenelGenelTop.Text = hes.GenelToplam().ToString("F2");
         txtGenelIskTop.Text   = hes.SatirIskantosuToplam().ToString("F2");
         txtGenelTopKdv.Text   = hes.ToplamaKdvHesapla().ToString("F2");
         genelToplamlar        = hes;
     }
     catch (Exception exc)
     {
         MessageBox.Show(exc.Message);
         LogWrite.Write(exc);
     }
 }