Example #1
0
        private void frmStokSayimDetayv2_Load(object sender, EventArgs e)
        {
            try
            {
                trGenel = SqlConnections.GetBaglanti().BeginTransaction();
                #region lkpDepo
                Depo = new clsTablolar.csDepo(SqlConnections.GetBaglanti(), trGenel);

                lkpDepo.Properties.DataSource = Depo.dt_Depo;
                lkpDepo.Properties.PopulateColumns();
                lkpDepo.Properties.ValueMember   = "DepoID";
                lkpDepo.Properties.DisplayMember = "DepoAdi";
                lkpDepo.Properties.ShowHeader    = false;
                lkpDepo.EditValue = 1; // todo Bu ayarlardan gelicek daha sonra (varsayılan depo diye)
                #endregion
                deSayimTarih.DateTime = DateTime.Now;

                SayimBaslik = new clsTablolar.Sayim.csSayim(SqlConnections.GetBaglanti(), trGenel, _SayimID);
                gcSayim_Doldur();
                NesneleriBindleHamisina();

                trGenel.Commit();
            }
            catch (Exception hata)
            {
                trGenel.Rollback();
                frmHataBildir frmHataBildir = new frmHataBildir(hata.Message, hata.StackTrace);
                frmHataBildir.ShowDialog();
            }
        }
        private void frmStokSayim_Load(object sender, EventArgs e)
        {
            ClasstanBilgileriAlanlariAl();
            try
            {
                trGenel = SqlConnections.GetBaglanti().BeginTransaction();
                Depo    = new clsTablolar.csDepo(SqlConnections.GetBaglanti(), trGenel);

                lkpSayimDeposu.Properties.DataSource    = Depo.dt_Depo;
                lkpSayimDeposu.Properties.ValueMember   = "DepoID";
                lkpSayimDeposu.Properties.DisplayMember = "DepoAdi";

                trGenel.Commit();
            }
            catch (Exception hata)
            {
                trGenel.Rollback();
                frmHataBildir frmHataBildir = new frmHataBildir(hata.Message, hata.StackTrace);
                frmHataBildir.ShowDialog();
            }
        }