예제 #1
0
 public adminViewOrder(OrderObj o)
 {
     InitializeComponent();
     this.o       = o;
     conn         = new DbConnection();
     oid.Text     = o.getOid();
     uid.Text     = o.getUid();
     details.Text = o.getDetails();
     setCB();
 }
예제 #2
0
 public adminViewOrder(OrderObj o, bool isAdmin)
 {
     InitializeComponent();
     this.o       = o;
     conn         = new DbConnection();
     oid.Text     = o.getOid();
     uid.Text     = o.getUid();
     details.Text = o.getDetails();
     setCB();
     update.Visible      = false;
     deleteOrder.Visible = false;
     comboBox1.Enabled   = false;
 }
예제 #3
0
        public string insertOrder(OrderObj o)
        {
            string query = @"INSERT INTO orders VALUES('" + o.getOid() + "','" + o.getUid() + "','" + o.getDetails() + "','" + o.getStatus() + "');";

            Console.WriteLine(query);
            return(query);
        }