コード例 #1
0
        private void FillDropDowns()
        {
            this.ddlTaxCategory.Items.Clear();
            ListItem itemTaxCategory = new ListItem("---", "0");

            this.ddlTaxCategory.Items.Add(itemTaxCategory);
            TaxCategoryCollection taxCategoryCollection = TaxCategoryManager.GetAllTaxCategories();

            foreach (TaxCategory taxCategory in taxCategoryCollection)
            {
                ListItem item2 = new ListItem(taxCategory.Name, taxCategory.TaxCategoryID.ToString());
                this.ddlTaxCategory.Items.Add(item2);
            }

            this.ddlWarehouse.Items.Clear();
            ListItem itemWarehouse = new ListItem("---", "0");

            this.ddlWarehouse.Items.Add(itemWarehouse);
            WarehouseCollection warehouseCollection = WarehouseManager.GetAllWarehouses();

            foreach (Warehouse warehouse in warehouseCollection)
            {
                ListItem item2 = new ListItem(warehouse.Name, warehouse.WarehouseID.ToString());
                this.ddlWarehouse.Items.Add(item2);
            }

            CommonHelper.FillDropDownWithEnum(this.ddlLowStockActivity, typeof(LowStockActivityEnum));
        }
コード例 #2
0
        protected void FillDropDowns()
        {
            CommonHelper.FillDropDownWithEnum(this.ddlTaxDisplayType, typeof(TaxDisplayTypeEnum));
            CommonHelper.FillDropDownWithEnum(this.ddlTaxBasedOn, typeof(TaxBasedOnEnum));

            TaxCategoryCollection taxCategoryCollection = TaxCategoryManager.GetAllTaxCategories();

            this.ddlShippingTaxClass.Items.Clear();
            ListItem itemShippingTaxCategory = new ListItem("---", "0");

            this.ddlShippingTaxClass.Items.Add(itemShippingTaxCategory);
            foreach (TaxCategory taxCategory in taxCategoryCollection)
            {
                ListItem item2 = new ListItem(taxCategory.Name, taxCategory.TaxCategoryID.ToString());
                this.ddlShippingTaxClass.Items.Add(item2);
            }

            this.ddlPaymentMethodAdditionalFeeTaxClass.Items.Clear();
            ListItem itemPaymentMethodAdditionalFeeTaxCategory = new ListItem("---", "0");

            this.ddlPaymentMethodAdditionalFeeTaxClass.Items.Add(itemPaymentMethodAdditionalFeeTaxCategory);
            foreach (TaxCategory taxCategory in taxCategoryCollection)
            {
                ListItem item2 = new ListItem(taxCategory.Name, taxCategory.TaxCategoryID.ToString());
                this.ddlPaymentMethodAdditionalFeeTaxClass.Items.Add(item2);
            }
        }
コード例 #3
0
        void BindGrid()
        {
            TaxCategoryCollection taxCategoryCollection = TaxCategoryManager.GetAllTaxCategories();

            gvTaxCategories.DataSource = taxCategoryCollection;
            gvTaxCategories.DataBind();
        }
コード例 #4
0
        private void FillDropDowns()
        {
            CommonHelper.FillDropDownWithEnum(this.ddlGiftCardType, typeof(GiftCardTypeEnum));

            CommonHelper.FillDropDownWithEnum(this.ddlDownloadActivationType, typeof(DownloadActivationTypeEnum));

            CommonHelper.FillDropDownWithEnum(this.ddlCyclePeriod, typeof(RecurringProductCyclePeriodEnum));

            this.ddlTaxCategory.Items.Clear();
            ListItem itemTaxCategory = new ListItem("---", "0");

            this.ddlTaxCategory.Items.Add(itemTaxCategory);
            var taxCategoryCollection = TaxCategoryManager.GetAllTaxCategories();

            foreach (TaxCategory taxCategory in taxCategoryCollection)
            {
                ListItem item2 = new ListItem(taxCategory.Name, taxCategory.TaxCategoryId.ToString());
                this.ddlTaxCategory.Items.Add(item2);
            }

            this.ddlWarehouse.Items.Clear();
            ListItem itemWarehouse = new ListItem("---", "0");

            this.ddlWarehouse.Items.Add(itemWarehouse);
            var warehouseCollection = WarehouseManager.GetAllWarehouses();

            foreach (Warehouse warehouse in warehouseCollection)
            {
                ListItem item2 = new ListItem(warehouse.Name, warehouse.WarehouseId.ToString());
                this.ddlWarehouse.Items.Add(item2);
            }

            CommonHelper.FillDropDownWithEnum(this.ddlLowStockActivity, typeof(LowStockActivityEnum));
        }
コード例 #5
0
        private void BindData()
        {
            var taxCategories = TaxCategoryManager.GetAllTaxCategories();

            gvTaxCategories.DataSource = taxCategories;
            gvTaxCategories.DataBind();
        }
コード例 #6
0
        protected void FillTaxCategoryDropDown()
        {
            this.ddlTaxCategory.Items.Clear();
            TaxCategoryCollection taxCategories = TaxCategoryManager.GetAllTaxCategories();

            foreach (TaxCategory taxCategory in taxCategories)
            {
                ListItem ddlTaxCategoryItem2 = new ListItem(taxCategory.Name, taxCategory.TaxCategoryID.ToString());
                this.ddlTaxCategory.Items.Add(ddlTaxCategoryItem2);
            }
        }
コード例 #7
0
        private void FillDropDowns()
        {
            this.ddlTaxCategory.Items.Clear();
            ListItem itemTaxCategory = new ListItem("---", "0");

            this.ddlTaxCategory.Items.Add(itemTaxCategory);
            var taxCategoryCollection = TaxCategoryManager.GetAllTaxCategories();

            foreach (TaxCategory taxCategory in taxCategoryCollection)
            {
                ListItem item2 = new ListItem(taxCategory.Name, taxCategory.TaxCategoryId.ToString());
                this.ddlTaxCategory.Items.Add(item2);
            }

            CommonHelper.FillDropDownWithEnum(ddlAttributeControlType, typeof(AttributeControlTypeEnum));
        }
コード例 #8
0
ファイル: TaxCategoryInfo.ascx.cs プロジェクト: terry2012/DSV
        public TaxCategory SaveInfo()
        {
            TaxCategory taxCategory = TaxCategoryManager.GetTaxCategoryById(this.TaxCategoryId);

            if (taxCategory != null)
            {
                taxCategory = TaxCategoryManager.UpdateTaxCategory(taxCategory.TaxCategoryId, txtName.Text,
                                                                   txtDisplayOrder.Value, taxCategory.CreatedOn, DateTime.UtcNow);
            }
            else
            {
                DateTime now = DateTime.UtcNow;
                taxCategory = TaxCategoryManager.InsertTaxCategory(txtName.Text, txtDisplayOrder.Value, now, now);
            }

            return(taxCategory);
        }
コード例 #9
0
ファイル: TaxCategoryInfo.ascx.cs プロジェクト: terry2012/DSV
        private void BindData()
        {
            TaxCategory taxCategory = TaxCategoryManager.GetTaxCategoryById(this.TaxCategoryId);

            if (taxCategory != null)
            {
                this.txtName.Text          = taxCategory.Name;
                this.txtDisplayOrder.Value = taxCategory.DisplayOrder;
                this.pnlCreatedOn.Visible  = true;
                this.pnlUpdatedOn.Visible  = true;
                this.lblCreatedOn.Text     = DateTimeHelper.ConvertToUserTime(taxCategory.CreatedOn, DateTimeKind.Utc).ToString();
                this.lblUpdatedOn.Text     = DateTimeHelper.ConvertToUserTime(taxCategory.UpdatedOn, DateTimeKind.Utc).ToString();
            }
            else
            {
                this.pnlCreatedOn.Visible = false;
                this.pnlUpdatedOn.Visible = false;
            }
        }
コード例 #10
0
 protected void DeleteButton_Click(object sender, EventArgs e)
 {
     TaxCategoryManager.DeleteTaxCategory(this.TaxCategoryId);
     Response.Redirect("TaxCategories.aspx");
 }