protected void Page_Load(object sender, EventArgs e) { lblAvialable.Text = GetString("com.department.defaulttaxes"); mDepartmentId = QueryHelper.GetInteger("departmentid", 0); if (mDepartmentId > 0) { mDepartmentInfoObj = DepartmentInfoProvider.GetDepartmentInfo(mDepartmentId); EditedObject = mDepartmentInfoObj; if (mDepartmentInfoObj != null) { CheckEditedObjectSiteID(mDepartmentInfoObj.DepartmentSiteID); // Get tax classes assigned to department DataSet ds = TaxClassInfoProvider.GetDepartmentTaxClasses(mDepartmentId); if (!DataHelper.DataSourceIsEmpty(ds)) { mCurrentValues = TextHelper.Join(";", SystemDataHelper.GetStringValues(ds.Tables[0], "TaxClassID")); } if (!RequestHelper.IsPostBack()) { uniSelector.Value = mCurrentValues; } } } uniSelector.IconPath = GetObjectIconUrl("ecommerce.taxclass", "object.png"); uniSelector.OnSelectionChanged += uniSelector_OnSelectionChanged; uniSelector.WhereCondition = GetSelectorWhereCondition(); }
protected void Page_Load(object sender, EventArgs e) { if (IsMultiStoreConfiguration) { CheckUIElementAccessHierarchical(ModuleName.ECOMMERCE, "Ecommerce.GlobalDepartments.DefaultTaxClasses"); } else { CheckUIElementAccessHierarchical(ModuleName.ECOMMERCE, "Configuration.Departments.TaxClasses"); } mDepartmentId = QueryHelper.GetInteger("objectId", 0); if (mDepartmentId > 0) { mDepartmentInfoObj = DepartmentInfoProvider.GetDepartmentInfo(mDepartmentId); EditedObject = mDepartmentInfoObj; if (mDepartmentInfoObj != null) { CheckEditedObjectSiteID(mDepartmentInfoObj.DepartmentSiteID); // Get tax classes assigned to department DataSet ds = TaxClassInfoProvider.GetDepartmentTaxClasses(mDepartmentId); if (!DataHelper.DataSourceIsEmpty(ds)) { mCurrentValues = TextHelper.Join(";", DataHelper.GetStringValues(ds.Tables[0], "TaxClassID")); } if (!RequestHelper.IsPostBack()) { uniSelector.Value = mCurrentValues; } } } uniSelector.OnSelectionChanged += uniSelector_OnSelectionChanged; uniSelector.WhereCondition = GetSelectorWhereCondition(); }
protected void Page_Load(object sender, EventArgs e) { // Check permissions for CMS Desk -> Ecommerce if (!CMSContext.CurrentUser.IsAuthorizedPerUIElement("CMS.Ecommerce", "Configuration.Departments.TaxClasses")) { RedirectToCMSDeskUIElementAccessDenied("CMS.Ecommerce", "Configuration.Departments.TaxClasses"); } lblAvialable.Text = GetString("com.department.defaulttaxes"); mDepartmentId = QueryHelper.GetInteger("departmentid", 0); if (mDepartmentId > 0) { mDepartmentInfoObj = DepartmentInfoProvider.GetDepartmentInfo(mDepartmentId); EditedObject = mDepartmentInfoObj; if (mDepartmentInfoObj != null) { CheckEditedObjectSiteID(mDepartmentInfoObj.DepartmentSiteID); DataSet ds = TaxClassInfoProvider.GetDepartmentTaxClasses(mDepartmentId); if (!DataHelper.DataSourceIsEmpty(ds)) { mCurrentValues = TextHelper.Join(";", SqlHelperClass.GetStringValues(ds.Tables[0], "TaxClassID")); } if (!RequestHelper.IsPostBack()) { uniSelector.Value = mCurrentValues; } } } uniSelector.IconPath = GetObjectIconUrl("ecommerce.taxclass", "object.png"); uniSelector.OnSelectionChanged += uniSelector_OnSelectionChanged; uniSelector.WhereCondition = GetSelectorWhereCondition(); }