private static ITheme SetPageTheme(themeThemefilter filter, themeStyle[] themeStyles) { var pagetheme = new Theme { BackgroundImage = filter.backgroundimage.value, BackgroundColor = filter.backgroundColor.value }; foreach (var level in filter.levels) { IThemeRule themeRule = new ThemeRule() { LevelId = level.level, Style = SetStyle(themeStyles.First(x => x.id == level.style)), }; pagetheme.ThemeRules.Add(themeRule); } if (filter.showMeta != null) { foreach (var meta in filter.showMeta) { IFooterData footer = new FooterData() { Text = $"[{meta.name}]", Level = meta.level }; pagetheme.FooterData.Add(footer); } } return(pagetheme); }
public FooterUrlData Footer([FromBody] FooterData formData) { Models.FooterUrlData Model = new Models.FooterUrlData(); try { if (formData != null) { if (formData.Id > 0) { var obj = db.FooterUrlDatas.Where(x => x.Id == formData.Id).FirstOrDefault(); obj.FooterUrlId = formData.FooterUrlId; obj.Data = formData.Data; Model.IsActive = true; } else { Model.FooterUrlId = formData.FooterUrlId; Model.Data = formData.Data; Model.IsActive = true; db.FooterUrlDatas.Add(Model); } db.SaveChanges(); } } catch (Exception ex) { Console.Write(ex); } return(Model); }
private async Task <FooterViewModel> CreateFooter() { var viewModel = new FooterViewModel(); try { var records = await this._clientManager.GetClient <Models.Footer, FooterData>("footer").GetAsync(); var data = records.Items.FirstOrDefault().Data ?? new FooterData(); viewModel.Footer = data; } catch (HttpRequestException) { var footerData = new FooterData { // Add a clean fallback. }; viewModel.Footer = footerData; } return(viewModel); }
public void BuildFooter(FooterData footer) { _page.AddFooter(footer); }
public void AddFooter(FooterData footer) { }
private static PdfGrid createFooter(PagesFooterBuilder footer, string date, FooterData data) { var table = new PdfGrid(numColumns: 4) { WidthPercentage = 100, RunDirection = PdfWriter.RUN_DIRECTION_LTR }; var datePhrase = footer.PdfFont.FontSelector.Process(date); var datePdfCell = new PdfPCell(datePhrase) { RunDirection = PdfWriter.RUN_DIRECTION_LTR, BorderWidthLeft = 0, BorderWidthRight = 0, BorderWidthTop = 1, BorderWidthBottom = 0, Padding = 4, BorderColorTop = new BaseColor(System.Drawing.Color.LightGray), HorizontalAlignment = Element.ALIGN_CENTER }; var nullPdfCell = new PdfPCell { RunDirection = PdfWriter.RUN_DIRECTION_LTR, BorderWidthLeft = 0, BorderWidthRight = 0, BorderWidthTop = 1, BorderWidthBottom = 0, Padding = 4, BorderColorTop = new BaseColor(System.Drawing.Color.LightGray), HorizontalAlignment = Element.ALIGN_RIGHT }; var pageNumberPhrase = footer.PdfFont.FontSelector.Process("Page " + data.CurrentPageNumber + " of "); var pageNumberPdfCell = new PdfPCell(pageNumberPhrase) { RunDirection = PdfWriter.RUN_DIRECTION_LTR, BorderWidthLeft = 0, BorderWidthRight = 0, BorderWidthTop = 1, BorderWidthBottom = 0, Padding = 4, BorderColorTop = new BaseColor(System.Drawing.Color.LightGray), HorizontalAlignment = Element.ALIGN_RIGHT }; var totalPagesNumberImagePdfCell = new PdfPCell(data.TotalPagesCountImage) { RunDirection = PdfWriter.RUN_DIRECTION_LTR, BorderWidthLeft = 0, BorderWidthRight = 0, BorderWidthTop = 1, BorderWidthBottom = 0, Padding = 4, PaddingLeft = 0, BorderColorTop = new BaseColor(System.Drawing.Color.LightGray), HorizontalAlignment = Element.ALIGN_LEFT }; table.AddCell(datePdfCell); table.AddCell(nullPdfCell); table.AddCell(pageNumberPdfCell); table.AddCell(totalPagesNumberImagePdfCell); return(table); }
public ActionResult PatientWiseResultEntry(FormCollection collection, FooterData obj1, string LabNo, string ParamiterID, string TestID2, string Formula, string newValue, string NLH1) { string Message = ""; //string op = collection["footer[" + 1 + "]"]; // string[] Footersplit = WebUtility.HtmlEncode(obj1.footer.ToString()).Replace("\r\n", "<br>").Split(','); //location.LabNo = collection["LabNo"].ToString(); Connect(); //location.LabNo = collection["LabNo"].ToString(); if (obj1.Nyvalue.ToString().Trim().Length > 0) { string[] NLH = obj1.Nyvalue.ToString().Split(','); Calculation(Convert.ToInt32(obj1.LNo.ToString()), obj1.PreID.ToString(), obj1.TesID.ToString(), obj1.Formu.ToString(), obj1.Nyvalue.ToString(), obj1.HLN.ToString()); if (obj1.TesID.ToString() == "") { TestID2 = "0"; } dsCompare = BL_obj.GetPatientWiseResultforParameterValue(Convert.ToInt32(obj1.LNo.ToString()), Convert.ToInt32(dsPatientEntry.Tables[0].Rows[0]["TestID"])); if (dsPatientEntry.Tables.Count > 0) { int i = 0; foreach (DataRow dr in dsPatientEntry.Tables[0].Rows) { if (dsCompare.Tables[0].Rows[i]["ResultValue"].ToString().Trim() != dr["ResultValue"].ToString().Trim()) { dr["CreationID"] = CreationID; } else { dr["CreationID"] = dsCompare.Tables[0].Rows[i]["CreationID"].ToString().Trim(); } if (NLH[i] == "Blank") { dr["NLH"] = ""; } else { dr["NLH"] = NLH[i]; } //if (Footersplit[i] == "Blank") //{ // dr["Footer"] = ""; //} //else //{ // dr["Footer"] = WebUtility.HtmlEncode(Footersplit[i]); //} dr["CompleteBy"] = CreationID; dr["Mode"] = "Edit"; i++; } if (BL_obj.Save(dsPatientEntry, dsCompare, obj1.footer)) { Message = "Record Saved successfully"; } } } return(View()); }
public ActionResult Completebtn(int LabNo, string ParamiterID, string TestID2, string Formula, string newValue, string NLH1, FooterData data, FormCollection obj, string [] arraydata) { //string[] Footersplit = WebUtility.HtmlEncode(Request.Form["footer"]).Replace("\r\n", "<br>").Split(','); Connect(); string Message = ""; if (newValue.ToString().Trim().Length > 0) { string[] NLH = NLH1.Split(','); // string[] Footersplit = Footer.Split(','); BL_Patient_Wise_Result_Entry BL_obj = new BL_Patient_Wise_Result_Entry(); // Patient_Wise_Result_Entry obj = new Patient_Wise_Result_Entry(); Calculation(LabNo, ParamiterID, TestID2, Formula, newValue, NLH1); if (TestID2 == "") { TestID2 = "0"; } dsCompare = BL_obj.GetPatientWiseResultforParameterValue(Convert.ToInt32(LabNo), Convert.ToInt32(dsPatientEntry.Tables[0].Rows[0]["TestID"])); if (dsPatientEntry.Tables.Count > 0) { int i = 0; foreach (DataRow dr in dsPatientEntry.Tables[0].Rows) { if (dsCompare.Tables[0].Rows[i]["ResultValue"].ToString().Trim() != dr["ResultValue"].ToString().Trim()) { dr["CreationID"] = CreationID; } else { dr["CreationID"] = dsCompare.Tables[0].Rows[i]["CreationID"].ToString().Trim(); } if (NLH[i] == "Blank") { dr["NLH"] = ""; } else { dr["NLH"] = NLH[i]; } //if (Footersplit[i] == "Blank") //{ // dr["Footer"] = ""; //} //else //{ // dr["Footer"] = WebUtility.HtmlEncode(Footersplit[i]); //} dr["CompleteBy"] = CreationID; dr["Mode"] = "Edit"; i++; } if (BL_obj.Save(dsPatientEntry, dsCompare, data.footer)) { Message = "Record Saved successfully"; //PatientWiseResultEntry(); } } } return(Json(Message, JsonRequestBehavior.AllowGet)); }
public ActionResult _Footer() { var model = new FooterData().GetFooter(); return(PartialView(model)); }
public Fotter() { foot = new FooterData(); }
internal void AddFooter(FooterData footer) { throw new NotImplementedException(); }
public void BuildFooter(FooterData footer) { this._page.AddFooter(footer); }