protected void btnUpdate_Click(object sender, EventArgs e) { DoctorsOrder doctorsOrder = new DoctorsOrder(); doctorsOrder = DoctorsOrderManager.GetDoctorsOrderByID(Int32.Parse(Request.QueryString["doctorsOrderID"])); DoctorsOrder tempDoctorsOrder = new DoctorsOrder(); tempDoctorsOrder.DoctorsOrderID = doctorsOrder.DoctorsOrderID; tempDoctorsOrder.ClinicalFindings = txtClinicalFindings.Text; tempDoctorsOrder.Orders = txtOrders.Text; tempDoctorsOrder.ResidentID = Int32.Parse(ddlResident.SelectedValue); tempDoctorsOrder.OrderDate = txtOrderDate.Text; tempDoctorsOrder.AddeBy = Int32.Parse(txtAddeBy.Text); tempDoctorsOrder.AddedDate = DateTime.Now; tempDoctorsOrder.UpdatedBy = Int32.Parse(txtUpdatedBy.Text); tempDoctorsOrder.UpdatedDate = txtUpdatedDate.Text; tempDoctorsOrder.ExtraField1 = txtExtraField1.Text; tempDoctorsOrder.ExtraField2 = txtExtraField2.Text; tempDoctorsOrder.ExtraField3 = txtExtraField3.Text; tempDoctorsOrder.ExtraField4 = txtExtraField4.Text; tempDoctorsOrder.ExtraField5 = txtExtraField5.Text; bool result = DoctorsOrderManager.UpdateDoctorsOrder(tempDoctorsOrder); Response.Redirect("AdminDoctorsOrderDisplay.aspx"); }
protected void btnSave_Click(object sender, EventArgs e) { DoctorsOrder doctorsOrder = new DoctorsOrder(); doctorsOrder.ClinicalFindings = txtClinicalFindings.Text; doctorsOrder.Orders = txtOrder.Text; doctorsOrder.ResidentID = Int32.Parse(Request.QueryString["ResidentID"]); doctorsOrder.OrderDate = DateTime.Parse(txtOrderDate.Text); doctorsOrder.AddeBy = getLogin().LoginID; doctorsOrder.AddedDate = DateTime.Now; doctorsOrder.UpdatedBy = getLogin().LoginID; doctorsOrder.UpdatedDate = DateTime.Now; doctorsOrder.ExtraField1 = txtPhysician.Text; doctorsOrder.ExtraField2 = txtMRno.Text; doctorsOrder.ExtraField3 = getStaffNotified(); doctorsOrder.ExtraField4 = ""; doctorsOrder.ExtraField5 = ""; if (ddlExistingRecord.SelectedIndex == 0) { int resutl = DoctorsOrderManager.InsertDoctorsOrder(doctorsOrder); } else { doctorsOrder.DoctorsOrderID = int.Parse(ddlExistingRecord.SelectedValue); DoctorsOrderManager.UpdateDoctorsOrder(doctorsOrder); } loadGrid(); }
protected void lbDelete_Click(object sender, EventArgs e) { LinkButton linkButton = new LinkButton(); linkButton = (LinkButton)sender; bool result = DoctorsOrderManager.DeleteDoctorsOrder(Convert.ToInt32(linkButton.CommandArgument)); showDoctorsOrderGrid(); }
private void loadSelectData() { DoctorsOrder doctorsOrder = DoctorsOrderManager.GetDoctorsOrderByID(int.Parse(ddlExistingRecord.SelectedValue)); txtClinicalFindings.Text = doctorsOrder.ClinicalFindings; txtOrder.Text = doctorsOrder.Orders; txtOrderDate.Text = doctorsOrder.OrderDate.ToString("MM/dd/yyyy hh:mm tt"); txtPhysician.Text = doctorsOrder.ExtraField1; txtMRno.Text = doctorsOrder.ExtraField2; LoadStaffNotified(doctorsOrder.ExtraField3); }
private void loadSelectData(int doctorsOrderID) { DoctorsOrder doctorsOrder = DoctorsOrderManager.GetDoctorsOrderByID(doctorsOrderID); txtClinicalFindings.Text = doctorsOrder.ClinicalFindings; txtOrder.Text = doctorsOrder.Orders; txtOrderDate.Text = doctorsOrder.OrderDate.ToString("MM/dd/yyyy hh:mm tt"); txtPhysician.Text = doctorsOrder.ExtraField1; txtMRno.Text = doctorsOrder.ExtraField2; LoadStaffNotified(doctorsOrder.ExtraField3); }
private void loadDoctorsOrderDate() { ddlExistingRecord.Items.Clear(); ListItem li = new ListItem("New Record", "0"); ddlExistingRecord.Items.Add(li); List <DoctorsOrder> assessmentnCareDates = new List <DoctorsOrder>(); assessmentnCareDates = DoctorsOrderManager.GetAllDoctorsOrdersByResidentID(int.Parse(Request.QueryString["ResidentID"])); foreach (DoctorsOrder assessmentnCareDate in assessmentnCareDates) { ListItem item = new ListItem(assessmentnCareDate.OrderDate.ToString("yyyy-MM-dd hh:mm tt"), assessmentnCareDate.DoctorsOrderID.ToString()); ddlExistingRecord.Items.Add(item); } }
private void showDoctorsOrderData() { DoctorsOrder doctorsOrder = new DoctorsOrder(); doctorsOrder = DoctorsOrderManager.GetDoctorsOrderByID(Int32.Parse(Request.QueryString["doctorsOrderID"])); txtClinicalFindings.Text = doctorsOrder.ClinicalFindings; txtOrders.Text = doctorsOrder.Orders; ddlResident.SelectedValue = doctorsOrder.ResidentID.ToString(); txtOrderDate.Text = doctorsOrder.OrderDate; txtAddeBy.Text = doctorsOrder.AddeBy.ToString(); txtUpdatedBy.Text = doctorsOrder.UpdatedBy.ToString(); txtUpdatedDate.Text = doctorsOrder.UpdatedDate; txtExtraField1.Text = doctorsOrder.ExtraField1; txtExtraField2.Text = doctorsOrder.ExtraField2; txtExtraField3.Text = doctorsOrder.ExtraField3; txtExtraField4.Text = doctorsOrder.ExtraField4; txtExtraField5.Text = doctorsOrder.ExtraField5; }
protected void btnAdd_Click(object sender, EventArgs e) { DoctorsOrder doctorsOrder = new DoctorsOrder(); doctorsOrder.ClinicalFindings = txtClinicalFindings.Text; doctorsOrder.Orders = txtOrders.Text; doctorsOrder.ResidentID = Int32.Parse(ddlResident.SelectedValue); doctorsOrder.OrderDate = txtOrderDate.Text; doctorsOrder.AddeBy = Int32.Parse(txtAddeBy.Text); doctorsOrder.AddedDate = DateTime.Now; doctorsOrder.UpdatedBy = Int32.Parse(txtUpdatedBy.Text); doctorsOrder.UpdatedDate = txtUpdatedDate.Text; doctorsOrder.ExtraField1 = txtExtraField1.Text; doctorsOrder.ExtraField2 = txtExtraField2.Text; doctorsOrder.ExtraField3 = txtExtraField3.Text; doctorsOrder.ExtraField4 = txtExtraField4.Text; doctorsOrder.ExtraField5 = txtExtraField5.Text; int resutl = DoctorsOrderManager.InsertDoctorsOrder(doctorsOrder); Response.Redirect("AdminDoctorsOrderDisplay.aspx"); }
private void showDoctorsOrderGrid() { gvDoctorsOrder.DataSource = DoctorsOrderManager.GetAllDoctorsOrders(); gvDoctorsOrder.DataBind(); }