private void LoadDues(string d_id) { SqlDataReader sdr = ed.GetDues(d_id); if (sdr.HasRows) { if (sdr.Read()) { //select d_id, d_PayeeText, d_PayeeValue, d_RoomNo, d_t_Mobile, d_DuesTypeText, d_DuesTypeValue, d_DuesAmount, convert(varchar, d_DuesDate, 23) as d_DuesDate , d_DuesMonth , d_Remark ,convert(varchar, d_crdate, 23) as d_crdate ,d_mdfydate Session["d_PayeeText"] = sdr["d_PayeeText"].ToString(); Session["d_PayeeValue"] = sdr["d_PayeeValue"].ToString(); Session["d_RoomNo"] = sdr["d_RoomNo"].ToString(); Session["d_t_Mobile"] = sdr["d_t_Mobile"].ToString(); Session["d_DuesTypeText"] = sdr["d_DuesTypeText"].ToString(); Session["d_DuesTypeValue"] = sdr["d_DuesTypeValue"].ToString(); Session["d_DuesDate"] = sdr["d_DuesDate"].ToString(); Session["d_DuesMonth"] = sdr["d_DuesMonth"].ToString(); Session["d_reciveddate"] = sdr["d_reciveddate"].ToString(); txtDuesAmount.Text = sdr["d_DuesAmount"].ToString(); txtRecivedAmount.Text = sdr["d_DuesAmount"].ToString(); Session["DueAmount"] = txtDuesAmount.Text; txtRemark.Text = sdr["d_Remark"].ToString(); ddlModeOfPayment.SelectedItem.Text = sdr["d_ModeOfPayment"].ToString(); txtRecivingDate.Text = sdr["d_reciveddate"].ToString(); } } sdr.Close(); }
private void LoadDues(string d_id) { SqlDataReader sdr = ed.GetDues(d_id); if (sdr.HasRows) { if (sdr.Read()) { ddlPayee.SelectedItem.Text = sdr["d_PayeeText"].ToString(); ddlPayee.SelectedItem.Value = sdr["d_PayeeValue"].ToString(); txtRoomNoMobile.Text = sdr["d_RoomNo"].ToString(); string mobile = sdr["d_t_Mobile"].ToString(); ddlDuesType.SelectedItem.Text = sdr["d_DuesTypeText"].ToString(); ddlDuesType.SelectedItem.Value = sdr["d_DuesTypeValue"].ToString(); txtDuesAmount.Text = sdr["d_DuesAmount"].ToString(); txtDuesDate.Text = sdr["d_DuesDate"].ToString(); txtDuesMonth.Text = sdr["d_DuesMonth"].ToString(); txtRemark.Text = sdr["d_Remark"].ToString(); btnDues.Visible = false; btnSaveChenges.Visible = true; ddlPayee.Attributes.Add("disabled", "disabled"); } } sdr.Close(); }