private void initConfig() { lis = new Lis(); lDgs = new List <Lis>(); lis.lis_id = "lis_id"; lis.barcode = "barcode"; lis.req_id = "req_id"; lis.visit_vn = "visit_vn"; lis.visit_hn = "visit_hn"; lis.patient_name = "patient_name"; lis.visit_id = "visit_id"; lis.message_lis = "message_lis"; lis.active = "active"; lis.remark = "remark"; lis.date_create = "date_create"; lis.date_modi = "date_modi"; lis.date_cancel = "date_cancel"; lis.user_create = "user_create"; lis.user_modi = "user_modi"; lis.user_cancel = "user_cancel"; lis.statis_lis = "status_lis"; lis.date_time_receive = "date_time_receive"; lis.date_time_finish = "date_time_finish"; lis.lab_id = "lab_id"; //lis.status_ipd = "status_ipd"; //lis.an_cnt = "an_cnt"; //lis.folder_ftp = "folder_ftp"; lis.table = "lab_t_lis"; lis.pkField = "lis_id"; }
private void chkNull(Lis p) { long chk = 0; p.date_modi = p.date_modi == null ? "" : p.date_modi; p.date_cancel = p.date_cancel == null ? "" : p.date_cancel; p.user_create = p.user_create == null ? "" : p.user_create; p.user_modi = p.user_modi == null ? "" : p.user_modi; p.user_cancel = p.user_cancel == null ? "" : p.user_cancel; p.visit_vn = p.visit_vn == null ? "" : p.visit_vn; p.visit_hn = p.visit_hn == null ? "" : p.visit_hn; p.patient_name = p.patient_name == null ? "" : p.patient_name; p.visit_id = p.visit_id == null ? "" : p.visit_id; p.message_lis = p.message_lis == null ? "" : p.message_lis; p.remark = p.remark == null ? "" : p.remark; p.statis_lis = p.statis_lis == null ? "0" : p.statis_lis; p.date_time_finish = p.date_time_finish == null ? "" : p.date_time_finish; p.lab_id = p.lab_id == null ? "" : p.lab_id; p.date_time_receive = p.date_time_receive == null ? "" : p.date_time_receive; p.barcode = p.barcode == null ? "" : p.barcode; //p.statis_lis = p.statis_lis == null ? "0" : p.statis_lis; p.barcode = long.TryParse(p.barcode, out chk) ? chk.ToString() : "0"; p.req_id = long.TryParse(p.req_id, out chk) ? chk.ToString() : "0"; p.lab_id = long.TryParse(p.lab_id, out chk) ? chk.ToString() : "0"; //p.date_time_finish = int.TryParse(p.date_time_finish, out chk) ? chk.ToString() : "0"; //p.doctor_id = int.TryParse(p.doctor_id, out chk) ? chk.ToString() : "0"; }
public Lis setLis1(Lis dgs1) { dgs1.lis_id = ""; dgs1.barcode = ""; dgs1.req_id = ""; dgs1.visit_vn = ""; dgs1.visit_hn = ""; dgs1.patient_name = ""; dgs1.visit_id = ""; dgs1.message_lis = ""; dgs1.active = ""; dgs1.remark = ""; dgs1.date_create = ""; dgs1.date_modi = ""; dgs1.date_cancel = ""; dgs1.user_create = ""; dgs1.user_modi = ""; dgs1.user_cancel = ""; dgs1.statis_lis = ""; dgs1.date_time_receive = ""; dgs1.date_time_finish = ""; dgs1.lab_id = ""; //dgs1.status_ipd = ""; //dgs1.an_cnt = ""; //dgs1.folder_ftp = ""; return(dgs1); }
private void Lis_MouseDown(object sender, MouseEventArgs e) { Lis.PointToClient(new Point(e.X, e.Y)); switch (e.Button) { case MouseButtons.Middle: Lis.Invalidate(); Lis.SelectedItems.Clear(); Lis.GetItemAt(e.X, e.Y).Selected = true; new SoundFontInfo(Lis.GetItemAt(e.X, e.Y).Text).ShowDialog(); break; } }
public DataTable selectByPk1(String id) { Lis cop1 = new Lis(); DataTable dt = new DataTable(); String sql = "select * " + "From " + lis.table + " dsc " + //"Left Join f_patient_prefix pfx On stf.prefix_id = pfx.f_patient_prefix_id " + "Where dsc." + lis.pkField + " ='" + id + "' " + "Order By barcode "; dt = conn.selectData(conn.conn, sql); return(dt); }
public DataTable selectByVn(String patient_name, String statis_lis) { Lis cop1 = new Lis(); DataTable dt = new DataTable(); String sql = "select * " + "From " + lis.table + " dsc " + //"Left Join f_patient_prefix pfx On stf.prefix_id = pfx.f_patient_prefix_id " + "Where dsc." + lis.patient_name + " ='" + patient_name + "' and dsc." + lis.visit_id + "='" + statis_lis + "' and dsc." + lis.active + "='1'" + "Order By barcode "; dt = conn.selectData(conn.conn, sql); return(dt); }
/// <summary> /// 生成该层的轨道 /// </summary> /// <param name="left"></param> /// <param name="right"></param> private void Pathwayactive(Vector3 left, Vector3 right) { GameObject _gameObject = new GameObject(); Vector3 NitVec = new Vector3(0, gameObject.transform.Find("leftnorth").position.y, 0).normalized; _gameObject.transform.SetParent(gameObject.transform); LineRenderer lineRenderer = _gameObject.AddComponent <LineRenderer>(); lineRenderer.GetComponent <LineRenderer>().SetPosition(0, left - NitVec * 0.02f); lineRenderer.GetComponent <LineRenderer>().SetPosition(1, right - NitVec * 0.02f); lineRenderer.startWidth = 0.1f; lineRenderer.endWidth = 0.1f; lineRenderer.material = Mat; Lis.Add(_gameObject); }
public String insertLis(Lis p, String userId) { String re = ""; if (p.lis_id.Equals("")) { re = insert(p, userId); updateBarcode(re); } else { re = update(p, userId); } return(re); }
public JsonResult LoadCreateAnalysisInstance(string ProjectId) { GeneralList sP_ = _Base.GetInstanceDropdown(ProjectId); List <Lis> Result = new List <Lis>(); for (int i = 0; i < sP_._List.Count; i++) { var A = Guid.Parse(sP_._List[i].Value); Boolean S = GetInstanceStatus(A); if (S) { Lis List = new Lis(); List.Name = sP_._List[i].Name.ToString(); List.Value = sP_._List[i].Value.ToString(); Result.Add(List); } } SelectList items = new SelectList(Result, "Value", "Name"); return(Json(items, JsonRequestBehavior.AllowGet)); }
public String selectRowNoByHnVn(String patient_name, String visit_id, String docgid) { String re = "0", re1 = ""; int chk = 0; Lis cop1 = new Lis(); DataTable dt = new DataTable(); String sql = "select max(" + lis.req_id + ") as " + lis.req_id + " " + "From " + lis.table + " dsc " + //"Left Join f_patient_prefix pfx On stf.prefix_id = pfx.f_patient_prefix_id " + "Where dsc." + lis.patient_name + " ='" + patient_name + "' and dsc." + lis.barcode + "='" + docgid + "' and dsc." + lis.visit_id + "='" + visit_id + "' " + " "; dt = conn.selectData(conn.conn, sql); if (dt.Rows.Count > 0) { re1 = dt.Rows[0][lis.req_id].ToString(); int.TryParse(re1, out chk); chk++; re = chk.ToString(); } return(re); }
public String update(Lis p, String userId) { String re = ""; String sql = ""; int chk = 0; chkNull(p); sql = "Update " + lis.table + " Set " + " " + lis.barcode + " = '" + p.barcode + "'" + "," + lis.req_id + " = '" + p.req_id + "'" + "," + lis.visit_vn + " = '" + p.visit_vn + "'" + "," + lis.visit_hn + " = '" + p.visit_hn + "'" + "," + lis.patient_name + " = '" + p.patient_name + "'" + "," + lis.visit_id + " = '" + p.visit_id + "'" + "," + lis.message_lis + " = '" + p.message_lis + "'" + "," + lis.remark + " = '" + p.remark + "'" + "," + lis.date_modi + " = now()" + "," + lis.user_modi + " = '" + userId + "'" + "," + lis.statis_lis + " = '" + p.statis_lis + "'" + "," + lis.date_time_receive + " = '" + p.date_time_receive + "'" + "," + lis.date_time_finish + " = '" + p.date_time_finish + "'" + "," + lis.lab_id + " = '" + p.lab_id + "'" + //"," + lis.status_ipd + " = '" + p.status_ipd + "'" + //"," + lis.an_cnt + " = '" + p.an_cnt + "'" + //"," + lis.folder_ftp + " = '" + p.folder_ftp + "'" + "Where " + lis.pkField + "='" + p.lis_id + "'" ; try { re = conn.ExecuteNonQuery(conn.conn, sql); } catch (Exception ex) { sql = ex.Message + " " + ex.InnerException; } return(re); }
public void getlBsp() { //lDept = new List<Position>(); lDgs.Clear(); DataTable dt = new DataTable(); dt = selectAll(); foreach (DataRow row in dt.Rows) { Lis itm1 = new Lis(); itm1.lis_id = row[lis.lis_id].ToString(); itm1.barcode = row[lis.barcode].ToString(); itm1.req_id = row[lis.req_id].ToString(); itm1.visit_vn = row[lis.visit_vn].ToString(); itm1.visit_hn = row[lis.visit_hn].ToString(); itm1.patient_name = row[lis.patient_name].ToString(); itm1.visit_id = row[lis.visit_id].ToString(); itm1.message_lis = row[lis.message_lis].ToString(); itm1.active = row[lis.active].ToString(); itm1.remark = row[lis.remark].ToString(); itm1.date_create = row[lis.date_create].ToString(); itm1.date_modi = row[lis.date_modi].ToString(); itm1.date_cancel = row[lis.date_cancel].ToString(); itm1.user_create = row[lis.user_create].ToString(); itm1.user_modi = row[lis.user_modi].ToString(); itm1.user_cancel = row[lis.user_cancel].ToString(); itm1.statis_lis = row[lis.statis_lis].ToString(); itm1.date_time_receive = row[lis.date_time_receive].ToString(); itm1.date_time_finish = row[lis.date_time_finish].ToString(); itm1.lab_id = row[lis.lab_id].ToString(); //itm1.status_ipd = row[lis.status_ipd].ToString(); //itm1.an_cnt = row[lis.an_cnt].ToString(); lDgs.Add(itm1); } }
public Lis setLis(DataTable dt) { Lis dgs1 = new Lis(); if (dt.Rows.Count > 0) { dgs1.lis_id = dt.Rows[0][lis.lis_id].ToString(); dgs1.barcode = dt.Rows[0][lis.barcode].ToString(); dgs1.req_id = dt.Rows[0][lis.req_id].ToString(); dgs1.visit_vn = dt.Rows[0][lis.visit_vn].ToString(); dgs1.visit_hn = dt.Rows[0][lis.visit_hn].ToString(); dgs1.patient_name = dt.Rows[0][lis.patient_name].ToString(); dgs1.visit_id = dt.Rows[0][lis.visit_id].ToString(); dgs1.message_lis = dt.Rows[0][lis.message_lis].ToString(); dgs1.active = dt.Rows[0][lis.active].ToString(); dgs1.remark = dt.Rows[0][lis.remark].ToString(); dgs1.date_create = dt.Rows[0][lis.date_create].ToString(); dgs1.date_modi = dt.Rows[0][lis.date_modi].ToString(); dgs1.date_cancel = dt.Rows[0][lis.date_cancel].ToString(); dgs1.user_create = dt.Rows[0][lis.user_create].ToString(); dgs1.user_modi = dt.Rows[0][lis.user_modi].ToString(); dgs1.user_cancel = dt.Rows[0][lis.user_cancel].ToString(); dgs1.statis_lis = dt.Rows[0][lis.statis_lis].ToString(); dgs1.date_time_receive = dt.Rows[0][lis.date_time_receive].ToString(); dgs1.date_time_finish = dt.Rows[0][lis.date_time_finish].ToString(); dgs1.lab_id = dt.Rows[0][lis.lab_id].ToString(); dgs1.visit_id = dt.Rows[0][lis.visit_id].ToString(); //dgs1.an_cnt = dt.Rows[0][lis.an_cnt].ToString(); //dgs1.folder_ftp = dt.Rows[0][lis.an_cnt].ToString(); } else { setLis1(dgs1); } return(dgs1); }
// GET: Home public ActionResult Home() { int Count = 1; int Sce = 0; if (Session["loginid"].ToString() != null) { Lis Status = _Base.SpConvertionStatus(Session["InstanceId"].ToString()); Count = Convert.ToInt32(Status.Value); } int userType = 0; if (User.IsInRole("Admin")) { userType = 1; } else if (User.IsInRole("Consultant")) { userType = 2; } else if (User.IsInRole("Customer")) { userType = 3; } GeneralList sP_ = _Base.spCustomerDropdown(Session["loginid"].ToString(), userType); ViewBag.Customer = new SelectList(sP_._List, "Value", "Name"); Guid InstanceID = Guid.Parse(Session["InstanceId"].ToString()); int inst = 0; if (InstanceID != Guid.Empty) { var ProId = db.Instances.Where(x => x.Instance_id == InstanceID).FirstOrDefault().Project_ID; Sce = db.Projects.Where(x => x.isActive == true && x.Project_Id == ProId).FirstOrDefault().ScenarioId; var q = from u in db.Instances where (u.Instance_id == InstanceID && u.AssessmentUploadStatus == true) orderby u.InstaceName select u; if (q.Count() > 0) { inst = 1; } else { inst = 0; } } ViewBag.Instance = inst; List <SelectListItem> Project = new List <SelectListItem>(); if (User.IsInRole("Customer")) { Guid LoginId = Guid.Parse(Session["loginid"].ToString()); var Data = (from a in db.UserMasters join b in db.Projects on a.Customer_Id equals b.Customer_Id where a.UserId == LoginId && b.isActive == true orderby b.Project_Name select new { b.Project_Id, b.Project_Name }).ToList(); if (Data.Count() > 0) { foreach (var v in Data) { Project.Add(new SelectListItem { Text = v.Project_Name, Value = v.Project_Id.ToString() }); } } } else if (User.IsInRole("Project Manager")) { Guid LoginId = Guid.Parse(Session["loginid"].ToString()); var Data = (from a in db.UserMasters join b in db.Projects on a.UserId equals b.ProjectManager_Id where a.UserId == LoginId && b.isActive == true orderby b.Project_Name select new { b.Project_Id, b.Project_Name }).ToList(); if (Data.Count() > 0) { foreach (var v in Data) { Project.Add(new SelectListItem { Text = v.Project_Name, Value = v.Project_Id.ToString() }); } } } //var task = (from u in db.ProjectMonitors // join v in db.ActivityMasters on u.ActivityID equals v.Activity_ID // join w in db.StatusMasters on u.StatusId equals w.Id // join x in db.UserMasters on u.UserID equals x.UserId // join P in db.PhaseMasters on u.PhaseId equals P.Id // where u.InstanceID == InstanceID // orderby u.Modified_On descending // select new { v.Task, x.Name,P.PhaseName, w.StatusName, u.Planed__En_Date }).ToList().Take(5); //dynamic output = new List<dynamic>(); //foreach (var inputAttribute in task) //{ // dynamic row = new ExpandoObject(); // row.Task = inputAttribute.Task; // row.Name = inputAttribute.Name; // row.StatusName = inputAttribute.StatusName; // row.Planed__En_Date = inputAttribute.Planed__En_Date; // row.PhaseName = inputAttribute.PhaseName; // output.Add(row); //} ViewBag.count = Count; //ViewBag.Taskdetails = output; ViewBag.Project = Project; ViewBag.Scen = Sce; //Mail m = new Mail(); //m.SendEmail(); return(View()); }
// Use this for initialization void Start() { lis = gameObject.GetComponentInParent <Lis>(); theScale = lis.transform.localScale; }
public static int FindMin(Lis <int> numbers) { }
private void ContextMenu_edit(object sender, System.EventArgs e) { String chk1 = "", name = "", id = "", vsid = "", resid = ""; if (grfReq.Row < 0) { return; } id = grfReq[grfReq.Row, colReqId] != null ? grfReq[grfReq.Row, colReqId].ToString() : ""; vsid = grfReq[grfReq.Row, colReqVsId] != null ? grfReq[grfReq.Row, colReqVsId].ToString() : ""; if (id.Length <= 0) { return; } ic.cStf.staff_id = ""; FrmPasswordConfirm frm1 = new FrmPasswordConfirm(ic); frm1.ShowDialog(this); if (!ic.cStf.staff_id.Equals("")) { LabRequest req = new LabRequest(); req = ic.ivfDB.lbReqDB.selectByPk1(id); if (req.status_req.Equals("2") || req.status_req.Equals("4")) { // มีคนอื่น double click รับ request ไปแล้ว ที่ ดัก status เพราะ กัน รับ request แล้ว เกิด record ซ้อนกัน 2 record } else { DataTable dtVs = new DataTable(); dtVs = ic.ivfDB.lbReqDB.selectLabBloodByVsid(vsid); foreach (DataRow rowVs in dtVs.Rows) { String id1 = ""; id1 = rowVs[ic.ivfDB.lbReqDB.lbReq.req_id].ToString(); LabRequest lbreq = new LabRequest(); lbreq = ic.ivfDB.lbReqDB.selectByPk1(id1); if (lbreq.req_id.Length <= 0) { continue; } Lis lis = new Lis(); lis.lis_id = ""; lis.barcode = ""; lis.req_id = lbreq.req_id; lis.visit_vn = lbreq.vn; if (lbreq.name_female.Length > 0) { lis.patient_name = lbreq.name_female; lis.visit_hn = lbreq.hn_female; } else { lis.patient_name = lbreq.name_male; lis.visit_hn = lbreq.hn_male; } lis.visit_id = lbreq.visit_id; lis.message_lis = ""; lis.active = ""; lis.remark = ""; lis.date_create = ""; lis.date_modi = ""; lis.date_cancel = ""; lis.user_create = ""; lis.user_modi = ""; lis.user_cancel = ""; lis.statis_lis = ""; lis.date_time_receive = ""; lis.date_time_finish = ""; lis.lab_id = lbreq.item_id; String re = "", re1 = "", re2 = ""; long chk = 0, chk2 = 0; re1 = ic.ivfDB.lisDB.insertLis(lis, ic.cStf.staff_id); if (long.TryParse(re1, out chk)) { LabResult lbRes = new LabResult(); OldLabItem labi = new OldLabItem(); labi = ic.ivfDB.oLabiDB.selectByPk1(lbreq.item_id); lbRes.result_id = ""; lbRes.lis_id = re1; lbRes.req_id = lbreq.req_id; lbRes.visit_id = lbreq.visit_id; lbRes.patient_id = ""; lbRes.lab_id = lbreq.item_id; lbRes.result = ""; lbRes.method = ""; lbRes.active = ""; lbRes.remark = ""; lbRes.date_create = ""; lbRes.date_modi = ""; lbRes.date_cancel = ""; lbRes.user_create = ""; lbRes.user_modi = ""; lbRes.user_cancel = ""; lbRes.unit = ""; lbRes.sort1 = ""; lbRes.staff_id_result = ""; lbRes.staff_id_approve = ""; lbRes.date_time_result = ""; lbRes.date_time_approve = ""; lbRes.normal_value = labi.normal_vaule; lbRes.interpret = ""; lbRes.status_result = "1"; lbRes.row1 = "0"; DateTime date1 = new DateTime(); DateTime.TryParse(lbreq.req_time, out date1); //lbRes.req_date_time = date1.Year+"-"+ date1.ToString("MM-dd")+" " + date1.ToString("HH:mm:ss"); lbRes.req_date_time = lbreq.req_time; lbRes.date_time_receive = System.DateTime.Now.Year + "-" + System.DateTime.Now.ToString("MM-dd HH:mm:ss"); lbRes.doctor_id = lbreq.doctor_id; lbRes.date_time_collect = lbRes.req_date_time; lbRes.remark_nurse = lbreq.remark; re2 = ic.ivfDB.lbresDB.insertLabResult(lbRes, ic.cStf.staff_id); if (long.TryParse(re2, out chk2)) { resid = re2; re = ic.ivfDB.lbReqDB.UpdateStatusRequestAccept(lbreq.req_id, ic.cStf.staff_id); chk = 0; if (long.TryParse(re, out chk)) { // ยังไม่ได้ต่อ LIS 62-08-03 //try //{ // SetDefaultPrinter(ic.iniC.printerSticker); // Lis lis1 = new Lis(); // lis1 = ic.ivfDB.lisDB.selectByPk(re1); // Visit vs = new Visit(); // vs = ic.ivfDB.vsDB.selectByVn(lis1.visit_vn); // Patient ptt = new Patient(); // ptt = ic.ivfDB.pttDB.selectByPk1(vs.t_patient_id); // DataTable dt = new DataTable(); // dt.Columns.Add("hn", typeof(String)); // dt.Columns.Add("name", typeof(String)); // dt.Columns.Add("age", typeof(String)); // dt.Columns.Add("vn", typeof(String)); // DataRow row11 = dt.NewRow(); // row11["hn"] = lis1.visit_hn; // row11["name"] = lis1.patient_name; // row11["age"] = "Age " + ptt.AgeStringShort() + " [" + ic.datetoShow(ptt.patient_birthday) + "]"; // row11["vn"] = lis1.barcode; // dt.Rows.Add(row11); // FrmReport frm = new FrmReport(ic); // frm.setStickerPatientThemalLIS(dt); // frm.ShowDialog(this); // SetDefaultPrinter(ic.iniC.printerSticker); //} //catch (Exception ex) //{ // MessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); // return; //} // ยังไม่ได้ต่อ LIS 62-08-03 } } } } } } //String id = ""; //id = grfProc[grfProc.Row, colRsId] != null ? grfProc[grfProc.Row, colRsId].ToString() : ""; FrmLabBloodAdd frm = new FrmLabBloodAdd(ic, resid); frm.ShowDialog(this); setGrfReq(); //chk = grfReq[grfReq.Row, colRqReqNum] != null ? grfReq[grfReq.Row, colRqReqNum].ToString() : ""; //name = grfReq[grfReq.Row, colRqName] != null ? grfReq[grfReq.Row, colRqName].ToString() : ""; ////if (MessageBox.Show("ต้องการ ป้อน LAB OPU \n req number " + chk+" \n name "+ name, "", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2) == DialogResult.OK) ////{ ////grfReq.Rows.Remove(grfReq.Row); //Cursor curOld; //curOld = this.Cursor; //this.Cursor = Cursors.WaitCursor; //openLabOPUNew(id, name); //setGrfReq(); //setGrfProc(""); //this.Cursor = curOld; //} }
private void ContextMenu_sticker(object sender, System.EventArgs e) { String chk1 = "", name = "", id = "", vsid = "", resid = "", re3 = ""; if (grfReq.Row < 0) { return; } id = grfReq[grfReq.Row, colReqId] != null ? grfReq[grfReq.Row, colReqId].ToString() : ""; vsid = grfReq[grfReq.Row, colReqVsId] != null ? grfReq[grfReq.Row, colReqVsId].ToString() : ""; if (id.Length <= 0) { return; } SetDefaultPrinter(ic.iniC.printerSticker); DataTable dt = new DataTable(); dt.Columns.Add("hn", typeof(String)); dt.Columns.Add("name", typeof(String)); dt.Columns.Add("age", typeof(String)); dt.Columns.Add("vn", typeof(String)); dt.Columns.Add("path_barcode", typeof(String)); LabRequest lbreq = new LabRequest(); lbreq = ic.ivfDB.lbReqDB.selectByPk1(id); Visit vs = new Visit(); vs = ic.ivfDB.vsDB.selectByPk1(vsid); Patient ptt = new Patient(); ptt = ic.ivfDB.pttDB.selectByPk1(vs.t_patient_id); Lis lis = new Lis(); lis.lis_id = ""; lis.barcode = ""; lis.req_id = id; lis.visit_vn = vs.visit_vn; lis.patient_name = ptt.Name; lis.visit_hn = ptt.patient_hn; lis.visit_id = vs.t_visit_id; lis.message_lis = ""; lis.active = ""; lis.remark = ""; lis.date_create = ""; lis.date_modi = ""; lis.date_cancel = ""; lis.user_create = ""; lis.user_modi = ""; lis.user_cancel = ""; lis.statis_lis = ""; lis.date_time_receive = ""; lis.date_time_finish = ""; lis.lab_id = lbreq.lab_id; re3 = ic.ivfDB.lisDB.insertLis(lis, ic.cStf.staff_id); String re = "", re1 = "", re2 = ""; long chk = 0, chk2 = 0; Lis lis1 = new Lis(); lis1 = ic.ivfDB.lisDB.selectByPk(re3); DataRow row11 = dt.NewRow(); row11["hn"] = vs.visit_hn; row11["name"] = ptt.Name; row11["age"] = "Age " + ptt.AgeStringShort() + " [" + ic.datetoShow(ptt.patient_birthday) + "]"; row11["vn"] = lis1.barcode; row11["path_barcode"] = System.IO.Directory.GetCurrentDirectory() + "\\report\\" + lis1.barcode + ".jpg"; dt.Rows.Add(row11); if (!Directory.Exists("report")) { Directory.CreateDirectory("report"); } if (!File.Exists(System.IO.Directory.GetCurrentDirectory() + "\\report\\" + lis1.barcode + ".jpg")) { File.Delete(System.IO.Directory.GetCurrentDirectory() + "\\report\\" + lis1.barcode + ".jpg"); } C1BarCode barc = new C1BarCode(); if (ic.iniC.lisBarcode.Equals("Code_128_B")) { barc.CodeType = C1.BarCode.CodeType.Code_128_B; } else if (ic.iniC.lisBarcode.Equals("Code_128_A")) { barc.CodeType = C1.BarCode.CodeType.Code_128_A; } else if (ic.iniC.lisBarcode.Equals("Code_128_C")) { barc.CodeType = C1.BarCode.CodeType.Code_128_C; } else if (ic.iniC.lisBarcode.Equals("Code_128auto")) { barc.CodeType = C1.BarCode.CodeType.Code_128auto; } else if (ic.iniC.lisBarcode.Equals("Code_128auto")) { //barc.CodeType = C1.BarCode.CodeType.en; } else { } barc.Size = new Size(100, 60); barc.BarHeight = 60; barc.Text = lis1.barcode; Bitmap bitm = new Bitmap(100, 40); //bitm = barc.Image; Image img = barc.Image; //img.Size = new Size(100, 40); img.Save(System.IO.Directory.GetCurrentDirectory() + "\\report\\" + lis1.barcode + ".jpg", ImageFormat.Jpeg); FrmReport frm = new FrmReport(ic); frm.setStickerPatientThemalLIS(dt); frm.ShowDialog(this); }
// Use this for initialization void Start() { lis = gameObject.GetComponentInParent <Lis>(); }
void button3_Click(object sender, EventArgs e) { //LIS Lis.SetValue(this.GetCurrentPatient()); Lis.Show(); }
public String insert(Lis p, String userId) { String re = ""; String sql = ""; //DataTable dt = new DataTable(); p.active = "1"; //p.ssdata_id = ""; int chk = 0; chkNull(p); //lis.statis_lis = "status_lis"; sql = "Insert Into " + lis.table + " set " + "" + lis.barcode + "= '" + p.barcode + "'" + "," + lis.active + "= '" + p.active + "'" + "," + lis.req_id + "= '" + p.req_id + "'" + "," + lis.visit_vn + "= '" + p.visit_vn + "'" + "," + lis.visit_hn + "= '" + p.visit_hn + "'" + "," + lis.patient_name + "= '" + p.patient_name + "'" + "," + lis.visit_id + "= '" + p.visit_id + "'" + "," + lis.message_lis + "= '" + p.message_lis + "'" + "," + lis.remark + "= '" + p.remark + "'" + "," + lis.date_create + "= now()" + "," + lis.date_modi + "= ''" + "," + lis.date_cancel + "= ''" + "," + lis.user_create + "= '" + userId + "'" + "," + lis.user_modi + "= ''" + "," + lis.user_cancel + "= ''" + "," + lis.statis_lis + "= '" + p.statis_lis + "'" + "," + lis.date_time_receive + "= '" + p.date_time_receive + "'" + "," + lis.date_time_finish + "= '" + p.date_time_finish + "'" + "," + lis.lab_id + "= '" + p.lab_id + "'" + //"," + lis.status_ipd + "= '" + p.status_ipd + "'" + //"," + lis.an_cnt + " " + "= '" + p.an_cnt + "'" + //"," + lis.folder_ftp + " " + "= '" + p.folder_ftp + "'" + ""; try { // conn.comStore = new System.Data.SqlClient.SqlCommand(); // conn.comStore.Connection = conn.conn; // conn.comStore.CommandText = "insert_doc_scan"; // conn.comStore.CommandType = CommandType.StoredProcedure; // conn.comStore.Parameters.AddWithValue("barcode", p.barcode); // conn.comStore.Parameters.AddWithValue("visit_vn", p.visit_vn); // conn.comStore.Parameters.AddWithValue("patient_name", p.patient_name); // conn.comStore.Parameters.AddWithValue("visit_id", p.visit_id); // conn.comStore.Parameters.AddWithValue("remark", p.remark); // conn.comStore.Parameters.AddWithValue("user_create", userId); // conn.comStore.Parameters.AddWithValue("statis_lis", p.statis_lis); // conn.comStore.Parameters.AddWithValue("date_time_receive", p.date_time_receive); // conn.comStore.Parameters.AddWithValue("date_time_finish", p.date_time_finish); // conn.comStore.Parameters.AddWithValue("lab_id", p.lab_id); // conn.comStore.Parameters.AddWithValue("status_ipd", p.status_ipd); // conn.comStore.Parameters.AddWithValue("ext", p.visit_hn); // conn.comStore.Parameters.AddWithValue("message_lis", p.message_lis); // SqlParameter retval = conn.comStore.Parameters.Add("row_no1", SqlDbType.VarChar, 50); // retval.Value = ""; // retval.Direction = ParameterDirection.Output; re = conn.ExecuteNonQuery(conn.conn, sql); //conn.Open(); // conn.comStore.ExecuteNonQuery(); // re = (String)conn.comStore.Parameters["row_no1"].Value; // //string retunvalue = (string)sqlcomm.Parameters["@b"].Value; } catch (Exception ex) { sql = ex.Message + " " + ex.InnerException; } finally { conn.conn.Close(); //conn.comStore.Dispose(); } return(re); }