public ActionResult GetListPengambilanObat() { var _draw = Request.Form.GetValues("draw").FirstOrDefault(); var _start = Request.Form.GetValues("start").FirstOrDefault(); var _length = Request.Form.GetValues("length").FirstOrDefault(); var _sortColumn = Request.Form.GetValues("columns[" + Request.Form.GetValues("order[0][column]").FirstOrDefault() + "][name]").FirstOrDefault(); var _sortColumnDir = Request.Form.GetValues("order[0][dir]").FirstOrDefault(); var _searchValue = Request.Form.GetValues("search[value]").FirstOrDefault(); int _pageSize = _length != null?Convert.ToInt32(_length) : 0; int _skip = _start != null?Convert.ToInt32(_start) : 0; var request = new PharmacyRequest { Draw = _draw, SearchValue = _searchValue, SortColumn = _sortColumn, SortColumnDir = _sortColumnDir, PageSize = _pageSize, Skip = _skip, }; if (Session["UserLogon"] != null) { request.Account = (AccountModel)Session["UserLogon"]; } var response = new PharmacyHandler(_unitOfWork).GetListPengambilanObat(request); return(Json(new { data = response.Data, recordsFiltered = response.RecordsFiltered, recordsTotal = response.RecordsTotal, draw = response.Draw }, JsonRequestBehavior.AllowGet)); }
public void FillFields(int ID) { PharmacyHandler PharmacyHandler = new PharmacyHandler(); PharmacyHandler.DoFillBackPanelAction(ID); DataTable Data = PharmacyHandler.dt; MessageCollection.copyFrom(PharmacyHandler.MessageCollection); if (MessageCollection.isErrorOccured) { MessageCollection.PublishLog(); lbl_err.Text = MessageCollection.Messages[MessageCollection.Messages.Count - 1].ErrorMessage; lbl_err.Visible = true; } else { txt_addr.Text = Data.Rows[0]["Address"].ToString(); txt_cnumber.Text = Data.Rows[0]["ContactNumber"].ToString(); txt_desc.Text = Data.Rows[0]["Description"].ToString(); txt_email.Text = Data.Rows[0]["Email"].ToString(); txt_name.Text = Data.Rows[0]["Name"].ToString(); txt_id.Text = Data.Rows[0]["ID"].ToString(); } }
public ActionResult GetPharmacyQueueFromPoli(string clinics, string status) { var _draw = Request.Form.GetValues("draw").FirstOrDefault(); var _start = Request.Form.GetValues("start").FirstOrDefault(); var _length = Request.Form.GetValues("length").FirstOrDefault(); var _sortColumn = Request.Form.GetValues("columns[" + Request.Form.GetValues("order[0][column]").FirstOrDefault() + "][name]").FirstOrDefault(); var _sortColumnDir = Request.Form.GetValues("order[0][dir]").FirstOrDefault(); var _searchValue = Request.Form.GetValues("search[value]").FirstOrDefault(); int _pageSize = _length != null?Convert.ToInt32(_length) : 0; int _skip = _start != null?Convert.ToInt32(_start) : 0; var request = new LoketRequest { Draw = _draw, SearchValue = _searchValue, SortColumn = _sortColumn, SortColumnDir = _sortColumnDir, PageSize = _pageSize, Skip = _skip, Data = new LoketModel { ClinicID = Convert.ToInt32(clinics), PoliToID = (int)PoliEnum.Farmasi } }; if (Session["UserLogon"] != null) { request.Data.Account = (AccountModel)Session["UserLogon"]; } var response = new PharmacyHandler(_unitOfWork).GetListData(request); return(Json(new { data = response.Data, recordsFiltered = response.RecordsFiltered, recordsTotal = response.RecordsTotal, draw = response.Draw }, JsonRequestBehavior.AllowGet)); }
public void FillGrid() { PharmacyHandler PharmacyHandler = new PharmacyHandler(); PharmacyHandler.DoFillGridAction(); DataTable gridData = PharmacyHandler.dt; MessageCollection.copyFrom(PharmacyHandler.MessageCollection); if (MessageCollection.isErrorOccured) { MessageCollection.PublishLog(); lbl_err.Text = MessageCollection.Messages[MessageCollection.Messages.Count - 1].ErrorMessage; lbl_err.Visible = true; } gridView.DataSource = gridData; gridView.DataBind(); }
public void DoDeleteAction() { PharmacyHandler PharmacyHandler = new PharmacyHandler(); PharmacyHandler.Delete(Convert.ToInt32(txt_id.Text)); MessageCollection.copyFrom(PharmacyHandler.MessageCollection); if (MessageCollection.isErrorOccured) { MessageCollection.PublishLog(); lbl_err.Text = MessageCollection.Messages[MessageCollection.Messages.Count - 1].ErrorMessage; lbl_err.Visible = true; } else { lbl_err.Text = "Record Deleted Successfully"; lbl_err.ForeColor = System.Drawing.Color.Green; } }
public JsonResult UpdateStatusObat() { var response = new PharmacyResponse(); var request = new PharmacyRequest { }; if (Request.Form["idFrmMedDetail"] != null) { request.idSelectedobat = JsonConvert.DeserializeObject <List <long> >(Request.Form["idFrmMedDetail"]); } if (Session["UserLogon"] != null) { request.Account = (AccountModel)Session["UserLogon"]; } response = new PharmacyHandler(_unitOfWork, _context).UpdateStatusObat(request); return(Json(new { Status = response.Status.ToString().TrimStart(), Message = response.Message }, JsonRequestBehavior.AllowGet)); }
public ActionResult GetListObatPasien() { var _draw = Request.Form.GetValues("draw").FirstOrDefault(); var _start = Request.Form.GetValues("start").FirstOrDefault(); var _length = Request.Form.GetValues("length").FirstOrDefault(); // var _sortColumn = Request.Form.GetValues("columns[" + Request.Form.GetValues("order[0][column]").FirstOrDefault() + "][name]").FirstOrDefault(); // var _sortColumnDir = Request.Form.GetValues("order[0][dir]").FirstOrDefault(); var _searchValue = Request.Form.GetValues("search[value]").FirstOrDefault(); int _pageSize = _length != null?Convert.ToInt32(_length) : 0; int _skip = _start != null?Convert.ToInt32(_start) : 0; var request = new PharmacyRequest { Draw = _draw, SearchValue = _searchValue, PageSize = _pageSize, Skip = _skip, }; if (Session["UserLogon"] != null) { request.Account = (AccountModel)Session["UserLogon"]; } long _formMedId = 0; if (Request.QueryString["frmmedid"] != null) { _formMedId = Convert.ToInt64(Request.QueryString["frmmedid"].ToString()); } if (request.Data == null) { request.Data = new PrescriptionModel(); } request.Data.FormMedicalID = _formMedId; var response = new PharmacyHandler(_unitOfWork).ListAllObat(request); return(Json(new { data = response.Data, recordsFiltered = response.RecordsFiltered, recordsTotal = response.RecordsTotal, draw = response.Draw }, JsonRequestBehavior.AllowGet)); }
public ActionResult ListAllGivenMedicine() { long _formMedId = 0; if (Request.QueryString["frmmedid"] != null) { _formMedId = Convert.ToInt64(Request.QueryString["frmmedid"].ToString()); } var _model = new FormExamineMedicineDetailModel { }; _model.IdDetailsChecked = new PharmacyHandler(_unitOfWork).GetMedicineWasReceivedByPatient(_formMedId); var _pasien = new PharmacyHandler(_unitOfWork).GetPatientDataBasedOnFrmMedical(_formMedId); ViewBag.NamaPatient = _pasien.Name; ViewBag.Birthdate = _pasien.BirthDateStr; return(View(_model)); }
public void DoUpdateAction() { var Model = MapToObject(); PharmacyHandler PharmacyHandler = new PharmacyHandler(); PharmacyHandler.Update(Model); MessageCollection.copyFrom(PharmacyHandler.MessageCollection); if (MessageCollection.isErrorOccured) { MessageCollection.PublishLog(); lbl_err.Text = MessageCollection.Messages[MessageCollection.Messages.Count - 1].ErrorMessage; lbl_err.Visible = true; } else { lbl_err.Text = "Record Updated Successfully"; lbl_err.ForeColor = System.Drawing.Color.Green; } }