Пример #1
0
 public static void showAs_Add(frmManageSupplier.MsgHandler msg)
 {
     dbAction = "add";
     modRefreshData = msg;
     frmSupplierDataEntry f = new frmSupplierDataEntry();
     f.ShowDialog();
 }
Пример #2
0
        public static void showAs_Update(frmManageSupplier.MsgHandler msg, string[] obj)
        {
            dbAction = "update";
            modRefreshData = msg;
            frmSupplierDataEntry f = new frmSupplierDataEntry();
            f.textBox1.Text = obj[0];
            f.textBox2.Text = obj[1];
            f.textBox3.Text = obj[2];
            f.textBox4.Text = obj[3];
            f.textBox5.Text = obj[4];
            f.textBox6.Text = obj[5];
            f.textBox7.Text = obj[6];
            f.textBox8.Text = obj[7];
            f.textBox9.Text = obj[8];
            f.textBox10.Text = obj[9];
            f.textBox11.Text = obj[10];
            f.textBox12.Text = obj[11];

            f.textBox1.Enabled = false;
            f.textBox1.Visible = true;
            f.label1.Visible = true;

            f.btnSave.Text = "Update";

            f.ShowDialog();
        }
Пример #3
0
 //this will create a single instance of form
 public static frmManageSupplier CreateInstance()
 {
     frmManageSupplier f;
     if (thisform == null)
     {
         thisform = new  frmManageSupplier();
     }
     //dynamic casting
     f = (frmManageSupplier)thisform;
     return f;
 }
Пример #4
0
        public static void showAs_View(frmManageSupplier.MsgHandler msg,string[] obj)
        {
            modRefreshData = msg;
            frmSupplierDataEntry f = new frmSupplierDataEntry();
            f.textBox1.Text = obj[0];
            f.textBox2.Text = obj[1];
            f.textBox3.Text = obj[2];
            f.textBox4.Text = obj[3];
            f.textBox5.Text = obj[4];
            f.textBox6.Text = obj[5];
            f.textBox7.Text = obj[6];
            f.textBox8.Text = obj[7];
            f.textBox9.Text = obj[8];
            f.textBox10.Text = obj[9];
            f.textBox11.Text = obj[10];
            f.textBox12.Text = obj[11];

            f.textBox1.ReadOnly = true;
            f.textBox2.ReadOnly = true;
            f.textBox3.ReadOnly = true;
            f.textBox4.ReadOnly = true;
            f.textBox5.ReadOnly = true;
            f.textBox6.ReadOnly = true;
            f.textBox7.ReadOnly = true;
            f.textBox8.ReadOnly = true;
            f.textBox9.ReadOnly = true;
            f.textBox10.ReadOnly = true;
            f.textBox11.ReadOnly = true;
            f.textBox12.ReadOnly = true;

            f.textBox1.Visible = true;
            f.label1.Visible = true;

            f.btnSave.Visible = false;
            f.btnCancel.Text = "Close";

            f.ShowDialog();
        }