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"); }