private void LoadQuestionGroupDetail(QuestionGroup obj) { if (obj != null) { txtName.Text = Server.HtmlDecode(obj.Name); txtDescription.Text = Server.HtmlDecode(obj.Description); rblqGroupStatus.SelectedIndex = obj.Status.Trim().Equals("A") ? 0 : 1; } }
protected void lbSave_Click(object sender, EventArgs e) { QuestionGroup obj = new QuestionGroup(1); obj.ID = (GroupID > 0) ? GroupID : -1; obj.Name = txtName.Text; obj.Description = txtDescription.Text; obj.Status = rblqGroupStatus.SelectedValue; obj.Save(); LoadQuestionGroupDetail(obj); }
public QuestionGroup GetQuestionGroup_By_ID(int ID) { QuestionGroup obj = new QuestionGroup(ID,1); const string procName = "GET_QUESTIONGROUPS_BY_ID"; using (dbhQuestionGroup = new DBHelper(ConnectionStrings.DefaultDBConnection)) { dbhQuestionGroup.AddParameter("@id", ID); dbhQuestionGroup.AddParameter("@CURRENTUSERID", mCurrentUserID); IDataReader dr = dbhQuestionGroup.ExecuteReader(procName); while (dr.Read()) { obj = (new QuestionGroup(dr)); } dbhQuestionGroup.Dispose(); } return obj; }
private void GetQuestionGroupDetail() { QuestionGroup obj = new QuestionGroup(GroupID, 1); LoadQuestionGroupDetail(obj); }