private void 预订管理_Load(object sender, EventArgs e) { CMS.BLL.BookManageBLL bm = new BLL.BookManageBLL(); try { string[] yy = { "单台或批量" }; string[] ss = { "单台" }; //objset = Program.DBOpertor.Select("预订", yy, ss); objset = CMS.BLL.BookManageBLL.Select("预订", yy, ss); this.ygp(objset); string[] ss0 = { "批量" }; //objset1 = Program.DBOpertor.Select("预订", yy, ss0); objset = CMS.BLL.BookManageBLL.Select("预订", yy, ss0); this.ygp0(objset); objsettable = new DataSet(); objtable1 = new DataTable("表2"); DataColumn objcolumn = objtable1.Columns.Add("RTID", typeof(string)); objtable1.Columns.Add("TableName", typeof(string)); objtable1.Columns.Add("TableState", typeof(int)); objsettable.Tables.Add(objtable1); dataGridView2.DataSource = objsettable; dataGridView2.DataMember = "表2"; for (int i = 0; i < 3; i++) { dataGridView2.Columns[i].Width = 270; } } catch (Exception ex) { } }
private void 单台预订_Load(object sender, EventArgs e) { CMS.BLL.BookManageBLL bm = new BLL.BookManageBLL(); //objset= Program.DBOpertor.Getselect("房间类型"); objset = CMS.BLL.BookManageBLL.Getselect("RoomType"); comboBox2.DataSource = objset.Tables[0]; comboBox2.DisplayMember = "RTName"; comboBox2.ValueMember = "RTID"; comboBox2.SelectedIndexChanged += comboBox2_SelectedIndexChanged; //for(int i=0;i<objset.Tables[0].Rows.Count;i++) //{ // comboBox2.Items.Add(objset.Tables[0].Rows[i][1]); //} comboBox2.SelectedIndex = 0; comboBox1.SelectedIndex = 0; comboBox5.SelectedIndex = 0; comboBox7.SelectedIndex = 0; }
private void 批量预订_Load(object sender, EventArgs e) { CMS.BLL.BookManageBLL bm = new BLL.BookManageBLL(); int sum = 0; comboBox1.SelectedIndex = 0; //objset = Program.DBOpertor.Getselect("房间类型"); objset = CMS.BLL.BookManageBLL.Getselect("RoomType"); TreeNode chNode = new TreeNode("节点"); for (int i = 0; i < objset.Tables[0].Rows.Count; i++) { this.treeView1.Nodes.Add(objset.Tables[0].Rows[i][1].ToString()); this.treeView1.Nodes[i].Tag = objset.Tables[0].Rows[i]["RTID"].ToString(); sum = i; } comboBox1.SelectedIndex = 0; //objset = Program.DBOpertor.Getselect("餐房"); objset = CMS.BLL.BookManageBLL.Getselect("Tables"); for (int j = 0; j <= sum; j++) { for (int i = 0; i < objset.Tables[0].Rows.Count; i++) { if (this.treeView1.Nodes[j].Tag.ToString().Equals(objset.Tables[0].Rows[i]["RTID"].ToString())) { this.treeView1.Nodes[j].Nodes.Add(objset.Tables[0].Rows[i]["TableName"].ToString()); } } } objset0 = new DataSet(); objtable = new DataTable("table"); objtable.Columns.Add("房间名称"); objtable.Columns.Add("餐台编号"); objset0.Tables.Add(objtable); dataGridView1.DataSource = objset0; dataGridView1.DataMember = "table"; dataGridView1.Columns[0].Width = 170; dataGridView1.Columns[1].Width = 170; comboBox5.SelectedIndex = 0; comboBox7.SelectedIndex = 0; }
private void 快餐外买_Load(object sender, EventArgs e) { CMS.BLL.BookManageBLL bookBll = new BLL.BookManageBLL(); this.dataygp(); }