protected void LoadRow(string _uid) { BL_Client oBL_Client = new BL_Client(); DataTable dt = oBL_Client.SelectOne(_uid, null); try { //display table if (dt.Rows.Count > 0) { TextBox1.Text = dt.Rows[0]["CLIENT_ID"].ToString(); TextBox2.Text = dt.Rows[0]["CLIENT_NAME"].ToString(); DropDownList1.SelectedValue = dt.Rows[0]["CAR_NAME"].ToString(); Date1.Value = dt.Rows[0]["DATE"].ToString(); } } catch (Exception ex) { Label1.Text = ex.Message.ToString(); } }
protected void LoadRow(string _ap_id) { BL_Client oBL_Client = new BL_Client(); DataTable dt = oBL_Client.SelectOne(_ap_id, null); Button1.Text = "Update"; try { //display table if (dt.Rows.Count > 0) { _temp = Convert.ToInt32(dt.Rows[0]["APPOINTMENT_ID"]); TextBox1.Text = dt.Rows[0]["APPOINTMENT_NAME"].ToString(); DropDownList1.SelectedItem.Text = dt.Rows[0]["PARENT"].ToString(); TextBox2.Text = dt.Rows[0]["LIMIT_MONTH"].ToString(); TextBox3.Text = dt.Rows[0]["LIMIT_YEAR"].ToString(); } } catch (Exception ex) { Label5.Text = ex.Message.ToString(); } }