public static void showAs_Add(frmManageShipper.MsgHandler msg) { dbAction = "add"; modRefreshData = msg; frmShipperDataEntry f = new frmShipperDataEntry(); f.ShowDialog(); }
//this will create a single instance of form public static frmManageShipper CreateInstance() { frmManageShipper f; if (thisform == null) { thisform = new frmManageShipper(); } f = (frmManageShipper)thisform; return f; }
public static void showAs_Update(frmManageShipper.MsgHandler msg, string[] obj) { dbAction = "update"; modRefreshData = msg; frmShipperDataEntry f = new frmShipperDataEntry(); f.textBox1.Text = obj[0]; f.textBox2.Text = obj[1]; f.textBox3.Text = obj[2]; f.textBox1.Enabled = false; f.textBox1.Visible = true; f.label1.Visible = true; f.btnSave.Text = "Update"; f.ShowDialog(); }
public static void showAs_View(frmManageShipper.MsgHandler msg, string[] obj) { modRefreshData = msg; frmShipperDataEntry f = new frmShipperDataEntry(); f.textBox1.Text = obj[0]; f.textBox2.Text = obj[1]; f.textBox3.Text = obj[2]; f.textBox1.ReadOnly = true; f.textBox2.ReadOnly = true; f.textBox3.ReadOnly = true; f.textBox1.Visible = true; f.label1.Visible = true; f.btnSave.Visible = false; f.btnCancel.Text = "Close"; f.ShowDialog(); }