private void tsbtnSatisiptal_Click(object sender, EventArgs e) { frmFatura frm = new frmFatura(FTIRSIP.DirektSatis, FatNoTip.Fatura); frm.WindowState = FormWindowState.Maximized; frm.Show(); }
private void faturayaGitToolStripMenuItem_Click(object sender, EventArgs e) { try { DataGridViewRow r = dataGridView1.CurrentRow; if (r != null) { string fisNo = dataGridView1.CurrentRow.Cells["FisNo"].Value.ToStringOrEmpty(); string tip = dataGridView1.CurrentRow.Cells["Tip"].Value.ToStringOrEmpty(); string kod = dataGridView1.CurrentRow.Cells["GCKod"].Value.ToStringOrEmpty(); FTIRSIP ftir = FTIRSIP.AlisFat; Indeks.Data.Helper.FatNoTip fatn = Indeks.Data.Helper.FatNoTip.Fatura; if (tip == "Fatura") { fatn = Indeks.Data.Helper.FatNoTip.Fatura; if (kod == "MalAlış") { ftir = FTIRSIP.AlisFat; } else { if (fisNo.StartsWith("0ds")) { ftir = FTIRSIP.DirektSatis; } else { ftir = FTIRSIP.SatisFat; } } } else if (tip == "İrsaliye") { fatn = Indeks.Data.Helper.FatNoTip.Irsaliye; if (kod == "MalAlış") { ftir = FTIRSIP.AlisIrs; } else { ftir = FTIRSIP.SatisFat; } } frmFatura frm = new frmFatura(ftir, fatn, fisNo); frm.WindowState = FormWindowState.Maximized; frm.Show(); } } catch (Exception exc) { MessageBox.Show(exc.Message); LogWrite.Write(exc); } }