Esempio n. 1
0
        public void GetAll()
        {
            NetSatisContext context = new NetSatisContext();
            StokDal         stokDal = new StokDal();

            gridControl1.DataSource = stokDal.StokListele(context);
        }
Esempio n. 2
0
        private void btnKaydet_Click(object sender, EventArgs e)
        {
            NetSatisContext context = new NetSatisContext();
            StokDal         stokDal = new StokDal();

            if (stokDal.AddorUpdate(context, _entity))
            {
                stokDal.Save(context);
                saved = true;
                this.Close();
            }
        }
Esempio n. 3
0
        private void btnSil_Click(object sender, EventArgs e)
        {
            NetSatisContext context = new NetSatisContext();
            StokDal         stokDal = new StokDal();

            if (MessageBox.Show("Seçili olan veriyi silmek istediğinize emin misiniz?", "UYARI", MessageBoxButtons.YesNo) == DialogResult.Yes)
            {
                secilen = gridView1.GetFocusedRowCellValue(colStokKodu).ToString();
                stokDal.Delete(context, c => c.StokKodu == secilen);
                stokDal.Save(context);
                GetAll();
            }
        }
Esempio n. 4
0
        private void btnDuzenle_Click(object sender, EventArgs e)
        {
            NetSatisContext context = new  NetSatisContext();
            StokDal         stokDal = new StokDal();

            secilen = gridView1.GetFocusedRowCellValue(colStokKodu).ToString();
            FrmStokIslem form = new FrmStokIslem(stokDal.GetByFilter(context, c => c.StokKodu == secilen));

            form.ShowDialog();
            if (form.saved)
            {
                GetAll();
            }
        }
Esempio n. 5
0
        private void btnKopyala_Click(object sender, EventArgs e)
        {
            NetSatisContext context = new  NetSatisContext();
            StokDal         stokDal = new StokDal();

            secilen = gridView1.GetFocusedRowCellValue(colStokKodu).ToString();
            Entities.Tables.Stok stokEntity = new Entities.Tables.Stok();
            stokEntity          = stokDal.GetByFilter(context, c => c.StokKodu == secilen);
            stokEntity.Id       = -1;
            stokEntity.StokKodu = null;
            FrmStokIslem form = new FrmStokIslem(stokEntity);

            form.ShowDialog();
            if (form.saved)
            {
                GetAll();
            }
        }
Esempio n. 6
0
        public rptStokDurumu()
        {
            InitializeComponent();
            MGsTOKContex conetext = new MGsTOKContex();
            StokDal      stokdal  = new StokDal();

            ObjectDataSource stokDatasource = new ObjectDataSource {
                DataSource = stokdal.GetAlljoin(conetext)
            };

            this.DataSource = stokDatasource;
            // colStokGrubu.DataBindings.Add("Text", this.DataSource, "StokKodu");
            colBarkod.DataBindings.Add("Text", this.DataSource, "Barkod");
            colStokAdi.DataBindings.Add("Text", this.DataSource, "StokAdi");
            colBirimi.DataBindings.Add("Text", this.DataSource, "StokBirimi");
            colStokGrubu.DataBindings.Add("Text", this.DataSource, "StokGrubu");
            colSatisKdv.DataBindings.Add("Text", this.DataSource, "SatisKdv");
            colStokGiris.DataBindings.Add("Text", this.DataSource, "StokGiris");
            colStokCikis.DataBindings.Add("Text", this.DataSource, "StokCikis");
        }
Esempio n. 7
0
        public rptFatura(string fiskodu)
        {
            InitializeComponent();
            MGsTOKContex     conetext      = new MGsTOKContex();
            StokDal          stokdal       = new StokDal();
            FisDal           fisdal        = new FisDal();
            ObjectDataSource fisDatasource = new ObjectDataSource {
                DataSource = fisdal.GetAll(conetext, c => c.FisKodu == fiskodu)
            };
            ObjectDataSource stokDatasource = new ObjectDataSource {
                DataSource = stokdal.GetAlljoin(conetext)
            };

            this.DataSource = stokDatasource;
            lblCariAdi.DataBindings.Add("Text", fisDatasource, "CariAdi");
            lblAdres.DataBindings.Add("Text", fisDatasource, "Adres");

            colStokAdi.DataBindings.Add("Text", this.DataSource, "StokAdi");
            colMiktar.DataBindings.Add("Text", this.DataSource, "Miktar");
            colBirimFiyat.DataBindings.Add("Text", this.DataSource, "BirimFiyat");
        }
Esempio n. 8
0
        public rptStokDurumu()
        {
            InitializeComponent();
            NetSatisContext context = new NetSatisContext();
            StokDal         stokDal = new StokDal();

            ObjectDataSource stokDataSource = new ObjectDataSource {
                DataSource = stokDal.StokListele(context)
            };

            this.DataSource = stokDataSource;

            colStokKodu.DataBindings.Add("Text", this.DataSource, "StokKodu");
            colBarkod.DataBindings.Add("Text", this.DataSource, "Barkod");
            colStokAdi.DataBindings.Add("Text", this.DataSource, "StokAdi");
            colBirimi.DataBindings.Add("Text", this.DataSource, "Birimi");
            colStokGrubu.DataBindings.Add("Text", this.DataSource, "StokGrubu");
            colStokAltGrubu.DataBindings.Add("Text", this.DataSource, "StokAltGrubu");
            colSatisKdv.DataBindings.Add("Text", this.DataSource, "SatisKdv");
            colStokGiris.DataBindings.Add("Text", this.DataSource, "StokGiris");
            colStokCikis.DataBindings.Add("Text", this.DataSource, "StokCikis");
            colMevcutStok.DataBindings.Add("Text", this.DataSource, "MevcutStok");
        }