void InitializeData()
 {
     g_mngFac               = new ManagerFactory(Engine.GetConString(), Engine.GetSqlServerType());
     g_mngCari              = g_mngFac.GetCariManager();
     g_mngCek               = g_mngFac.GetCekManager();
     g_mngBanka             = g_mngFac.GetBankaHesapManager();
     g_mngCariHar           = g_mngFac.GetCariHareketManager();
     txtCariKodu.DataSource = () =>
     {
         try {
             return(g_mngCari.GetCariKodsBySubeKodu(UserInfo.Sube.Id, txtCariKodu.Text).ToStringList(15, txtCariKodu.Ayirac));
         } catch (Exception exc) {
             MessageBox.Show(exc.Message);
             LogWrite.Write(exc);
         }
         return(null);
     };
     if (g_cekTip == CekTip.Verilen)
     {
         btnBankaRehber.Visible = true;
         txtHesapNo.DataSource  = () =>
         {
             try {
                 return(g_mngBanka.GetBankaHesapNoBySubeKodu(UserInfo.Sube.Id, txtHesapNo.Text));
             } catch (Exception exc) {
                 LogWrite.Write(exc);
                 MessageBox.Show(exc.Message);
             }
             return(null);
         };
     }
 }
Beispiel #2
0
        public frmBankaHareket(HesapHareketTuru hareketTuru)
        {
            InitializeComponent();
            mngFac       = new ManagerFactory(Engine.GetConString(), Engine.GetSqlServerType());
            mngBanka     = mngFac.GetBankaHesapManager();
            mngHesap     = mngFac.GetHesapHareketManager();
            mngKasa      = mngFac.GetKasaManager();
            mngKasaHar   = mngFac.GetKasaHarManager();
            mngCari      = mngFac.GetCariManager();
            mngCariHar   = mngFac.GetCariHareketManager();
            _hareketTuru = hareketTuru;

            txtCariKodu.DataSource = () =>
            {
                try
                {
                    return(mngCari.GetCariKodsBySubeKodu(UserInfo.Sube.Id, txtCariKodu.Text).ToStringList(15, txtCariKodu.Ayirac));
                }
                catch (Exception exc)
                {
                    MessageBox.Show(exc.Message);
                    LogWrite.Write(exc);
                }
                return(null);
            };
            txtHesapNo.DataSource = () =>
            {
                try
                {
                    return(mngBanka.GetBankaHesapNoBySubeKodu(UserInfo.Sube.Id, txtHesapNo.Text));
                }
                catch (Exception exc)
                {
                    LogWrite.Write(exc);
                    MessageBox.Show(exc.Message);
                }
                return(null);
            };
            //LoadGrid();
            SetLocation();
        }