protected void lbDelete_Click(object sender, EventArgs e) { LinkButton linkButton = new LinkButton(); linkButton = (LinkButton)sender; bool result = ObservationNoteManager.DeleteObservationNote(Convert.ToInt32(linkButton.CommandArgument)); showObservationNoteGrid(); }
private void loadGrid() { if (ddlObservationTypeForView.SelectedValue == "0") { gvObservationNote.DataSource = ObservationNoteManager.GetAllObservationNotesByResidentID(int.Parse(Request.QueryString["ResidentID"])); gvObservationNote.DataBind(); } else { gvObservationNote.DataSource = ObservationNoteManager.GetAllObservationNotesByResidentIDWithType(int.Parse(Request.QueryString["ResidentID"]), int.Parse(ddlObservationTypeForView.SelectedValue)); gvObservationNote.DataBind(); } }
private void showObservationNoteData() { ObservationNote observationNote = new ObservationNote(); observationNote = ObservationNoteManager.GetObservationNoteByID(Int32.Parse(Request.QueryString["observationNoteID"])); txtNote.Text = observationNote.Note; ddlResident.SelectedValue = observationNote.ResidentID.ToString(); txtAddeBy.Text = observationNote.AddeBy.ToString(); txtExtraField1.Text = observationNote.ExtraField1; txtExtraField2.Text = observationNote.ExtraField2; txtExtraField3.Text = observationNote.ExtraField3; txtExtraField4.Text = observationNote.ExtraField4; txtExtraField5.Text = observationNote.ExtraField5; }
protected void btnAdd_Click(object sender, EventArgs e) { ObservationNote observationNote = new ObservationNote(); observationNote.Note = txtObservationOrComment.Text; observationNote.ResidentID = Int32.Parse(Request.QueryString["ResidentID"]); observationNote.AddeBy = getLogin().LoginID; observationNote.AddedDate = DateTime.Parse(DateTime.Parse(txtDate.Text).ToString("yyyy-MM-dd") + " " + txtTakingTime.Text); observationNote.ExtraField1 = txtMadeBy.Text; observationNote.ExtraField2 = ddlObservationType.SelectedValue; observationNote.ExtraField3 = ""; observationNote.ExtraField4 = ""; observationNote.ExtraField5 = ""; int resutl = ObservationNoteManager.InsertObservationNote(observationNote); loadGrid(); }
protected void btnAdd_Click(object sender, EventArgs e) { ObservationNote observationNote = new ObservationNote(); observationNote.Note = txtNote.Text; observationNote.ResidentID = Int32.Parse(ddlResident.SelectedValue); observationNote.AddeBy = Int32.Parse(txtAddeBy.Text); observationNote.AddedDate = DateTime.Now; observationNote.ExtraField1 = txtExtraField1.Text; observationNote.ExtraField2 = txtExtraField2.Text; observationNote.ExtraField3 = txtExtraField3.Text; observationNote.ExtraField4 = txtExtraField4.Text; observationNote.ExtraField5 = txtExtraField5.Text; int resutl = ObservationNoteManager.InsertObservationNote(observationNote); Response.Redirect("AdminObservationNoteDisplay.aspx"); }
protected void btnUpdate_Click(object sender, EventArgs e) { ObservationNote observationNote = new ObservationNote(); observationNote = ObservationNoteManager.GetObservationNoteByID(Int32.Parse(Request.QueryString["observationNoteID"])); ObservationNote tempObservationNote = new ObservationNote(); tempObservationNote.ObservationNoteID = observationNote.ObservationNoteID; tempObservationNote.Note = txtNote.Text; tempObservationNote.ResidentID = Int32.Parse(ddlResident.SelectedValue); tempObservationNote.AddeBy = Int32.Parse(txtAddeBy.Text); tempObservationNote.AddedDate = DateTime.Now; tempObservationNote.ExtraField1 = txtExtraField1.Text; tempObservationNote.ExtraField2 = txtExtraField2.Text; tempObservationNote.ExtraField3 = txtExtraField3.Text; tempObservationNote.ExtraField4 = txtExtraField4.Text; tempObservationNote.ExtraField5 = txtExtraField5.Text; bool result = ObservationNoteManager.UpdateObservationNote(tempObservationNote); Response.Redirect("AdminObservationNoteDisplay.aspx"); }
private void showObservationNoteGrid() { gvObservationNote.DataSource = ObservationNoteManager.GetAllObservationNotes(); gvObservationNote.DataBind(); }