public static AssessmentnCareCommentnDate GetAssessmentnCareCommentnDateByID(int id) { AssessmentnCareCommentnDate assessmentnCareCommentnDate = new AssessmentnCareCommentnDate(); SqlAssessmentnCareCommentnDateProvider sqlAssessmentnCareCommentnDateProvider = new SqlAssessmentnCareCommentnDateProvider(); assessmentnCareCommentnDate = sqlAssessmentnCareCommentnDateProvider.GetAssessmentnCareCommentnDateByID(id); return assessmentnCareCommentnDate; }
public static AssessmentnCareCommentnDate GetAssessmentnCareCommentnDateByID(int id) { AssessmentnCareCommentnDate assessmentnCareCommentnDate = new AssessmentnCareCommentnDate(); SqlAssessmentnCareCommentnDateProvider sqlAssessmentnCareCommentnDateProvider = new SqlAssessmentnCareCommentnDateProvider(); assessmentnCareCommentnDate = sqlAssessmentnCareCommentnDateProvider.GetAssessmentnCareCommentnDateByID(id); return(assessmentnCareCommentnDate); }
private void showAssessmentnCareCommentnDateData() { AssessmentnCareCommentnDate assessmentnCareCommentnDate = new AssessmentnCareCommentnDate(); assessmentnCareCommentnDate = AssessmentnCareCommentnDateManager.GetAssessmentnCareCommentnDateByID(Int32.Parse(Request.QueryString["assessmentnCareCommentnDateID"])); ddlAssessmentnCareDate.SelectedValue = assessmentnCareCommentnDate.AssessmentnCareDateID.ToString(); ddlAssessmentnCareParent.SelectedValue = assessmentnCareCommentnDate.AssessmentnCareParentID.ToString(); txtComment.Text = assessmentnCareCommentnDate.Comment; }
protected void btnAdd_Click(object sender, EventArgs e) { AssessmentnCareCommentnDate assessmentnCareCommentnDate = new AssessmentnCareCommentnDate(); assessmentnCareCommentnDate.AssessmentnCareDateID = Int32.Parse(ddlAssessmentnCareDate.SelectedValue); assessmentnCareCommentnDate.AssessmentnCareParentID = Int32.Parse(ddlAssessmentnCareParent.SelectedValue); assessmentnCareCommentnDate.Comment = txtComment.Text; int resutl = AssessmentnCareCommentnDateManager.InsertAssessmentnCareCommentnDate(assessmentnCareCommentnDate); Response.Redirect("AdminAssessmentnCareCommentnDateDisplay.aspx"); }
protected void btnUpdate_Click(object sender, EventArgs e) { AssessmentnCareCommentnDate assessmentnCareCommentnDate = new AssessmentnCareCommentnDate(); assessmentnCareCommentnDate = AssessmentnCareCommentnDateManager.GetAssessmentnCareCommentnDateByID(Int32.Parse(Request.QueryString["assessmentnCareCommentnDateID"])); AssessmentnCareCommentnDate tempAssessmentnCareCommentnDate = new AssessmentnCareCommentnDate(); tempAssessmentnCareCommentnDate.AssessmentnCareCommentnDateID = assessmentnCareCommentnDate.AssessmentnCareCommentnDateID; tempAssessmentnCareCommentnDate.AssessmentnCareDateID = Int32.Parse(ddlAssessmentnCareDate.SelectedValue); tempAssessmentnCareCommentnDate.AssessmentnCareParentID = Int32.Parse(ddlAssessmentnCareParent.SelectedValue); tempAssessmentnCareCommentnDate.Comment = txtComment.Text; bool result = AssessmentnCareCommentnDateManager.UpdateAssessmentnCareCommentnDate(tempAssessmentnCareCommentnDate); Response.Redirect("AdminAssessmentnCareCommentnDateDisplay.aspx"); }
public bool UpdateAssessmentnCareCommentnDate(AssessmentnCareCommentnDate assessmentnCareCommentnDate) { using (SqlConnection connection = new SqlConnection(this.ConnectionString)) { SqlCommand cmd = new SqlCommand("AL_UpdateAssessmentnCareCommentnDate", connection); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@AssessmentnCareCommentnDateID", SqlDbType.Int).Value = assessmentnCareCommentnDate.AssessmentnCareCommentnDateID; cmd.Parameters.Add("@AssessmentnCareDateID", SqlDbType.Int).Value = assessmentnCareCommentnDate.AssessmentnCareDateID; cmd.Parameters.Add("@AssessmentnCareParentID", SqlDbType.Int).Value = assessmentnCareCommentnDate.AssessmentnCareParentID; cmd.Parameters.Add("@Comment", SqlDbType.NText).Value = assessmentnCareCommentnDate.Comment; connection.Open(); int result = cmd.ExecuteNonQuery(); return(result == 1); } }
public AssessmentnCareCommentnDate GetAssessmentnCareCommentnDateFromReader(IDataReader reader) { try { AssessmentnCareCommentnDate assessmentnCareCommentnDate = new AssessmentnCareCommentnDate ( (int)reader["AssessmentnCareCommentnDateID"], (int)reader["AssessmentnCareDateID"], (int)reader["AssessmentnCareParentID"], reader["Comment"].ToString() ); return(assessmentnCareCommentnDate); } catch (Exception ex) { return(null); } }
public static bool UpdateAssessmentnCareCommentnDate(AssessmentnCareCommentnDate assessmentnCareCommentnDate) { SqlAssessmentnCareCommentnDateProvider sqlAssessmentnCareCommentnDateProvider = new SqlAssessmentnCareCommentnDateProvider(); return sqlAssessmentnCareCommentnDateProvider.UpdateAssessmentnCareCommentnDate(assessmentnCareCommentnDate); }
public static int InsertAssessmentnCareCommentnDate(AssessmentnCareCommentnDate assessmentnCareCommentnDate) { SqlAssessmentnCareCommentnDateProvider sqlAssessmentnCareCommentnDateProvider = new SqlAssessmentnCareCommentnDateProvider(); return sqlAssessmentnCareCommentnDateProvider.InsertAssessmentnCareCommentnDate(assessmentnCareCommentnDate); }
public AssessmentnCareCommentnDate GetAssessmentnCareCommentnDateFromReader(IDataReader reader) { try { AssessmentnCareCommentnDate assessmentnCareCommentnDate = new AssessmentnCareCommentnDate ( (int)reader["AssessmentnCareCommentnDateID"], (int)reader["AssessmentnCareDateID"], (int)reader["AssessmentnCareParentID"], reader["Comment"].ToString() ); return assessmentnCareCommentnDate; } catch(Exception ex) { return null; } }
public bool UpdateAssessmentnCareCommentnDate(AssessmentnCareCommentnDate assessmentnCareCommentnDate) { using (SqlConnection connection = new SqlConnection(this.ConnectionString)) { SqlCommand cmd = new SqlCommand("AL_UpdateAssessmentnCareCommentnDate", connection); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@AssessmentnCareCommentnDateID", SqlDbType.Int).Value = assessmentnCareCommentnDate.AssessmentnCareCommentnDateID; cmd.Parameters.Add("@AssessmentnCareDateID", SqlDbType.Int).Value = assessmentnCareCommentnDate.AssessmentnCareDateID; cmd.Parameters.Add("@AssessmentnCareParentID", SqlDbType.Int).Value = assessmentnCareCommentnDate.AssessmentnCareParentID; cmd.Parameters.Add("@Comment", SqlDbType.NText).Value = assessmentnCareCommentnDate.Comment; connection.Open(); int result = cmd.ExecuteNonQuery(); return result == 1; } }
public static bool UpdateAssessmentnCareCommentnDate(AssessmentnCareCommentnDate assessmentnCareCommentnDate) { SqlAssessmentnCareCommentnDateProvider sqlAssessmentnCareCommentnDateProvider = new SqlAssessmentnCareCommentnDateProvider(); return(sqlAssessmentnCareCommentnDateProvider.UpdateAssessmentnCareCommentnDate(assessmentnCareCommentnDate)); }
public static int InsertAssessmentnCareCommentnDate(AssessmentnCareCommentnDate assessmentnCareCommentnDate) { SqlAssessmentnCareCommentnDateProvider sqlAssessmentnCareCommentnDateProvider = new SqlAssessmentnCareCommentnDateProvider(); return(sqlAssessmentnCareCommentnDateProvider.InsertAssessmentnCareCommentnDate(assessmentnCareCommentnDate)); }