Exemplo n.º 1
0
 private void CopyTo(ResponseCreditCardInfo clone)
 {
     clone.Pan             = Pan;
     clone.ExpiryDate      = ExpiryDate.Parse(ExpiryDate.ToString());
     clone.CardType        = CardType;
     clone.CardDescription = CardDescription;
 }
Exemplo n.º 2
0
Arquivo: Visa.cs Projeto: NansyT/SOLID
 public override string ToString()
 {
     return(base.ToString()
            + "Kortets udløbsdato: " + ExpiryDate.ToString("MM/yy") + "\n"
            + "Kredit grænse: " + CreditLimit + "\n"
            + "Månedlig grænse: " + MonthlyLimit + "\n");
 }
Exemplo n.º 3
0
        public void CanCreateEmptyExpDate()
        {
            var ex = new ExpiryDate();

            Assert.IsTrue(!ex.Date.HasValue);
            Assert.IsFalse(ex.GoodTillCanceled);
            Assert.IsTrue(ex.ToString() == "TODAY");
        }
Exemplo n.º 4
0
        public void CanCreateGtcExpDate()
        {
            var ex = new ExpiryDate(true);

            Assert.IsTrue(!ex.Date.HasValue);
            Assert.IsTrue(ex.GoodTillCanceled);
            Assert.IsTrue(ex.ToString() == "GTC");
        }
Exemplo n.º 5
0
        public void CanCreateSpecificExpDate()
        {
            var ex = new ExpiryDate(new DateTime(2014, 9, 15));

            Assert.IsTrue(ex.Date.HasValue);
            Assert.IsFalse(ex.GoodTillCanceled);
            Assert.IsTrue(ex.ToString() == "20140915");
        }
Exemplo n.º 6
0
        internal byte[] GetSignificateData()
        {
            var s = string.Join(":",
                                Id.ToString(CultureInfo.InvariantCulture),
                                ExpiryDate.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture),
                                Type.ToString());

            return(Encoding.UTF8.GetBytes(s));
        }
Exemplo n.º 7
0
        public void ToString_ContainsInformationAboutDateTime()
        {
            // Arrange
            var        date       = DateTime.Now;
            ExpiryDate expiryDate = date;

            // Act
            string mesage = expiryDate.ToString();

            // Assert
            Assert.Contains(mesage, date.ToString("s"));
        }
Exemplo n.º 8
0
        public override string GetProperty(string propertyName)
        {
            switch (propertyName)
            {
            case "ExpiryDate":
                return(ExpiryDate.ToString());

            //break;
            case "PackType":
                return(PackType);

            //break;
            case "Ingridients":
                return(Ingridients);

            //break;
            default:
                return("");
                //break;
            }
        }
Exemplo n.º 9
0
        public string ToXml(string privateKey)
        {
            string xml = string.Format(@"<slyce-license version=""{0}"">
								<product>{1}</product>
								<license serial=""{2}"" type=""{3}"" hardware-id=""{4}"" expiry-date=""{5}"" quantity=""{6}"" />
								<order reference=""{7}"" date=""{8}"">
									<purchaser company=""{9}"" name=""{10}"" email=""{11}"" phone=""{12}"">
										<address line1=""{13}"" line2=""{14}"" city=""{15}"" country=""{16}"" />
									</purchaser>
								</order>
								<signature />
							</slyce-license>"                            ,
                                       Version,
                                       Product,
                                       Serial,
                                       Type,
                                       HardwareId,
                                       ExpiryDate.ToString("d MMM yyyy"),
                                       Quantity,
                                       OrderReference,
                                       OrderDate,
                                       Company,
                                       Name,
                                       Email,
                                       Phone,
                                       AddressLine1,
                                       AddressLine2,
                                       AddressCity,
                                       AddressCountry);

            xml = LicenseHelper.FormatXml(xml);
            string signature = LicenseHelper.CreateSignature(xml.Substring(xml.IndexOf(@"?>") + 2).Replace("<signature />", "").Replace("  ", " ").Replace("\r", "").Replace("\n", "").Replace("\t", ""), privateKey);

            xml = xml.Replace("<signature />", "<signature>" + signature + "</signature>");
            return(LicenseHelper.FormatXml(xml));
        }
Exemplo n.º 10
0
 public override string ToString()
 {
     return(ExpiryDate.ToString());
 }
Exemplo n.º 11
0
        private void btnAlter_Click(object sender, EventArgs e)
        {
            clsUtility.ExecuteSQLQuery(" SELECT  * FROM   Users  WHERE   USER_ID = '" + clsUtility.UserID + "' AND   Can_Edit = 'Y' ");
            if (clsUtility.sqlDT.Rows.Count > 0)
            {
                ///////////////////////////////////////////
                if (string.IsNullOrWhiteSpace(this.txtItemID.Text) | string.IsNullOrWhiteSpace(this.txtItemName.Text) | string.IsNullOrWhiteSpace(this.txtUnit.Text) | cmbGroup.SelectedValue == null | cmbGroup.SelectedIndex == -1 | cmbDefaultWarehouse.SelectedValue == null | cmbDefaultWarehouse.SelectedIndex == -1)
                {
                    errorProvider.SetError(txtItemName, "Required");
                    errorProvider.SetError(txtUnit, "Required");
                    errorProvider.SetError(cmbGroup, "Required");
                    errorProvider.SetError(cmbDefaultWarehouse, "Required");
                }
                else
                {
                    ///////////////////////////////
                    errorProvider.Clear();
                    string VATapplicable = null;
                    string Expiry, ExpiryDate;
                    if (chkExp.Checked)
                    {
                        ExpiryDate = dtpExpDate.Value.Date.ToString("yyyy-MM-dd"); Expiry = "Y";
                    }
                    else
                    {
                        ExpiryDate = ""; Expiry = "N";
                    }
                    if (cbVATapplicable.Checked)
                    {
                        VATapplicable = "Y";
                    }
                    else
                    {
                        VATapplicable = "N";
                    }
                    try
                    {
                        clsUtility.ExecuteSQLQuery(" UPDATE  ItemInformation SET  ItemName='" + txtItemName.Text + "',UnitOfMeasure='" + txtUnit.Text + "',Batch='" + txtBatch.Text + "',GROUP_ID='" + cmbGroup.SelectedValue.ToString() + "',Barcode='" + txtBarcode.Text + "',Cost='" + clsUtility.num_repl(txtPurchaseCost.Text) + "',Price='" + clsUtility.num_repl(txtSalesPrice.Text) + "',ReorderPoint='" + clsUtility.num_repl(txtReorderPoint.Text) + "',VAT_Applicable='" + VATapplicable + "', WarehouseID = '" + cmbDefaultWarehouse.SelectedValue.ToString() + "' " +
                                                   " WHERE ITEM_ID ='" + ITEM_ID + "'  ");

                        clsUtility.ExecuteSQLQuery("UPDATE  Stock  SET  Quantity='" + clsUtility.num_repl(txtOpeningStock.Text) + "',  ExpiryDate='" + ExpiryDate.ToString() + "', WarehouseID='" + cmbWarehouse.SelectedValue.ToString() + "',  SHELF_ID='" + clsUtility.fltr_combo(cmbShelf).ToString() + "', Expiry='" + Expiry.ToString() + "'  WHERE  ITEM_ID ='" + ITEM_ID + "'  AND  WarehouseID='" + WarehouseID + "'  ");

                        UploadImage(txtItemID.Text);
                        btnReset.PerformClick();

                        txtItemID.Text = "";
                        clsUtility.MesgBoxShow("msgUpdate", "info");
                    }
                    catch (Exception ex) { MessageBox.Show(ex.Message); }
                    //////////////////////////////
                }
                ///////////////////////////////////////////
            }
            else
            {
                clsUtility.MesgBoxShow("msgPermission", "err");
            }
        }
Exemplo n.º 12
0
 /// <summary>
 /// ExpiyDate 转换为字符串
 /// </summary>
 /// <returns></returns>
 public string GetStrExpiryDate()
 {
     strExpiryDate = ExpiryDate.ToString("yyyyMMdd");
     return(strExpiryDate);
 }
Exemplo n.º 13
0
 private void CopyTo(RequestCreditCardInfo clone)
 {
     clone.CardNumber = CardNumber;
     clone.Cvv        = Cvv;
     clone.ExpiryDate = ExpiryDate.Parse(ExpiryDate.ToString());
 }
Exemplo n.º 14
0
 /// <summary>
 /// Overrides the ToString() method to show the info of the object
 /// </summary>
 /// <returns></returns>
 public override string ToString()
 {
     return(base.ToString() + $" Expiry Date: {ExpiryDate.ToString("MM/yy")}. Online use: {UsableOnline}. International use: {UsableInternationaly}");
 }
 public override string ToString()
 {
     return($"Subject: '{Subject}'\nExpires: {ExpiryDate.ToString("s")}\nThumb.: {Thumbprint}");
 }
Exemplo n.º 16
0
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            clsUtility.ExecuteSQLQuery(" SELECT  * FROM   Users  WHERE   USER_ID = '" + clsUtility.UserID + "' AND   Can_Add = 'Y' ");
            if (clsUtility.sqlDT.Rows.Count > 0)
            {
                ///////////////////////////////////////////
                if (string.IsNullOrWhiteSpace(this.txtItemName.Text) | string.IsNullOrWhiteSpace(this.txtUnit.Text) | cmbGroup.SelectedValue == null | cmbGroup.SelectedIndex == -1 | cmbDefaultWarehouse.SelectedValue == null | cmbDefaultWarehouse.SelectedIndex == -1)
                {
                    errorProvider.SetError(txtItemName, "Required");
                    errorProvider.SetError(txtUnit, "Required");
                    errorProvider.SetError(cmbGroup, "Required");
                    errorProvider.SetError(cmbDefaultWarehouse, "Required");
                }
                else
                {
                    string Expiry, ExpiryDate;
                    if (chkExp.Checked)
                    {
                        ExpiryDate = dtpExpDate.Value.Date.ToString("yyyy-MM-dd"); Expiry = "Y";
                    }
                    else
                    {
                        ExpiryDate = ""; Expiry = "N";
                    }

                    if (chkAutoBarcode.Checked)
                    {
                        errorProvider.Clear();
                        string barcode       = null;
                        string VATapplicable = null;
                        string ITEM_ID       = null;
                        if (cbVATapplicable.Checked)
                        {
                            VATapplicable = "Y";
                        }
                        else
                        {
                            VATapplicable = "N";
                        }
                        try
                        {
                            ///////////////////////////

                            clsUtility.ExecuteSQLQuery(" INSERT INTO ItemInformation(ItemName,UnitOfMeasure,Batch,GROUP_ID,Barcode,Cost,Price,ReorderPoint,VAT_Applicable, WarehouseID) VALUES " +
                                                       "  ('" + txtItemName.Text + "','" + txtUnit.Text + "','" + txtBatch.Text + "','" + cmbGroup.SelectedValue.ToString() + "','" + clsUtility.GenarateAutoBarcode(barcode) + "','" + clsUtility.num_repl(txtPurchaseCost.Text) + "','" + clsUtility.num_repl(txtSalesPrice.Text) + "','" + clsUtility.num_repl(txtReorderPoint.Text) + "','" + VATapplicable + "','" + cmbDefaultWarehouse.SelectedValue.ToString() + "') ");
                            clsUtility.ExecuteSQLQuery("SELECT  ITEM_ID   FROM   ItemInformation  ORDER BY ITEM_ID DESC");
                            ITEM_ID = clsUtility.sqlDT.Rows[0]["ITEM_ID"].ToString();
                            clsUtility.ExecuteSQLQuery(" INSERT INTO Stock(ITEM_ID,Quantity,ExpiryDate,WarehouseID, SHELF_ID, Expiry) VALUES ('" + ITEM_ID + "','" + clsUtility.num_repl(txtOpeningStock.Text) + "','" + ExpiryDate.ToString() + "','" + cmbWarehouse.SelectedValue.ToString() + "', '" + clsUtility.fltr_combo(cmbShelf) + "', '" + Expiry + "') ");
                            UploadImage(ITEM_ID);
                            btnReset.PerformClick();
                            clsUtility.MesgBoxShow("msgSaved", "info");
                            ///////////////////
                        }
                        catch (Exception ex) { MessageBox.Show(ex.Message); }
                    }
                    else
                    {
                        if (string.IsNullOrWhiteSpace(this.txtBarcode.Text))
                        {
                            errorProvider.SetError(txtBarcode, "Required");
                        }
                        else
                        {
                            errorProvider.Clear();
                            string VATapplicable = null;
                            if (cbVATapplicable.Checked)
                            {
                                VATapplicable = "Y";
                            }
                            else
                            {
                                VATapplicable = "N";
                            }
                            try
                            {
                                string ITEM_ID = null;
                                clsUtility.ExecuteSQLQuery(" INSERT INTO ItemInformation(ItemName,UnitOfMeasure,Batch,GROUP_ID,Barcode,Cost,Price,ReorderPoint,VAT_Applicable, WarehouseID) VALUES " +
                                                           "  ('" + txtItemName.Text + "','" + txtUnit.Text + "','" + txtBatch.Text + "','" + cmbGroup.SelectedValue.ToString() + "','" + txtBarcode.Text + "','" + clsUtility.num_repl(txtPurchaseCost.Text) + "','" + clsUtility.num_repl(txtSalesPrice.Text) + "','" + clsUtility.num_repl(txtReorderPoint.Text) + "','" + VATapplicable + "','" + cmbDefaultWarehouse.SelectedValue.ToString() + "') ");
                                clsUtility.ExecuteSQLQuery("SELECT  ITEM_ID   FROM   ItemInformation  ORDER BY ITEM_ID DESC");
                                ITEM_ID = clsUtility.sqlDT.Rows[0]["ITEM_ID"].ToString();
                                clsUtility.ExecuteSQLQuery(" INSERT INTO Stock(ITEM_ID,Quantity,ExpiryDate,WarehouseID, SHELF_ID, Expiry) VALUES ('" + ITEM_ID + "','" + clsUtility.num_repl(txtOpeningStock.Text) + "','" + ExpiryDate.ToString() + "','" + cmbWarehouse.SelectedValue.ToString() + "', '" + clsUtility.fltr_combo(cmbShelf) + "', '" + Expiry + "') ");
                                UploadImage(ITEM_ID);
                                btnReset.PerformClick();
                                clsUtility.MesgBoxShow("msgSaved", "info");
                            }
                            catch (Exception ex) { MessageBox.Show(ex.Message); }
                        }
                    }
                }
                ///////////////////////////////////////////
            }
            else
            {
                clsUtility.MesgBoxShow("msgPermission", "err");
            }
        }
Exemplo n.º 17
0
        public bool HaveColumn(string columnName, string columnValue, out bool retValueMatched)
        {
            bool ret          = false;
            bool valueMatched = false;

            if (columnName == "InfoPageID")
            {
                ret = true;
                if (InfoPageID.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "InfoPageGUID")
            {
                ret = true;
                if (InfoPageGUID.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "RevisionNo")
            {
                ret = true;
                if (RevisionNo.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "UserID")
            {
                ret = true;
                if (UserID.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "UserGUID")
            {
                ret = true;
                if (UserGUID.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "CreatedDate")
            {
                ret = true;
                if (CreatedDate.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "LastUpdateDate")
            {
                ret = true;
                if (LastUpdateDate.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "CreatedUserID")
            {
                ret = true;
                if (CreatedUserID.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "CreatedUserGUID")
            {
                ret = true;
                if (CreatedUserGUID.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "InfoPageName")
            {
                ret = true;
                if (InfoPageName.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "InfoPageDescription")
            {
                ret = true;
                if (InfoPageDescription.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "InfoCategoryID")
            {
                ret = true;
                if (InfoCategoryID.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "InfoCategoryGUID")
            {
                ret = true;
                if (InfoCategoryGUID.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "AccessGroupID")
            {
                ret = true;
                if (AccessGroupID.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "AccessGroupGUID")
            {
                ret = true;
                if (AccessGroupGUID.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "AsyncLoading")
            {
                ret = true;
                if (AsyncLoading.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "Commentable")
            {
                ret = true;
                if (Commentable.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "CommentorRoleList")
            {
                ret = true;
                if (CommentorRoleList.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "CommentorGroupList")
            {
                ret = true;
                if (CommentorGroupList.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "CommentorHideRoleList")
            {
                ret = true;
                if (CommentorHideRoleList.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "CommentorHideGroupList")
            {
                ret = true;
                if (CommentorHideGroupList.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "IsActive")
            {
                ret = true;
                if (IsActive.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "ExpiryDate")
            {
                ret = true;
                if (ExpiryDate.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "IsCommon")
            {
                ret = true;
                if (IsCommon.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "IsPublic")
            {
                ret = true;
                if (IsPublic.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "Sequence")
            {
                ret = true;
                if (Sequence.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            if (columnName == "IsDeleted")
            {
                ret = true;
                if (IsDeleted.ToString() == columnValue)
                {
                    valueMatched = true;
                }
            }
            retValueMatched = valueMatched;
            return(ret);
        }
Exemplo n.º 18
0
        private void initializeMainTable()
        {
            MainTable = new List <List <object> >();
            MainTable.Add(new List <object> {
                new { text = OfferType, colSpan = 4, bold = true, fontSize = 14, fillColor = "#EEE" }, new { }, new { }, new { }
            });
            MainTable.Add(new List <object> {
                new { text = CompanyName, colSpan = 3, bold = true, fillColor = "#EEE" }, new { }, new { }, new { text = (BidReceivedDate == null) ? "-" : BidReceivedDate?.ToString("dd-MM-yy"), fillColor = "#EEE" }
            });
            MainTable.Add(new List <object> {
                new { text = "", colSpan = 2, bold = true, fillColor = "#EEE" }, new { }, "Expiry: ", (ExpiryDate == null) ? "-" : ExpiryDate?.ToString("dd-MM-yy")
            });
            MainTable.Add(new List <object> {
                new { text = "", colSpan = 2, bold = true, fillColor = "#EEE" }, new { }, "Reference Number: ", ReferenceNumber ?? "-"
            });

            if (VendorResponse == VendorResponse.Responded)
            {
                MainTable.Add(new List <object> {
                    new { text = "Description", bold = true }, new { text = "Quantity", bold = true }, new { text = "Unit Price", bold = true }, new { text = "Total", bold = true }
                });

                var i = 0;

                foreach (var item in ScopeItems)
                {
                    List <object> row = new List <object>();
                    row.Add((++i).ToString() + ". " + item.Description);

                    row.Add(item.Quantity);
                    row.Add(item.UnitPrice.ToString());
                    row.Add(item.TotalPrice.ToString());
                    MainTable.Add(row);
                }
                i = 0;
            }
            else
            {
                MainTable.Add(new List <object> {
                    new { text = "Description", bold = true }, new { text = "Quantity", bold = true }, new { text = "Unit Price", bold = true }, new { text = "Total", bold = true }
                });
                MainTable.Add(new List <object> {
                    new { colSpan = 4, rowSpan = 4, alignment = "center", text = BriefDescription }, new { }, new { }, new { }
                });
            }

            _mainRows = MainTable.Count;
        }
Exemplo n.º 19
0
 /// <summary>
 /// Overrides the ToString() method to show the info of the object
 /// </summary>
 /// <returns></returns>
 public override string ToString()
 {
     return(base.ToString() + $" MonthlyLimit: {MonthlyLimit}. Expiry Date: {ExpiryDate.ToString("MM/yy")}. Credit limit: {CreditLimit}. Daily limit: {DailyLimit}");
 }
Exemplo n.º 20
0
        public string GetProperty(string propertyName, string format, CultureInfo formatProvider, UserInfo accessingUser, Scope accessLevel, ref bool propertyNotFound)
        {
            var outputFormat = string.Empty;

            if (format == string.Empty)
            {
                outputFormat = "g";
            }
            var lowerPropertyName = propertyName.ToLowerInvariant();

            if (accessLevel == Scope.NoSettings)
            {
                propertyNotFound = true;
                return(PropertyAccess.ContentLocked);
            }
            propertyNotFound = true;
            var result   = string.Empty;
            var isPublic = true;

            switch (lowerPropertyName)
            {
            case "url":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(PortalAlias.HTTPAlias, format);
                break;

            case "fullurl":     //return portal alias with protocol
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(Globals.AddHTTP(PortalAlias.HTTPAlias), format);
                break;

            case "passwordreminderurl":     //if regsiter page defined in portal settings, then get that page url, otherwise return home page.
                propertyNotFound = false;
                var reminderUrl = Globals.AddHTTP(PortalAlias.HTTPAlias);
                if (RegisterTabId > Null.NullInteger)
                {
                    reminderUrl = Globals.RegisterURL(string.Empty, string.Empty);
                }
                result = PropertyAccess.FormatString(reminderUrl, format);
                break;

            case "portalid":
                propertyNotFound = false;
                result           = (PortalId.ToString(outputFormat, formatProvider));
                break;

            case "portalname":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(PortalName, format);
                break;

            case "homedirectory":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(HomeDirectory, format);
                break;

            case "homedirectorymappath":
                isPublic         = false;
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(HomeDirectoryMapPath, format);
                break;

            case "logofile":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(LogoFile, format);
                break;

            case "footertext":
                propertyNotFound = false;
                var footerText = FooterText.Replace("[year]", DateTime.Now.Year.ToString());
                result = PropertyAccess.FormatString(footerText, format);
                break;

            case "expirydate":
                isPublic         = false;
                propertyNotFound = false;
                result           = (ExpiryDate.ToString(outputFormat, formatProvider));
                break;

            case "userregistration":
                isPublic         = false;
                propertyNotFound = false;
                result           = (UserRegistration.ToString(outputFormat, formatProvider));
                break;

            case "banneradvertising":
                isPublic         = false;
                propertyNotFound = false;
                result           = (BannerAdvertising.ToString(outputFormat, formatProvider));
                break;

            case "currency":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(Currency, format);
                break;

            case "administratorid":
                isPublic         = false;
                propertyNotFound = false;
                result           = (AdministratorId.ToString(outputFormat, formatProvider));
                break;

            case "email":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(Email, format);
                break;

            case "hostfee":
                isPublic         = false;
                propertyNotFound = false;
                result           = (HostFee.ToString(outputFormat, formatProvider));
                break;

            case "hostspace":
                isPublic         = false;
                propertyNotFound = false;
                result           = (HostSpace.ToString(outputFormat, formatProvider));
                break;

            case "pagequota":
                isPublic         = false;
                propertyNotFound = false;
                result           = (PageQuota.ToString(outputFormat, formatProvider));
                break;

            case "userquota":
                isPublic         = false;
                propertyNotFound = false;
                result           = (UserQuota.ToString(outputFormat, formatProvider));
                break;

            case "administratorroleid":
                isPublic         = false;
                propertyNotFound = false;
                result           = (AdministratorRoleId.ToString(outputFormat, formatProvider));
                break;

            case "administratorrolename":
                isPublic         = false;
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(AdministratorRoleName, format);
                break;

            case "registeredroleid":
                isPublic         = false;
                propertyNotFound = false;
                result           = (RegisteredRoleId.ToString(outputFormat, formatProvider));
                break;

            case "registeredrolename":
                isPublic         = false;
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(RegisteredRoleName, format);
                break;

            case "description":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(Description, format);
                break;

            case "keywords":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(KeyWords, format);
                break;

            case "backgroundfile":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(BackgroundFile, format);
                break;

            case "admintabid":
                isPublic         = false;
                propertyNotFound = false;
                result           = AdminTabId.ToString(outputFormat, formatProvider);
                break;

            case "supertabid":
                isPublic         = false;
                propertyNotFound = false;
                result           = SuperTabId.ToString(outputFormat, formatProvider);
                break;

            case "splashtabid":
                isPublic         = false;
                propertyNotFound = false;
                result           = SplashTabId.ToString(outputFormat, formatProvider);
                break;

            case "hometabid":
                isPublic         = false;
                propertyNotFound = false;
                result           = HomeTabId.ToString(outputFormat, formatProvider);
                break;

            case "logintabid":
                isPublic         = false;
                propertyNotFound = false;
                result           = LoginTabId.ToString(outputFormat, formatProvider);
                break;

            case "registertabid":
                isPublic         = false;
                propertyNotFound = false;
                result           = RegisterTabId.ToString(outputFormat, formatProvider);
                break;

            case "usertabid":
                isPublic         = false;
                propertyNotFound = false;
                result           = UserTabId.ToString(outputFormat, formatProvider);
                break;

            case "defaultlanguage":
                propertyNotFound = false;
                result           = PropertyAccess.FormatString(DefaultLanguage, format);
                break;

            case "users":
                isPublic         = false;
                propertyNotFound = false;
                result           = Users.ToString(outputFormat, formatProvider);
                break;

            case "pages":
                isPublic         = false;
                propertyNotFound = false;
                result           = Pages.ToString(outputFormat, formatProvider);
                break;

            case "contentvisible":
                isPublic = false;
                break;

            case "controlpanelvisible":
                isPublic         = false;
                propertyNotFound = false;
                result           = PropertyAccess.Boolean2LocalizedYesNo(ControlPanelVisible, formatProvider);
                break;
            }
            if (!isPublic && accessLevel != Scope.Debug)
            {
                propertyNotFound = true;
                result           = PropertyAccess.ContentLocked;
            }
            return(result);
        }
Exemplo n.º 21
0
 void Stickers_BeforeWriting(IDatabaseObject item, IDBObjectWritingOptions writingOptions, ref bool cancel)
 {
     if (IsModified)
     {
         Description = string.Format("{0} - {2}; кол-во - {1}", Nomenclature.Description, Quantity, ExpiryDate.ToString(DATE_FORMAT));
     }
 }