public void init_user(String username) { String db_command = "SELECT * FROM [polihilton].[dbo].[Users] Where username='******'"; DataSet ds1 = db1.Read(db_command); DataRow dr1 = ds1.Tables[0].Rows[0]; this.u1 = new Users(int.Parse(dr1["u_id"].ToString()), dr1["firstName"].ToString(), dr1["lastName"].ToString(), dr1["username"].ToString(), this.db1, Form5_label_name); }
public Form7(Users u1) { InitializeComponent(); this.u1 = u1; this.Show(); u1.init_form7_fields(form7_cb_roomType, form7_cb_price, form7_cb_roomCap,Form7_label_name); this.db1 = u1.getDB(); form7_dtp_start.MinDate = DateTime.UtcNow; form7_dtp_end.MinDate = form7_dtp_start.MinDate.AddDays(1); }
public Form8(Users u1,int room_number,DateTime s,DateTime e) { InitializeComponent(); this.u1 = u1; this.room_number = room_number; this.Show(); this.startDate = s; this.endDate = e; textBox2.Text= endDate.ToShortDateString(); textBox1.Text = startDate.ToShortDateString(); u1.fill_room_fields_final(form8_tb_roomName, form8_tb_roomNo, form8_tb_roomFloor, form8_tb_roomCap, form8_tb_roomSurface,form8_tb_roomOrientation,form8_tb_roomPrice,form8_tb_roomDisc,form8_tb_total,room_number); }