protected override Models.Devotion Parse() { return(new Models.Devotion { Id = ToInt(DevotionID), ImagePath = ImagePath.ToString(), Prayer = Prayer.ToString(), Title = Title.ToString() }); }
protected override Models.BasicCatholicPrayer Parse() { return(new Models.BasicCatholicPrayer { Id = ToInt(BasicCatholicPrayerID), ImagePath = ImagePath.ToString(), Prayer = Prayer.ToString(), Title = Title.ToString() }); }
protected override Models.OtherCatholicPrayer Parse() { return(new Models.OtherCatholicPrayer { Id = ToInt(OtherCatholicPrayerID), ImagePath = ImagePath.ToString(), Prayer = Prayer.ToString(), Title = Title.ToString(), Category = Categories.ToString() }); }
internal XmlNode GetXmlImage(XmlDocument document) { XmlNode parent = document.CreateNode(XmlNodeType.Element, "image", ""); XmlNode id = document.CreateNode(XmlNodeType.Element, "id", ""); id.InnerText = Id; XmlNode name = document.CreateNode(XmlNodeType.Element, "name", ""); name.InnerText = ImageName; XmlNode path = document.CreateNode(XmlNodeType.Element, "path", ""); path.InnerText = ImagePath.ToString(); XmlNode width = document.CreateNode(XmlNodeType.Element, "width", ""); width.InnerText = Width.ToString(); XmlNode height = document.CreateNode(XmlNodeType.Element, "height", ""); height.InnerText = Height.ToString(); XmlNode positionX = document.CreateNode(XmlNodeType.Element, "positionX", ""); positionX.InnerText = PositionX.ToString(); XmlNode positionY = document.CreateNode(XmlNodeType.Element, "positionY", ""); positionY.InnerText = PositionY.ToString(); XmlNode row = document.CreateNode(XmlNodeType.Element, "row", ""); row.InnerText = Row.ToString(); XmlNode column = document.CreateNode(XmlNodeType.Element, "column", ""); column.InnerText = Column.ToString(); parent.AppendChild(id); parent.AppendChild(name); parent.AppendChild(path); parent.AppendChild(width); parent.AppendChild(height); parent.AppendChild(positionX); parent.AppendChild(positionY); parent.AppendChild(row); parent.AppendChild(column); return(parent); }
protected override Announcement Parse() { return(new Announcement { Id = ToInt(AnnouncementID), Description = AnnouncementDesc.ToString(), SimbahanId = ToInt(SimbahanID), StartDate = ToDateTime(StartDate), StartTime = StartTime.ToString(), EndDate = ToDateTime(EndDate), EndTime = EndTime.ToString(), Title = TitleContent.ToString(), Venue = Address.ToString(), ImagePath = ImagePath.ToString() }); }
protected override Saint Parse() { return(new Saint { Id = Convert.ToInt64(SaintID), Name = Name.ToString(), Biography = Biography.ToString(), FeastDay = FeastDay.ToString(), Categories = Categories.ToString(), BirthDate = BirthDate.ToString(), DeathDate = DeathDate.ToString(), CanonizeDate = CanonizeDate.ToString(), RelatedChurch = RelatedChurch.ToString(), Patron = Patron.ToString(), ImagePath = ImagePath.ToString(), PublicationDate = ToDateTime(PublicationDate) }); }
private int AddRecord_DiscountProfile() { int intActionResult = 0; int validateInputDate = 0; int validateInputCoupon = 0; DataTable dt = new DataTable(); int startDigit = 00000; DiscountZone discountZone = new DiscountZone(); DateTimeValidation dateTimeValidation = new DateTimeValidation(); DiscountManegar manager = new DiscountManegar(); DateTimeValidation.Date_Validation dateValidation = new DateTimeValidation.Date_Validation(); int validDateRange = DateTime.Compare(Convert.ToDateTime(dateValidation.date_Format_Back_End(txtToDate.Text.Trim())), Convert.ToDateTime(dateValidation.date_Format_Back_End(txtFromDate.Text.Trim()))); try { dt = manager.GenerateCouponCode(); if (dt.Rows.Count > 0) { GeneratedCopunCode = dt.Rows[0]["MaxCouponCode"].ToString(); } } catch (Exception ex) { lblSystemMessage.Text = ex.Message; } if (validDateRange > 0) { validateInputDate = 1; dateTimeLabel.Text = ""; } else { validateInputDate = 0; dateTimeLabel.Text = "*Enter valid date range."; } discountZone.CategoryID = Convert.ToInt16(CategoryID); discountZone.SubcategoryID = Convert.ToInt16(SubCategoryID); discountZone.ProfileID = Convert.ToInt16(ProfileID); discountZone.CouponTitle = couponTitleTextBox.Text.ToString(); discountZone.TermsCondition = termsConditionsTextBox.Text.ToString(); discountZone.CouponDescription = couponDescriptionTextBox.Text.ToString(); discountZone.CouponType = ddlCouponType.SelectedItem.ToString(); if (GetDiscountType == "1") { discountZone.CouponCode = "ApnerDeal-" + (startDigit + Convert.ToInt32(GeneratedCopunCode) + 1); } else { discountZone.CouponCode = "BM-STAN-" + (startDigit + Convert.ToInt32(GeneratedCopunCode) + 1); } discountZone.NeedToPrintCoupon = Convert.ToBoolean(isPrintedCouponNeedRadioButtonList.SelectedValue); discountZone.UseBoromelaCoupon = Convert.ToInt16(DiscountType.SelectedValue); discountZone.UserUploadedCouponPath = ImagePath.ToString(); discountZone.IsActive = true; discountZone.IsAdminAuthentication = true; discountZone.CheckAdminForListing = false; discountZone.UserType = Convert.ToBoolean(IsAdmin); discountZone.CouponEffectiveDate = Convert.ToDateTime(dateValidation.date_Format_Back_End(txtFromDate.Text)); discountZone.CouponExpirydate = Convert.ToDateTime(dateValidation.date_Format_Back_End(txtToDate.Text)); discountZone.UpdatedOn = DateTime.Now; discountZone.DiscountCouponURL = urlTextBox.Text.ToString(); if (DiscountType.SelectedValue.ToString() == "2" && ImagePath == "") { validateInputCoupon = 0; couponLabel.Text = "*Please upload your own coupon."; } else { validateInputCoupon = 1; couponLabel.Text = ""; } try { if (validateInputCoupon == 1 && validateInputDate == 1) { intActionResult = manager.Ad_Discount(discountZone); } else { } } catch (Exception ex) { lblSystemMessage.Text = ex.Message; } return(intActionResult); }
/// ----------------------------------------------------------------------------- /// <summary> /// LoadSettings loads the settings from the Database and displays them /// </summary> /// ----------------------------------------------------------------------------- public override void LoadSettings() { try { if (Page.IsPostBack == false) { GetPortalRoles(); if (EnableDiscount != null) { if (EnableDiscount.ToString().Length > 0) { CbxEnableDiscount.Checked = Convert.ToBoolean(EnableDiscount.ToString()); } } if (ShowPriceOnCheckout != null) { if (ShowPriceOnCheckout.ToString().Length > 0) { CbxShowPriceOnCheckout.Checked = Convert.ToBoolean(ShowPriceOnCheckout.ToString()); } } if (DisplayRemains != null) { if (DisplayRemains.ToString().Length > 0) { CbxDisplayRemains.Checked = Convert.ToBoolean(DisplayRemains.ToString()); } } if (RoleName != null) { ddlRoles.SelectedValue = RoleName; } if (PageSize > 0) { ddlPageSize.SelectedValue = PageSize.ToString(); } if (EmailMessage != null) { txtEmailMessage.Text = EmailMessage; } if (EmailFrom != null) { txtEmailFrom.Text = EmailFrom; } if (EmailNotify != null) { txtEmailNotify.Text = EmailNotify; } if (EmailBCC != null) { txtEmailBCC.Text = EmailBCC; } if (EmailSubject != null) { txtEmailSubject.Text = EmailSubject; } if (ReportServerURL != null) { txturlReportServer.Text = ReportServerURL.ToString(); } if (ReportPath != null) { txtReportPath.Text = ReportPath.ToString(); } if (ReportCredentialsUserName != null) { txtRSCredentialsUserName.Text = ReportCredentialsUserName.ToString(); } if (ReportCredentialsPassword != null) { txtRSCredentialsPassword.Text = ReportCredentialsPassword.ToString(); } if (ReportCredentialsDomain != null) { txtRSCredentialsDomain.Text = ReportCredentialsDomain.ToString(); } if (jQueryUI != null) { txtjQueryUI.Text = jQueryUI.ToString(); } if (ImagePath != null) { txtImagePath.Text = ImagePath.ToString(); } if (WallImage != null) { txtWallImage.Text = WallImage.ToString(); } } } catch (Exception exc) //Module failed to load { Exceptions.ProcessModuleLoadException(this, exc); } }
private int UpdateRecord_DiscountProfile() { DateTime dtFrom; DateTime dtTo; dtFrom = Convert.ToDateTime(txtFromDate.Text); dtTo = Convert.ToDateTime(txtToDate.Text); txtFromDate.Text = dtFrom.ToString("MM/dd/yyyy"); txtToDate.Text = dtTo.ToString("MM/dd/yyyy"); int intActionResult = 0; int validateInputDate = 0; int validateInputCoupon = 0; DataTable dt = new DataTable(); DiscountZone discountZone = new DiscountZone(); discountZone.CouponID = CouponID; discountZone.ProfileID = ProfileID; discountZone.CouponCode = CouponCode; DateTimeValidation dateTimeValidation = new DateTimeValidation(); DiscountManegar manager = new DiscountManegar(); DateTimeValidation.Date_Validation dateValidation = new DateTimeValidation.Date_Validation(); int validDateRange = DateTime.Compare(Convert.ToDateTime(dateValidation.date_Format_Back_End(txtToDate.Text.Trim())), Convert.ToDateTime(dateValidation.date_Format_Back_End(txtFromDate.Text.Trim()))); if (validDateRange >= 0) { validateInputDate = 1; dateTimeLabel.Text = ""; } else { validateInputDate = 0; dateTimeLabel.Text = "*Enter valid date range."; } discountZone.CouponTitle = couponTitleTextBox.Text.ToString(); discountZone.TermsCondition = termsConditionsTextBox.Text.ToString(); discountZone.CouponDescription = couponDescriptionTextBox.Text.ToString(); discountZone.CouponType = ddlCouponType.SelectedItem.ToString(); discountZone.UseBoromelaCoupon = Convert.ToInt16(DiscountType.SelectedValue); discountZone.UserUploadedCouponPath = ImagePath.ToString(); discountZone.NeedToPrintCoupon = Convert.ToBoolean(isPrintedCouponNeedRadioButtonList.SelectedValue); discountZone.CouponEffectiveDate = Convert.ToDateTime(dateValidation.date_Format_Back_End(txtFromDate.Text.Trim())); discountZone.CouponExpirydate = Convert.ToDateTime(dateValidation.date_Format_Back_End(txtToDate.Text.Trim())); discountZone.UpdatedOn = DateTime.Now; discountZone.DiscountCouponURL = urlTextBox.Text.ToString(); if (DiscountType.SelectedValue.ToString() == "2" && ImagePath == "") { validateInputCoupon = 0; couponLabel.Text = "*Please upload your won coupon."; } else { validateInputCoupon = 1; couponLabel.Text = ""; } try { if (validateInputCoupon == 1 && validateInputDate == 1) { intActionResult = manager.Update_Discount(discountZone); } else { } } catch (Exception ex) { lblSystemMessage.Text = ex.Message; } return(intActionResult); }