public void GeneratePatientReport(List <PatientReportModel> model, Refer ReferDoctor, Patient PatientInfo, UserEmployee PatientDoctor, string BranchName) { //StreamWriter sq = new StreamWriter(Server.MapPath("/images/") + "log.txt"); //sq.Close(); //StreamWriter sw = new StreamWriter(Server.MapPath("/images/") + "log.txt"); //sw.WriteLine("patient report method start...."); string filename = "Report-" + PatientInfo.Id + ".pdf"; if (!System.IO.File.Exists(Request.MapPath("/PatientsReport/") + filename)) { var path = Server.MapPath("/images/"); // sw.WriteLine("condition true of patient report. file doesn't exist.."); // sw.WriteLine("class going to instantiate report."); PatientReport Report = new PatientReport(path, model, ReferDoctor, PatientInfo, PatientDoctor, BranchName); //sw.WriteLine("report class instantiated"); PdfDocument pdf = Report.CreateDocument(); //sw.WriteLine("report is created."); pdf.Save(Server.MapPath("/PatientsReport/") + filename); //sw.WriteLine("report saved successfully"); // System.IO.FileInfo fi=new System.IO.FileInfo(Request.MapPath("/PatientsReport/") + filename); // fi.Delete(); } // ...and start a viewer. //sw.WriteLine("report process start."); Process.Start(Server.MapPath("/PatientsReport/") + filename); //sw.WriteLine("report PROCESS END"); //sw.Close(); }
public ActionResult <Refer> InitRefer([FromBody] Refer param) { if (param == null) { param = new Refer(); param._message = _localizer["No parameters."]; return(BadRequest(param)); } //認証ユーザ var id = User.Claims.First(c => c.Type == ClaimTypes.Sid).Value; try { //ログインユーザの取得 var model = (from a in _context.Accounts where a.AccountId.Equals(id) select a).SingleOrDefault(); //データが取得できた場合 中身を確認する if (model == null) { param._message = _localizer["It has already been deleted."]; return(BadRequest(model)); } ReflectionUtility.Model2Model(model, param); return(Ok(param)); } catch (Exception ex) { param._message = _localizer["System error Please inform system personnel.({0})", ex.Message]; return(BadRequest(param)); } }
private void ConfirmBTN_Click(object sender, EventArgs e) { if (NumberOfGuards < _gidS.Length) { var rs = RylMessageBox.ShowDialog( "The number of guards you've assigned is \n more than what the client requested \n Continue?", "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (rs == DialogResult.Yes) { Scheduling.AddAssignment(Rid, _gidS); Close(); Refer.Close(); } } else if (NumberOfGuards > _gidS.Length) { var rs = RylMessageBox.ShowDialog("The number of guards you've assigned is not enough. Do you still want to assign the selected guards?", "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (rs == DialogResult.Yes) { Scheduling.AddAssignment(Rid, _gidS); Close(); Refer.Close(); } } else { Scheduling.AddAssignment(Rid, _gidS); Close(); Refer.Close(); } RylMessageBox.ShowDialog("The guards selected are now assigned to the clients.", "Assign Guards", MessageBoxButtons.OK, MessageBoxIcon.Information); }
/// <summary> /// Create a new <Refer/> element and append it as a child of this element. /// </summary> /// <param name="action"> Action URL </param> /// <param name="method"> Action URL method </param> public VoiceResponse Refer(Uri action = null, Twilio.Http.HttpMethod method = null) { var newChild = new Refer(action, method); this.Append(newChild); return(this); }
public ActionResult DeleteConfirmed(int id) { Refer refer = db.Refers.Find(id); db.Refers.Remove(refer); db.SaveChanges(); return(RedirectToAction("Index")); }
/// <summary> /// Initializes a new instance of the class BillFrom and opens the specified XML document. /// </summary> public PatientReport(string path, List <PatientReportModel> model, Refer ReferDoc, Patient PatientInfo, UserEmployee PatientDoctor, string branch) { this.model = model; this.path = path; this.ReferDoc = ReferDoc; this.PatientInfo = PatientInfo; this.Branch = branch; this.PatientDoctor = PatientDoctor; }
public void TestElementWithParams() { var elem = new Refer(new Uri("https://example.com"), Twilio.Http.HttpMethod.Get); Assert.AreEqual( "<?xml version=\"1.0\" encoding=\"utf-8\"?>" + Environment.NewLine + "<Refer action=\"https://example.com\" method=\"GET\"></Refer>", elem.ToString() ); }
public void TestEmptyElement() { var elem = new Refer(); Assert.AreEqual( "<?xml version=\"1.0\" encoding=\"utf-8\"?>" + Environment.NewLine + "<Refer></Refer>", elem.ToString() ); }
static void Main() { var response = new VoiceResponse(); var refer = new Refer(); refer.ReferSip("sip:[email protected]?X-AcctNumber=123456&X-ReasonForCalling=billing-question"); response.Append(refer); Console.WriteLine(response.ToString()); }
static void Main() { var response = new VoiceResponse(); var refer = new Refer(action: new Uri("/handleRefer"), method: Twilio.Http.HttpMethod.Post); refer.Sip(new Uri("sip:[email protected]")); response.Append(refer); Console.WriteLine(response.ToString()); }
public void Post(Refer refer) { Refer result = _context.Refers.FirstOrDefault(p => p.refCode == refer.refCode && p.refName == refer.refName); if (result == null) { _context.Refers.Add(refer); _context.SaveChanges(); } }
static void Main() { var response = new VoiceResponse(); var refer = new Refer(); refer.Sip(new Uri("sip:[email protected]?User-to-User=123456789%3Bencoding%3Dhex")); response.Append(refer); Console.WriteLine(response.ToString()); }
public ActionResult Edit([Bind(Include = "referneceID,firstName,lastName,employeeFirstName,employeeLastName,department,CompanyValue")] Refer refer) { if (ModelState.IsValid) { db.Entry(refer).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(refer)); }
static void Main() { var response = new VoiceResponse(); var refer = new Refer(); refer.ReferSip("sip:[email protected]"); response.Append(refer); Console.WriteLine(response.ToString()); }
public ActionResult Edit([Bind(Include = "referneceID,ID,receiveID,CompanyValue")] Refer refer) { if (ModelState.IsValid) { db.Entry(refer).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.receiveID = new SelectList(db.Profiles, "ID", "firstName", refer.receiveID); return(View(refer)); }
public void TestElementWithTextNode() { var elem = new Refer(); elem.AddText("Here is the content"); Assert.AreEqual( "<?xml version=\"1.0\" encoding=\"utf-8\"?>" + Environment.NewLine + "<Refer>Here is the content</Refer>", elem.ToString() ); }
public void TestElementWithExtraAttributes() { var elem = new Refer(); elem.SetOption("newParam1", "value"); elem.SetOption("newParam2", 1); Assert.AreEqual( "<?xml version=\"1.0\" encoding=\"utf-8\"?>" + Environment.NewLine + "<Refer newParam1=\"value\" newParam2=\"1\"></Refer>", elem.ToString() ); }
public JsonResult SetVhostRefer(string deviceId, string vhostDomain, Refer refer) { ResponseStruct rss = CommonFunctions.CheckParams(new object[] { deviceId, vhostDomain, refer }); if (rss.Code != ErrorNumber.None) { return(Program.CommonFunctions.DelApisResult(null !, rss)); } var rt = VhostReferApis.SetVhostRefer(deviceId, vhostDomain, refer, out ResponseStruct rs); return(Program.CommonFunctions.DelApisResult(rt, rs)); }
public ActionResult UpdateKendoGridDoc(string models) { IList <ReferredModel> objName = new JavaScriptSerializer().Deserialize <IList <ReferredModel> >(models); Refer refDoc = new Refer(); refDoc.Id = objName[0].Id; refDoc.ReferredDoctorName = objName[0].ReferredDoctorName; refDoc.ReferredDocAddress = objName[0].ReferredDocAddress; refDoc.ReferredDocNumber = objName[0].ReferredDocNumber; refDoc.Remarks = objName[0].Remarks; refDoc.commission = objName[0].commission; ReferDoctorsServices.Update(refDoc, refDoc.Id); return(Json(refDoc)); }
// GET: Refers/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Refer refer = db.Refers.Find(id); if (refer == null) { return(HttpNotFound()); } return(View(refer)); }
public void TestMixedContent() { var elem = new Refer(); elem.AddText("before") .AddChild("Child").AddText("content"); elem.AddText("after"); Assert.AreEqual( "<?xml version=\"1.0\" encoding=\"utf-8\"?>" + Environment.NewLine + "<Refer>before<Child>content</Child>after</Refer>", elem.ToString() ); }
public void TestElementWithChildren() { var elem = new Refer(); elem.ReferSip(new Uri("https://example.com")); Assert.AreEqual( "<?xml version=\"1.0\" encoding=\"utf-8\"?>" + Environment.NewLine + "<Refer>" + Environment.NewLine + " <Sip>https://example.com</Sip>" + Environment.NewLine + "</Refer>", elem.ToString() ); }
public void TestAllowGenericChildNodes() { var elem = new Refer(); elem.AddChild("generic-tag").AddText("Content").SetOption("tag", true); Assert.AreEqual( "<?xml version=\"1.0\" encoding=\"utf-8\"?>" + Environment.NewLine + "<Refer>" + Environment.NewLine + " <generic-tag tag=\"True\">Content</generic-tag>" + Environment.NewLine + "</Refer>", elem.ToString() ); }
public void ConstrucotorInjectionGenerics() { // Arrange Refer <int> myRefer = new Refer <int>(); myRefer.Str = "HiHello"; Container.RegisterInstance <Refer <int> >(myRefer) .RegisterType <IRepository <int>, MockRespository <int> >(); // Act IRepository <int> result = Container.Resolve <IRepository <int> >(); // Validate Assert.IsInstanceOfType(result, typeof(IRepository <int>)); }
public void ImplementConstructorInjection() { // Arrange Refer <int> myRefer = new Refer <int>(); myRefer.Str = "HiHello"; Container.RegisterInstance <Refer <int> >(myRefer) .RegisterType <Refer <int> >(); // Act Refer <int> result = Container.Resolve <Refer <int> >(); // Validate Assert.AreSame(myRefer, myRefer); }
public ActionResult <Refer> Load([FromBody] Refer param) { try { var mail = (from a in _context.Mails where a.MailId.Equals(param.MailId) select a).FirstOrDefault(); if (mail == null) { param._message = _localizer["It has already been deleted."]; return(BadRequest(param)); } ReflectionUtility.Model2Model(mail, param); var tuser = (from a in _context.MailTusers join t in _context.Tusers on a.TuserId equals t.TuserId where a.MailId.Equals(param.MailId) orderby t.TuserKana ascending select new UserList { IsSelect = true, TuserId = a.TuserId, ToEmail = t.ToEmail, ToEmail2 = t.ToEmail2, ToEmail3 = t.ToEmail3, TuserName = t.TuserName, TuserKana = t.TuserKana, ErrorMessage = a.ErrorMessage, IsError = a.IsError ? "エラー":"", IsSent = a.IsSent? "済":"", Status = a.IsRead ? "既読":"未読" }).ToList(); param.SelectList = tuser; return(Ok(param)); } catch (Exception ex) { param._message = _localizer["システムエラー" + ex.Message]; return(BadRequest(param)); } }
public ActionResult Create([Bind(Include = "referneceID,ID,receiveID,CompanyValue")] Refer refer) { if (ModelState.IsValid) { Guid memberID; Guid.TryParse(User.Identity.GetUserId(), out memberID); //person GIVING reference (person logged in) refer.ID = memberID; db.Refers.Add(refer); db.SaveChanges(); return(RedirectToAction("Index")); } var profile = db.Profiles.OrderBy(c => c.lastName).ThenBy(c => c.firstName); ViewBag.receiveID = new SelectList(profile, "ID", "fullName"); return(View(refer)); }
public void GeneratePatientReport(List <PatientReportModel> model, Refer ReferDoctor, Patient PatientInfo, UserEmployee PatientDoctor, string BranchName) { string filename = "Report-" + PatientInfo.Id + ".pdf"; if (!System.IO.File.Exists(Request.MapPath("/PatientsReport/") + filename)) { var Path = Server.MapPath("/images/"); PatientReport Report = new PatientReport(Path, model, ReferDoctor, PatientInfo, PatientDoctor, BranchName); PdfDocument pdf = Report.CreateDocument(); pdf.Save(Server.MapPath("/PatientsReport/") + filename); // System.IO.FileInfo fi=new System.IO.FileInfo(Request.MapPath("/PatientsReport/") + filename); // fi.Delete(); } // ...and start a viewer. Process.Start(Server.MapPath("/PatientsReport/") + filename); }
public ActionResult AddReferDoctor(ReferredModel model) { var refer = new Refer() { ReferredDoctorName = model.ReferredDoctorName, ReferredDocAddress = model.ReferredDocAddress, ReferredDocNumber = model.ReferredDocNumber, Remarks = model.Remarks, commission = model.commission }; ReferDoctorsServices.Add(refer); foreach (var Dept in model.DocDeptsCommision) { ReferDoctorCommisionServices.Add(new ReferDoctorCommision { ReferDoctorId = refer.Id, DeptId = Dept.DeptId, Commision = Dept.Commision }); } return(Json("success", JsonRequestBehavior.AllowGet)); }
public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Refer refer = db.Refers.Find(id); if (refer == null) { return(HttpNotFound()); } Guid memberID; Guid.TryParse(User.Identity.GetUserId(), out memberID); if (refer.ID == memberID) { return(View(refer)); } else { return(View("NotAuthenticated")); } }