private void Duzenle() { if (CariGridView.RowCount.Equals(0)) { XtraMessageBox.Show("Düzenlenecek Kayıt Bulunamadı."); } else { secilen = Convert.ToInt32(CariGridView.GetFocusedRowCellValue(colId)); logSecilen = CariGridView.GetFocusedRowCellValue(colCariKodu).ToString(); FrmCariIslem form = new FrmCariIslem(cariDal.GetByFilter(context, c => c.KullaniciID == RoleTool.kullaniciEntity.KullaniciID && c.Id == secilen)); form.ShowDialog(); if (form.kayitedildi) { GetAll(); context.KullaniciLoglari.Add(new KullaniciLog { KullaniciID = RoleTool.kullaniciEntity.KullaniciID, KullaniciAdi = RoleTool.kullaniciEntity.KullaniciAdi, YapilanIslem = "Cari Düzenle - " + logSecilen, YapilanIslemTarihi = DateTime.Now }); context.SaveChanges(); } } }
private void btnDüzenle_Click(object sender, EventArgs e) { secilen = gridView1.GetFocusedRowCellValue(colCariKodu).ToString(); var form = new FrmCariIslem(cariDal.GetByFilter(context, c => c.CariKodu == secilen)); form.ShowDialog(); }
private void btnDuzenle_Click(object sender, EventArgs e) { secilen = gridView1.GetFocusedRowCellValue(colCariKodu).ToString(); FrmCariIslem frm = new FrmCariIslem(_caridal.GetByFilter(_context, s => s.CariKodu == secilen)); frm.ShowDialog(); GetAll(); }
private void btnduzenle_Click(object sender, EventArgs e) { secilen = gridView1.GetFocusedRowCellValue(colCariKodu).ToString(); FrmCariIslem form = new FrmCariIslem(cariDal.GetByFilter(context, c => c.CariKodu == secilen)); form.ShowDialog(); if (form.saved) // kapat butununa basıldığında gereksiz yere güncelleme işlemi yapmamak için ; form saved metodu (cariislem kaydet butonu altında) (addorrupdate) true ise listeyi güncelle { GetAll(); } }
public rptCariExtresi(int CariID, DateTime baslangic, DateTime bitis) { InitializeComponent(); NetSatisContext context = new NetSatisContext(); CariDAL cariDal = new CariDAL(); var cariEntity = cariDal.GetByFilter(context, c => c.Id == CariID); ObjectDataSource cariEkstreDataSource = new ObjectDataSource { DataSource = cariDal.CariFisAyrinti(context, CariID, baslangic, bitis) }; List <GenelToplam> cariBakiyeDataSource = (List <GenelToplam>)cariDal.CariGenelToplam(context, CariID); this.DataSource = cariEkstreDataSource; lblCariKodu.DataBindings.Add("Text", cariEntity, "CariKodu"); lblCariAdı.DataBindings.Add("Text", cariEntity, "CariAdi"); colSeri.DataBindings.Add("Text", this.DataSource, "Seri"); colFisTuru.DataBindings.Add("Text", this.DataSource, "FisTuru"); colBelgeNo.DataBindings.Add("Text", this.DataSource, "BelgeNo"); colSira.DataBindings.Add("Text", this.DataSource, "Sira"); colTarih.DataBindings.Add("Text", this.DataSource, "Tarih", "{0:dd.MM.yyyy}"); colVadeTarihi.DataBindings.Add("Text", this.DataSource, "VadeTarihi", "{0:dd.MM.yyyy}"); colToplamTutar.DataBindings.Add("Text", this.DataSource, "ToplamTutar", "{0:C2}"); colOdenen.DataBindings.Add("Text", this.DataSource, "Odenen", "{0:C2}"); colAktif.DataBindings.Add("Text", this.DataSource, "AktifTutar", "{0:C2}"); lblBaslangic.Text = baslangic.ToShortDateString(); lblBitis.Text = bitis.ToShortDateString(); colAlacak.DataBindings.Add("Text", cariBakiyeDataSource[0], "Bilgi"); colAlacakTutar.DataBindings.Add("Text", cariBakiyeDataSource[0], "Tutar", "{0:C2}"); colBorc.DataBindings.Add("Text", cariBakiyeDataSource[1], "Bilgi"); colBorcTutar.DataBindings.Add("Text", cariBakiyeDataSource[1], "Tutar", "{0:C2}"); colBakiye.DataBindings.Add("Text", cariBakiyeDataSource[2], "Bilgi"); colBakiyeTutar.DataBindings.Add("Text", cariBakiyeDataSource[2], "Tutar", "{0:C2}"); }
public FrmCariHareket(int cariId) { InitializeComponent(); _cariId = cariId; var cariEntity = cariDal.GetByFilter(context, c => c.KullaniciID == RoleTool.kullaniciEntity.KullaniciID && c.Id == _cariId); LblBaslik.Text = cariEntity.CariKodu + " - " + cariEntity.CariAdi + " Hareketleri "; }
public frmCariHareket(int cariId) { InitializeComponent(); _cariId = cariId; var cariEntity = cariDAL.GetByFilter(context, c => c.Id == _cariId); lblBaslik.Text = cariEntity.CariKodu + " - " + cariEntity.CariAdi + " Harketleri"; }
private void gridView1_DoubleClick(object sender, EventArgs e) { secilen = Convert.ToInt32(gridView1.GetFocusedRowCellValue(colId)); frmCariIslem form = new frmCariIslem(cariDal.GetByFilter(context, c => c.Id == secilen)); form.ShowDialog(); if (form.saved) { GetAll(); } }
public frmCariHareket(int cariId) { InitializeComponent(); _cariId = cariId; var cariEntity = cariDal.GetByFilter(context, c => c.Id == _cariId); lblBaslik.Text = cariEntity.CariKodu + " - " + cariEntity.CariAdi + " Hareketleri "; dtpBaslangic.Properties.Mask.MaskType = MaskType.DateTimeAdvancingCaret; dtpBitis.Properties.Mask.MaskType = MaskType.DateTimeAdvancingCaret; dtpBaslangic.DateTime = new DateTime(DateTime.Now.Year, 1, 1); dtpBitis.DateTime = new DateTime(DateTime.Now.Year, 12, 31); }
private void btnDuzenle_Click(object sender, EventArgs e) { try { if (gridView1.RowCount != 0) { secilen = Convert.ToInt32(gridView1.GetFocusedRowCellValue(colId)); frmCariIslem form = new frmCariIslem(cariDal.GetByFilter(context, c => c.Id == secilen)); form.ShowDialog(); if (form.saved) { } } else { MessageBox.Show("Seçili Cari Bulunamadı"); } } catch (Exception) { MessageBox.Show("Seçili Cari Bulunamadı"); } }
private void brnCariDuzenle_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { try { if (gridView1.RowCount != 0) { sec = Convert.ToInt32(gridView1.GetFocusedRowCellValue(colId)); frmCariIslem form = new frmCariIslem(cariDal.GetByFilter(context, c => c.Id == sec)); form.ShowDialog(); if (form.saved) { gridControl1.DataSource = cariDal.GetCariler(context); } } else { MessageBox.Show("Seçili Cari Bulunamadı"); } } catch (Exception) { MessageBox.Show("Seçili Cari Bulunamadı"); } }
private void btnDuzenle_Click(object sender, EventArgs e) { secilen = Convert.ToInt32(gridView1.GetFocusedRowCellValue(colId)); Cari.frmCariIslem form = new Cari.frmCariIslem(cariDAL.GetByFilter(context, c => c.Id == secilen)); form.ShowDialog(); }
public rptCariExtresiStokDetayli(int CariID, DateTime baslangic, DateTime bitis) { InitializeComponent(); NetSatisContext context = new NetSatisContext(); CariDAL cariDal = new CariDAL(); var cariEntity = cariDal.GetByFilter(context, c => c.Id == CariID); ObjectDataSource cariEkstreDataSource = new ObjectDataSource { DataSource = cariDal.CariFisAyrintiStok(context, CariID, baslangic, bitis) }; List <GenelToplam> cariBakiyeDataSource = (List <GenelToplam>)cariDal.CariGenelToplam(context, CariID, baslangic, bitis); List <GenelToplam> cariBakiyeDataSourceDev = (List <GenelToplam>)cariDal.CariGenelToplam(context, CariID); List <GenelToplam> cariBakiyeDurum = (List <GenelToplam>)cariDal.CariGenelToplam(context, CariID); this.DataSource = cariEkstreDataSource; lblCariKodu.DataBindings.Add("Text", cariEntity, "CariKodu"); lblCariAdı.DataBindings.Add("Text", cariEntity, "CariAdi"); Adres.DataBindings.Add("Text", cariEntity, "Adres"); lblIl.DataBindings.Add("Text", cariEntity, "Il"); lblIlce.DataBindings.Add("Text", cariEntity, "Ilce"); colDipIndirim.DataBindings.Add("Text", this.DataSource, "DipIndirim"); colIndirim.DataBindings.Add("Text", this.DataSource, "IndirimTutari"); colBirim.DataBindings.Add("Text", this.DataSource, "Birim"); colUrunAdi.DataBindings.Add("Text", this.DataSource, "UrunAdi"); //colFisTuru.DataBindings.Add("Text", this.DataSource, "IslemTuru"); //colTarih.DataBindings.Add("Text", this.DataSource, "IslemTarihi", "{0:dd.MM.yyyy}"); //colVadeTarihi.DataBindings.Add("Text", this.DataSource, "VadeTarihi", "{0:dd.MM.yyyy}"); coltutar.DataBindings.Add("Text", this.DataSource, "SatirTutari", "{0:C2}"); colBirimFiyat.DataBindings.Add("Text", this.DataSource, "BirimFiyat", "{0:C2}"); colMiktar.DataBindings.Add("Text", this.DataSource, "Miktar", "{0:N2}"); colAlacak.DataBindings.Add("Text", cariBakiyeDataSource[0], "Bilgi"); colAlacakTutar.DataBindings.Add("Text", cariBakiyeDataSource[0], "Tutar", "{0:C2}"); colBorc.DataBindings.Add("Text", cariBakiyeDataSource[1], "Bilgi"); colBorcTutar.DataBindings.Add("Text", cariBakiyeDataSource[1], "Tutar", "{0:C2}"); colBakiye.DataBindings.Add("Text", cariBakiyeDataSource[2], "Bilgi"); colBakiyeTutar.DataBindings.Add("Text", cariBakiyeDataSource[2], "Tutar", "{0:C2}"); lblBaslangic.Text = baslangic.ToShortDateString(); lblBitis.Text = bitis.ToShortDateString(); CalculatedField calcTutar = new CalculatedField(); this.CalculatedFields.Add(calcTutar); calcTutar.Name = "TopTutar"; calcTutar.Expression = "[SatirTutari]"; XRSummary sumToplamTutar = new XRSummary(); sumToplamTutar.Func = SummaryFunc.Sum; sumToplamTutar.Running = SummaryRunning.Group; sumToplamTutar.FormatString = "{0:C2}"; CalculatedField calcBorcAlacak = new CalculatedField(); this.CalculatedFields.Add(calcBorcAlacak); calcBorcAlacak.Name = "SonDurum"; calcBorcAlacak.Expression = "Iif([colSonDurum] > 0, '(Alacaklı)', '(Borçlu)')"; lblToplamTutar.DataBindings.Add("Text", null, "TopTutar"); lblToplamTutar.Summary = sumToplamTutar; }
public rptCariExtresiStok(int CariID, DateTime baslangic, DateTime bitis) { InitializeComponent(); NetSatisContext context = new NetSatisContext(); CariDAL cariDal = new CariDAL(); var cariEntity = cariDal.GetByFilter(context, c => c.Id == CariID); ObjectDataSource cariEkstreDataSource = new ObjectDataSource { DataSource = cariDal.CariFisAyrintiStok(context, CariID, baslangic, bitis) }; List <GenelToplam> cariBakiyeDataSource = (List <GenelToplam>)cariDal.CariGenelToplam(context, CariID, baslangic, bitis); List <GenelToplam> cariBakiyeDataSourceDev = (List <GenelToplam>)cariDal.CariGenelToplam(context, CariID); List <GenelToplam> cariBakiyeDurum = (List <GenelToplam>)cariDal.CariGenelToplam(context, CariID); cariBakiyeDataSourceDev[0].Tutar = cariBakiyeDataSourceDev[0].Tutar - cariBakiyeDataSource[0].Tutar; cariBakiyeDataSourceDev[1].Tutar = cariBakiyeDataSourceDev[1].Tutar - cariBakiyeDataSource[1].Tutar; cariBakiyeDataSourceDev[2].Tutar = cariBakiyeDataSourceDev[0].Tutar - cariBakiyeDataSourceDev[1].Tutar; cariBakiyeDurum[2].Tutar = cariBakiyeDataSource[2].Tutar + cariBakiyeDataSourceDev[2].Tutar; this.DataSource = cariEkstreDataSource; lblCariKodu.DataBindings.Add("Text", cariEntity, "CariKodu"); lblCariAdı.DataBindings.Add("Text", cariEntity, "CariAdi"); Adres.DataBindings.Add("Text", cariEntity, "Adres"); lblIl.DataBindings.Add("Text", cariEntity, "Il"); lblIlce.DataBindings.Add("Text", cariEntity, "Ilce"); //colFisKodu.DataBindings.Add("Text", this.DataSource, "FisKodu"); colFisTuru.DataBindings.Add("Text", this.DataSource, "IslemTuru"); colBirim.DataBindings.Add("Text", this.DataSource, "Birim"); colUrunAdi.DataBindings.Add("Text", this.DataSource, "UrunAdi"); colAciklama.DataBindings.Add("Text", this.DataSource, "Aciklama"); //colBelgeNo.DataBindings.Add("Text", this.DataSource, "BelgeNo"); colTarih.DataBindings.Add("Text", this.DataSource, "IslemTarihi", "{0:dd.MM.yyyy}"); //colVadeTarihi.DataBindings.Add("Text", this.DataSource, "VadeTarihi", "{0:dd.MM.yyyy}"); coltutar.DataBindings.Add("Text", this.DataSource, "SatirTutari", "{0:C2}"); colFistutari.DataBindings.Add("Text", this.DataSource, "FisTutari", "{0:C2}"); colBirimFiyat.DataBindings.Add("Text", this.DataSource, "BirimFiyat", "{0:C2}"); colMiktar.DataBindings.Add("Text", this.DataSource, "Miktar", "{0:N2}"); colBorsa.DataBindings.Add("Text", this.DataSource, "BorsaToplam", "{0:C2}"); colZirai.DataBindings.Add("Text", this.DataSource, "ZiraiToplam", "{0:C2}"); colBagkur.DataBindings.Add("Text", this.DataSource, "BagkurToplam", "{0:C2}"); lblBaslangic.Text = baslangic.ToShortDateString(); lblBitis.Text = bitis.ToShortDateString(); CalculatedField calcBorcAlacak = new CalculatedField(); this.CalculatedFields.Add(calcBorcAlacak); calcBorcAlacak.Name = "SonDurum"; calcBorcAlacak.Expression = "Iif([colSonDurum] > 0, '(Alacaklı)', '(Borçlu)')"; colDevAlacakTutar.DataBindings.Add("Text", cariBakiyeDataSourceDev[0], "Tutar", "{0:C2}"); colAlacakTutar.DataBindings.Add("Text", cariBakiyeDataSource[0], "Tutar", "{0:C2}"); colDevBorcTutar.DataBindings.Add("Text", cariBakiyeDataSourceDev[1], "Tutar", "{0:C2}"); colBorcTutar.DataBindings.Add("Text", cariBakiyeDataSource[1], "Tutar", "{0:C2}"); colDevBakiye.DataBindings.Add("Text", cariBakiyeDataSourceDev[2], "Tutar", "{0:C2}"); colBakiyeTutar.DataBindings.Add("Text", cariBakiyeDataSource[2], "Tutar", "{0:C2}"); colSonDurum.DataBindings.Add("Text", cariBakiyeDurum[2], "Tutar", "{0:C2}"); lblDurum.DataBindings.Add("Text", null, "SonDurum"); }