public frmMainReport(RCVPOEditForm rCVPOEditForm, string code) { InitializeComponent(); this.rCVPOEditForm = rCVPOEditForm; this.code = code; using (SSLsEntities db = new SSLsEntities()) { var data = db.PORcv.SingleOrDefault(w => w.Enable == true && w.Code == code); data.PrintNumber = data.PrintNumber + 1; db.Entry(data).State = EntityState.Modified; db.SaveChanges(); } this.TypeReport = MyConstant.TypeReport.RCVPO; }
private void button4_Click(object sender, EventArgs e) { try { /// เลขที่ใบรับเข้า string code = dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells[keyCode].Value.ToString(); RCVPOEditForm rcv = new RCVPOEditForm(this, code); rcv.Show(); } catch (Exception) { MessageBox.Show("จำนวนเอกสารผิดพลาด"); } }
public POListNotCompleteForm(RCVPOEditForm rCVPOEditForm) { InitializeComponent(); _Fromform = "RCVPOEditForm"; this.rCVPOEditForm = rCVPOEditForm; }