private void openOrNew(String reqId, String name) { ic.cStf.staff_id = ""; FrmPasswordConfirm frm1 = new FrmPasswordConfirm(ic); frm1.ShowDialog(this); if (!ic.cStf.staff_id.Equals("")) { String re = ic.ivfDB.orreqDB.UpdateStatusOrAccept(reqId, ic.cStf.staff_id); long chk1 = 0; if (long.TryParse(re, out chk1)) { OrTOperation opu1 = ic.ivfDB.setOR(reqId); String re1 = ic.ivfDB.oropDB.insert(opu1, ic.cStf.staff_id); if (long.TryParse(re1, out chk1)) { FrmOrAdd frm = new FrmOrAdd(ic, menu, re1, "", "", re1); String txt = ""; if (!name.Equals("")) { txt = "ป้อน OR " + name; } frm.FormBorderStyle = FormBorderStyle.None; menu.AddNewTab(frm, txt); } } } }
private void ContextMenu_order_edit(object sender, System.EventArgs e) { //if (grfQue.Row <= 0) return; if (grfQue.Row <= 0) { return; } String chk = "", name = "", id = ""; Cursor curOld; curOld = this.Cursor; this.Cursor = Cursors.WaitCursor; id = grfOpera[grfOpera.Row, colQueId] != null ? grfOpera[grfOpera.Row, colQueId].ToString() : ""; name = grfOpera[grfOpera.Row, colQueName] != null ? grfOpera[grfOpera.Row, colQueName].ToString() : ""; //openOrNew(id, ""); FrmOrAdd frm = new FrmOrAdd(ic, menu, id, "", "", "edit"); String txt = ""; if (!name.Equals("")) { txt = "ป้อน OR " + name; } frm.FormBorderStyle = FormBorderStyle.None; menu.AddNewTab(frm, txt); this.Cursor = curOld; }