protected void Page_Load(object sender, EventArgs e)
    {
        Grid1.ID = "Grid1";
        Grid1.DataSourceID = "SqlDataSource1";
        Grid1.AutoGenerateColumns = false;
        Grid1.AllowAddingRecords = false;
        Grid1.Serialize = false;
        Grid1.AllowColumnReordering = true;
        Grid1.RowExported += Grid1_RowExported;
        Grid1.ExportingSettings.ExportHiddenColumns = true;

        // creating the columns
       
        Column oCol1 = new Column();
        oCol1.DataField = "OrderID";
        oCol1.HeaderText = "ORDER ID";
        oCol1.Visible = false;

        Column oCol2 = new Column();
        oCol2.DataField = "ShipName";
        oCol2.HeaderText = "NAME";

        Column oCol3 = new Column();
        oCol3.DataField = "ShipCity";
        oCol3.HeaderText = "CITY";
        oCol3.Width = "125";

        Column oCol4 = new Column();
        oCol4.DataField = "ShipPostalCode";
        oCol4.HeaderText = "POSTAL CODE";
        oCol4.Width = "125";

        Column oCol5 = new Column();
        oCol5.DataField = "ShipCountry";
        oCol5.HeaderText = "COUNTRY";
        oCol5.Width = "125";

        CheckBoxColumn oCol6 = new CheckBoxColumn();
        oCol6.DataField = "Sent";
        oCol6.HeaderText = "SENT";
        oCol6.Width = "95";
        oCol6.ShowHeader = true;
               
        // add the columns to the Columns collection of the grid
        Grid1.Columns.Add(oCol1);
        Grid1.Columns.Add(oCol2);
        Grid1.Columns.Add(oCol3);
        Grid1.Columns.Add(oCol4);
        Grid1.Columns.Add(oCol5);
        Grid1.Columns.Add(oCol6);


        // add the grid to the controls collection of the PlaceHolder
        phGrid1.Controls.Add(Grid1);


    }
    protected void Page_Load(object sender, EventArgs e)
    {
        grid1.ID = "Grid1";
        grid1.DataSourceID = "SqlDataSource1";
        grid1.AutoGenerateColumns = false;
        grid1.AllowColumnReordering = true;
        grid1.AllowAddingRecords = true;
        grid1.Serialize = false;
       
        // creating the columns
        Column oCol1 = new Column();
        oCol1.DataField = "OrderID";
        oCol1.Visible = false;

        Column oCol2 = new Column();
        oCol2.DataField = "ShipName";
        oCol2.HeaderText = "SHIP NAME";
      
        Column oCol3 = new Column();
        oCol3.DataField = "ShipCity";
        oCol3.HeaderText = "SHIP CITY";
          
        Column oCol4 = new Column();
        oCol4.DataField = "ShipPostalCode";
        oCol4.HeaderText = "POSTAL CODE";
        
        Column oCol5 = new Column();
        oCol5.DataField = "ShipCountry";
        oCol5.HeaderText = "SHIP COUNTRY";

        CheckBoxColumn oCol6 = new CheckBoxColumn();
        oCol6.DataField = "Sent";
        oCol6.HeaderText = "SENT";
        oCol6.Width = "75";
        oCol6.ShowHeader = true; 

        Column oCol7 = new Column();
        oCol7.AllowEdit = true;
        oCol7.AllowDelete = true;
      
        // add the columns to the Columns collection of the grid
        grid1.Columns.Add(oCol1);
        grid1.Columns.Add(oCol2);
        grid1.Columns.Add(oCol3);
        grid1.Columns.Add(oCol4);
        grid1.Columns.Add(oCol5);
        grid1.Columns.Add(oCol6);
        grid1.Columns.Add(oCol7);

        // add the grid to the controls collection of the PlaceHolder
        phGrid1.Controls.Add(grid1);


        ((CheckBoxColumn)grid1.Columns[5]).ControlType = RbtnStandard.Checked ? GridControlType.Standard : GridControlType.Obout;
    }
Beispiel #3
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            SiteSettings masterSettings = SettingsManager.GetMasterSettings(true);

            this.Page.Title = masterSettings.SiteName;
            Utility.RegisterTypeForAjax(typeof(ManageMembers));
            this.LoadParameters();
            this.reUrl = base.Request.Url.ToString();
            if (!this.Page.IsPostBack)
            {
                this.ViewState["ClientType"] = ((base.Request.QueryString["clientType"] != null) ? base.Request.QueryString["clientType"] : null);
                this.BindDDL();
                this.BindData();
                this.ValidSmsNum = this.GetSmsValidCount().ToString();
            }
            CheckBoxColumn.RegisterClientCheckEvents(this.Page, this.Page.Form.ClientID);
        }
Beispiel #4
0
        /// <summary>
        /// Raises the PaintCell event
        /// </summary>
        /// <param name="e">A PaintCellEventArgs that contains the event data</param>
        public override void OnPaintCell(PaintCellEventArgs e)
        {
            if (e.Table.ColumnModel.Columns[e.Column] is CheckBoxColumn)
            {
                CheckBoxColumn column = (CheckBoxColumn)e.Table.ColumnModel.Columns[e.Column];

                this.checkSize = column.CheckSize;
                this.drawText  = column.DrawText;
            }
            else
            {
                this.checkSize = new Size(13, 13);
                this.drawText  = true;
            }

            base.OnPaintCell(e);
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!int.TryParse(this.Page.Request.QueryString["topicid"], out this.topicid))
     {
         base.GotoResourceNotFound();
     }
     else
     {
         if (!base.IsPostBack)
         {
             this.DoCallback();
         }
         this.btnSearch.Click += new EventHandler(this.btnSearch_Click);
         this.btnAdd.Click    += new EventHandler(this.btnAdd_Click);
         CheckBoxColumn.RegisterClientCheckEvents(this.Page, this.Page.Form.ClientID);
     }
 }
Beispiel #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     wid = GetCurWebId();
     if (string.IsNullOrEmpty(wid))
     {
         return;
     }
     Utility.RegisterTypeForAjax(typeof(ManageMembers));
     this.LoadParameters();
     if (!this.Page.IsPostBack)
     {
         this.ViewState["ClientType"] = (base.Request.QueryString["clientType"] != null) ? base.Request.QueryString["clientType"] : null;
         this.BindDDL();
         this.BindData();
     }
     CheckBoxColumn.RegisterClientCheckEvents(this.Page, this.Page.Form.ClientID);
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     LoadParameters();
     btnSearch.Click         += new EventHandler(btnSearch_Click);
     grdProducts.ReBindData  += new Grid.ReBindDataEventHandler(grdProducts_ReBindData);
     btnUpShelf.Click        += new EventHandler(btnUpShelf_Click);
     btnOffShelf.Click       += new EventHandler(btnOffShelf_Click);
     btnDelete.Click         += new EventHandler(btnDelete_Click);
     btnAddOK.Click          += new EventHandler(btnAddOK_Click);
     btnReplaceOK.Click      += new EventHandler(btnReplaceOK_Click);
     grdProducts.RowDeleting += new GridViewDeleteEventHandler(grdProducts_RowDeleting);
     if (!Page.IsPostBack)
     {
         BindProducts();
     }
     CheckBoxColumn.RegisterClientCheckEvents(Page, Page.Form.ClientID);
 }
Beispiel #8
0
        /// <summary>
        /// Binds the Property Collection to the Grid
        /// </summary>
        /// <history>
        ///     [cnurse]	02/23/2006	created
        /// </history>
        private void BindGrid()
        {
            ProfilePropertyDefinitionCollection properties = GetProperties();
            bool allRequired = true;
            bool allVisible  = true;

            //Check whether the checkbox column headers are true or false
            foreach (ProfilePropertyDefinition profProperty in properties)
            {
                if (profProperty.Required == false)
                {
                    allRequired = false;
                }
                if (profProperty.Visible == false)
                {
                    allVisible = false;
                }

                if (!allRequired && !allVisible)
                {
                    goto endOfForLoop;
                }
            }
endOfForLoop:

            foreach (DataGridColumn column in grdProfileProperties.Columns)
            {
                if (column.GetType() == typeof(CheckBoxColumn))
                {
                    //Manage CheckBox column events
                    CheckBoxColumn cbColumn = (CheckBoxColumn)column;
                    if (cbColumn.DataField == "Required")
                    {
                        cbColumn.Checked = allRequired;
                    }
                    if (cbColumn.DataField == "Visible")
                    {
                        cbColumn.Checked = allVisible;
                    }
                }
            }
            grdProfileProperties.DataSource = properties;
            grdProfileProperties.DataBind();
        }
Beispiel #9
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(base.Request.QueryString["ActiveId"]))
     {
         int.TryParse(base.Request.QueryString["ActiveId"], out activeId);
     }
     LoadParameters();
     if (!Page.IsPostBack)
     {
         dropCategories.DataBind();
         dropCategories.SelectedValue = categoryId;
         BindProducts();
         PromotionInfo promotionInfoById = new PromotionInfo();
         promotionInfoById = SubsitePromoteHelper.GetPromotionInfoById(activeId);
         lblPromtion.Text  = promotionInfoById.Name;
         ProductIds        = SubsitePromoteHelper.GetPromotionProducts(activeId);
         BindPromoteProducts();
     }
     CheckBoxColumn.RegisterClientCheckEvents(Page, Page.Form.ClientID);
 }
Beispiel #10
0
        private static void SetupListView(JetListView listView, ItemTextCallback callback, ref CheckBoxColumn chkCol)
        {
            listView.ControlPainter = new GdiControlPainter();
            listView.NodeCollection.SetItemComparer(null, new TypeByNameComparer());

            chkCol = new CheckBoxColumn();
            chkCol.HandleAllClicks = true;
            listView.Columns.Add(chkCol);

            ResourceIconColumn iconColumn = new ResourceIconColumn();

            iconColumn.Width = 20;
            listView.Columns.Add(iconColumn);

            JetListViewColumn column = new JetListViewColumn();

            column.SizeToContent    = true;
            column.ItemTextCallback = callback;
            listView.Columns.Add(column);
        }
Beispiel #11
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(Page.Request.QueryString["ThemName"]))
     {
         base.GotoResourceNotFound();
     }
     else
     {
         themName = base.Request.QueryString["ThemName"];
         grdAdvPosition.RowDataBound += new GridViewRowEventHandler(grdAdvPosition_RowDataBound);
         grdAdvPosition.RowDeleting  += new GridViewDeleteEventHandler(grdAdvPosition_RowDeleting);
         lkbtnDeleteCheck.Click      += new EventHandler(lkbtnDeleteCheck_Click);
         if (!Page.IsPostBack)
         {
             hlinkAddAdv.NavigateUrl = Globals.ApplicationPath + "/Shopadmin/store/AddMyAdvPosition.aspx?ThemName=" + themName;
             litThemName.Text        = themName;
             BindAdv();
         }
         CheckBoxColumn.RegisterClientCheckEvents(Page, Page.Form.ClientID);
     }
 }
Beispiel #12
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     this.LoadParameters();
     this.btnSearch.Click         += new System.EventHandler(this.btnSearch_Click);
     this.grdProducts.ReBindData  += new Grid.ReBindDataEventHandler(this.grdProducts_ReBindData);
     this.grdProducts.RowDeleting += new System.Web.UI.WebControls.GridViewDeleteEventHandler(this.grdProducts_RowDeleting);
     this.btnDelete.Click         += new System.EventHandler(this.btnDelete_Click);
     if (!this.Page.IsPostBack)
     {
         if (!string.IsNullOrEmpty(this.Page.Request.QueryString["SortOrder"]))
         {
             this.grdProducts.SortOrder = this.Page.Request.QueryString["SortOrder"];
         }
         if (!string.IsNullOrEmpty(this.Page.Request.QueryString["SortOrderBy"]))
         {
             this.grdProducts.SortOrderBy = this.Page.Request.QueryString["SortOrderBy"];
         }
         this.BindProducts();
     }
     CheckBoxColumn.RegisterClientCheckEvents(this.Page, this.Page.Form.ClientID);
 }
Beispiel #13
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     this.LoadParameters();
     if (!this.Page.IsPostBack)
     {
         this.rankList.DataBind();
         this.rankList.SelectedValue = this.rankId;
         this.BindData();
         SiteSettings siteSetting = this.GetSiteSetting();
         if (siteSetting.SMSEnabled)
         {
             this.litsmscount.Text  = this.GetAmount(siteSetting).ToString();
             this.hdenablemsg.Value = "1";
         }
         if (siteSetting.EmailEnabled)
         {
             this.hdenableemail.Value = "1";
         }
     }
     CheckBoxColumn.RegisterClientCheckEvents(this.Page, this.Page.Form.ClientID);
 }
Beispiel #14
0
 protected void Page_Load(object sender, EventArgs e)
 {
     LoadParameters();
     btnSearch.Click         += new EventHandler(btnSearch_Click);
     grdProducts.ReBindData  += new Grid.ReBindDataEventHandler(grdProducts_ReBindData);
     grdProducts.RowDeleting += new GridViewDeleteEventHandler(grdProducts_RowDeleting);
     btnDelete.Click         += new EventHandler(btnDelete_Click);
     if (!Page.IsPostBack)
     {
         if (!string.IsNullOrEmpty(Page.Request.QueryString["SortOrder"]))
         {
             grdProducts.SortOrder = Page.Request.QueryString["SortOrder"];
         }
         if (!string.IsNullOrEmpty(Page.Request.QueryString["SortOrderBy"]))
         {
             grdProducts.SortOrderBy = Page.Request.QueryString["SortOrderBy"];
         }
         BindProducts();
     }
     CheckBoxColumn.RegisterClientCheckEvents(Page, Page.Form.ClientID);
 }
Beispiel #15
0
        public void SelectResources(string[] resTypes, IResourceList baseList, IResourceList selection)
        {
            SetSelectorMode();
            _checkedResources    = new List <int>();
            _selectionSourceList = baseList;

            _checkBoxColumn             = new CheckBoxColumn();
            _checkBoxColumn.AfterCheck += HandleAfterCheck;
            _listContacts.Columns.Insert(0, _checkBoxColumn);

            if (selection != null)
            {
                foreach (IResource res in selection)
                {
                    _checkedResources.Add(res.Id);
                }
            }
            _initialSelection = selection;

            Populate();
        }
        public OutlookOptionsPane_InfoStores()
        {
            // This call is required by the Windows.Forms Form Designer.
            InitializeComponent();
            _allStores = Core.ResourceStore.GetAllResources(STR.MAPIInfoStore);
            IResourceList supportedStores   = Core.ResourceStore.FindResourcesWithProp(STR.MAPIInfoStore, PROP.StoreSupported);
            IResourceList unsupportedStores = Core.ResourceStore.GetAllResources(STR.MAPIInfoStore).Minus(supportedStores);

            if (unsupportedStores.Count > 0)
            {
                label1.Text += " Please note that Omea does not support IMAP message stores.";
            }

            _checkBoxColumn = _lvInfoStores.AddCheckBoxColumn();
            _lvInfoStores.AllowColumnReorder = false;
            _lvInfoStores.DataProvider       = new DProvider(_allStores);
            _lvInfoStores.Columns.Add(new ResourceIconColumn());
            ResourceListView2Column nameCol = _lvInfoStores.AddColumn(Core.Props.Name);

            nameCol.AutoSize            = true;
            _checkBoxColumn.AfterCheck += HandleAfterCheck;
        }
Beispiel #17
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.CallBack();
     this.LoadParameters();
     if (!base.IsPostBack)
     {
         this.BindDistributors();
         this.exportFieldsCheckBoxList.Items.Remove(new ListItem("积分", "Points"));
         this.exportFieldsCheckBoxList.Items.Remove(new ListItem("生日", "BirthDate"));
         SiteSettings siteSetting = this.GetSiteSetting();
         if (siteSetting.SMSEnabled)
         {
             this.litsmscount.Text  = this.GetAmount(siteSetting).ToString();
             this.hdenablemsg.Value = "1";
         }
         if (siteSetting.EmailEnabled)
         {
             this.hdenableemail.Value = "1";
         }
     }
     CheckBoxColumn.RegisterClientCheckEvents(this.Page, this.Page.Form.ClientID);
 }
Beispiel #18
0
 protected void Page_Load(object sender, EventArgs e)
 {
     //dlstOrders.ItemDataBound += new DataListItemEventHandler(dlstOrders_ItemDataBound);
     //btnSearchButton.Click += new EventHandler(btnSearchButton_Click);
     //dlstOrders.ItemCommand += new DataListCommandEventHandler(dlstOrders_ItemCommand);
     //btnRemark.Click += new EventHandler(btnRemark_Click);
     //btnCloseOrder.Click += new EventHandler(btnCloseOrder_Click);
     //lkbtnDeleteCheck.Click += new EventHandler(lkbtnDeleteCheck_Click);
     //btnBatchPrintData.Click += new EventHandler(btnPrintOrder_Click);
     //btnBatchSendGoods.Click += new EventHandler(btnSendGoods_Click);
     if (!Page.IsPostBack)
     {
         shippingModeDropDownList.DataBind();
         ddlIsPrinted.Items.Clear();
         ddlIsPrinted.Items.Add(new ListItem("全部", string.Empty));
         ddlIsPrinted.Items.Add(new ListItem("已打印", "1"));
         ddlIsPrinted.Items.Add(new ListItem("未打印", "0"));
         SetOrderStatusLink();
         BindOrders();
     }
     CheckBoxColumn.RegisterClientCheckEvents(Page, Page.Form.ClientID);
 }
Beispiel #19
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     this.dlstOrders.ItemDataBound += new System.Web.UI.WebControls.DataListItemEventHandler(this.dlstOrders_ItemDataBound);
     this.btnSearchButton.Click    += new System.EventHandler(this.btnSearchButton_Click);
     this.dlstOrders.ItemCommand   += new System.Web.UI.WebControls.DataListCommandEventHandler(this.dlstOrders_ItemCommand);
     this.btnRemark.Click          += new System.EventHandler(this.btnRemark_Click);
     this.btnCloseOrder.Click      += new System.EventHandler(this.btnCloseOrder_Click);
     this.lkbtnDeleteCheck.Click   += new System.EventHandler(this.lkbtnDeleteCheck_Click);
     this.btnOrderGoods.Click      += new System.EventHandler(this.btnOrderGoods_Click);
     this.btnProductGoods.Click    += new System.EventHandler(this.btnProductGoods_Click);
     if (!this.Page.IsPostBack)
     {
         this.shippingModeDropDownList.DataBind();
         this.ddlIsPrinted.Items.Clear();
         this.ddlIsPrinted.Items.Add(new System.Web.UI.WebControls.ListItem("全部", string.Empty));
         this.ddlIsPrinted.Items.Add(new System.Web.UI.WebControls.ListItem("已打印", "1"));
         this.ddlIsPrinted.Items.Add(new System.Web.UI.WebControls.ListItem("未打印", "0"));
         this.SetOrderStatusLink();
         this.BindOrders();
     }
     CheckBoxColumn.RegisterClientCheckEvents(this.Page, this.Page.Form.ClientID);
 }
Beispiel #20
0
        public ConfigureColumnsDialog()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            _propListView.HeaderStyle = ColumnHeaderStyle.Nonclickable;

            _propListView.ControlPainter = new GdiControlPainter();

            _checkColumn = new CheckBoxColumn();
            _propListView.Columns.Add(_checkColumn);
            JetListViewColumn nameCol = new JetListViewColumn();

            nameCol.SizeToContent = true;
            nameCol.Text          = "Column";
            _propListView.Columns.Add(nameCol);

            _checkColumn.AfterCheck += new CheckBoxEventHandler(HandleAfterCheck);

            _autoSizeColumn            = new CheckBoxColumn();
            _autoSizeColumn.ShowHeader = true;
            _autoSizeColumn.Text       = "Auto size";
            _autoSizeColumn.Width      = (int)(80 * Core.ScaleFactor.Width);
            _propListView.Columns.Add(_autoSizeColumn);

            _showIfNotEmptyColumn            = new CheckBoxColumn();
            _showIfNotEmptyColumn.ShowHeader = true;
            _showIfNotEmptyColumn.Text       = "Show if not empty";
            _showIfNotEmptyColumn.Width      = (int)(120 * Core.ScaleFactor.Width);
            _propListView.Columns.Add(_showIfNotEmptyColumn);

            _showIfDistinctColumn            = new CheckBoxColumn();
            _showIfDistinctColumn.ShowHeader = true;
            _showIfDistinctColumn.Text       = "Show if distinct";
            _showIfDistinctColumn.Width      = (int)(100 * Core.ScaleFactor.Width);
            _propListView.Columns.Add(_showIfDistinctColumn);
        }
Beispiel #21
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     if (!string.IsNullOrEmpty(this.Page.Request.QueryString["checkedStatus"]))
     {
         int.TryParse(this.Page.Request.QueryString["checkedStatus"], out this.checkedStatus);
     }
     this.btnSearch.Click            += new System.EventHandler(this.btnSearch_Click);
     this.grdProducts.ReBindData     += new Grid.ReBindDataEventHandler(this.grdProducts_ReBindData);
     this.btnUpShelf.Click           += new System.EventHandler(this.btnUpShelf_Click);
     this.btnOK.Click                += new System.EventHandler(this.btnOK_Click);
     this.btnDelete.Click            += new System.EventHandler(this.btnDelete_Click);
     this.btnUpdateProductTags.Click += new System.EventHandler(this.btnUpdateProductTags_Click);
     this.grdProducts.RowDeleting    += new System.Web.UI.WebControls.GridViewDeleteEventHandler(this.grdProducts_RowDeleting);
     this.btnCheck.Click             += new System.EventHandler(this.btnCheck_Click);
     this.btnError.Click             += new System.EventHandler(this.btnError_Click);
     if (!this.Page.IsPostBack)
     {
         if (!string.IsNullOrEmpty(this.Page.Request.QueryString["SortOrder"]))
         {
             this.grdProducts.SortOrder = this.Page.Request.QueryString["SortOrder"];
         }
         if (!string.IsNullOrEmpty(this.Page.Request.QueryString["SortOrderBy"]))
         {
             this.grdProducts.SortOrderBy = this.Page.Request.QueryString["SortOrderBy"];
         }
         this.dropBrandList.DataBind();
         this.dropTagList.DataBind();
         int num  = 0;
         int num2 = 0;
         int num3 = 0;
         int num4 = 0;
         Methods.Supplier_PtCheckNumTjGetUpdate(Hidistro.Membership.Context.HiContext.Current.User.UserId, out num, out num2, out num3, out num4);
         this.litlChecked.Text    = (this.litlChecked2.Text = num.ToString());
         this.litlNoCheckNum.Text = (this.litlNoCheckNum2.Text = num2.ToString());
         this.BindProducts();
     }
     CheckBoxColumn.RegisterClientCheckEvents(this.Page, this.Page.Form.ClientID);
 }
Beispiel #22
0
 protected void Page_Load(object sender, EventArgs e)
 {
     wid = GetCurWebId();
     if (string.IsNullOrEmpty(wid))
     {
         return;
     }
     this.btnSearch.Click   += new EventHandler(this.btnSearch_Click);
     this.btnUpShelf.Click  += new EventHandler(this.btnUpShelf_Click);
     this.btnOffShelf.Click += new EventHandler(this.btnOffShelf_Click);
     this.btnInStock.Click  += new EventHandler(this.btnInStock_Click);
     this.btnOK.Click       += new EventHandler(this.btnOK_Click);
     if (!this.Page.IsPostBack)
     {
         this.dropBrandList.wid  = this.wid;
         this.dropCategories.wid = this.wid;
         this.dropBrandList.DataBind();
         this.dropCategories.DataBind();
         this.BindProducts();
     }
     this.grdProducts.ItemCommand += new RepeaterCommandEventHandler(this.grdProducts_ItemCommand);
     CheckBoxColumn.RegisterClientCheckEvents(this.Page, this.Page.Form.ClientID);
 }
Beispiel #23
0
        protected new int Act_AddData    = 65; //系统管理_支付方式管理_新增支付方式

        protected void Page_Load(object sender, EventArgs e)
        {
            //this.lkbDelectCheck.Click += new EventHandler(this.lkbDelectCheck_Click);
            this.grdPaymentMode.RowDataBound += new GridViewRowEventHandler(this.grdPaymentMode_RowDataBound);
            this.grdPaymentMode.RowDeleting  += new GridViewDeleteEventHandler(this.grdPaymentMode_RowDeleting);
            // this.grdPaymentMode.RowCommand += new GridViewCommandEventHandler(this.grdPaymentMode_RowCommand);
            if (!this.Page.IsPostBack)
            {
                //是否有新增支付方式的权限
                if (!UserPrincipal.HasPermissionID(GetPermidByActID(Act_AddData)) && GetPermidByActID(Act_AddData) != -1)
                {
                    liAdd.Visible = false;
                }

                //是否有删除支付方式的权限
                if (!UserPrincipal.HasPermissionID(GetPermidByActID(Act_DelData)) && GetPermidByActID(Act_DelData) != -1)
                {
                    //liDele.Visible = false;
                }
                this.BindData();
                CheckBoxColumn.RegisterClientCheckEvents(this.Page, this.Page.Form.ClientID);
            }
        }
 protected override void AttachChildControls()
 {
     this.batchbuys           = (Common_BatchBuy_ProductList)this.FindControl("Common_BatchBuy_ProductList");
     this.btnBatchBuy         = ButtonManager.Create(this.FindControl("btnBatchBuy"));
     this.btnSearch           = ButtonManager.Create(this.FindControl("btnSearch"));
     this.dropBrandCategories = (BrandCategoriesDropDownList)this.FindControl("dropBrandCategories");
     this.ddlCategories       = (Common_CategoriesDropDownList)this.FindControl("ddlCategories");
     this.pager              = (Pager)this.FindControl("pager");
     this.txtProductName     = (TextBox)this.FindControl("txtProductName");
     this.txtProductCode     = (TextBox)this.FindControl("txtProductCode");
     this.btnBatchBuy.Click += new EventHandler(this.btnBatchBuy_Click);
     this.btnSearch.Click   += new EventHandler(this.btnSearch_Click);
     if (!HiContext.Current.SiteSettings.IsOpenSiteSale && !HiContext.Current.SiteSettings.IsDistributorSettings)
     {
         this.btnBatchBuy.Visible = false;
     }
     if (!this.Page.IsPostBack)
     {
         this.dropBrandCategories.DataBind();
         this.ddlCategories.DataBind();
         this.BindProducts();
     }
     CheckBoxColumn.RegisterClientCheckEvents(this.Page, this.Page.Form.ClientID);
 }
 protected void Page_Load(object sender, System.EventArgs e)
 {
     if (!string.IsNullOrEmpty(this.Page.Request.QueryString["UserId"]) && !int.TryParse(this.Page.Request.QueryString["UserId"], out this.userId))
     {
         base.GotoResourceNotFound();
         return;
     }
     this.btnSendToRank.Click += new System.EventHandler(this.btnSendToRank_Click);
     if (!this.Page.IsPostBack)
     {
         this.rankList.DataBind();
         if (this.userId > 0)
         {
             Hidistro.Membership.Context.Member member = Hidistro.Membership.Context.Users.GetUser(this.userId) as Hidistro.Membership.Context.Member;
             if (member == null)
             {
                 base.GotoResourceNotFound();
                 return;
             }
             this.txtMemberNames.Text = member.Username;
         }
     }
     CheckBoxColumn.RegisterClientCheckEvents(this.Page, this.Page.Form.ClientID);
 }
Beispiel #26
0
        /**
         * Sets the dialog to the mode for selecting multiple resources.
         */

        public override void SelectResources(string[] resTypes, IResourceList baseList, IResourceList selection)
        {
            _chkColumn = _listView.AddCheckBoxColumn();
            _chkColumn.HandleAllClicks = true;
            _listView.AddIconColumn();
            ResourceListView2Column col = _listView.AddColumn(ResourceProps.DisplayName);

            col.Width    = 20;
            col.AutoSize = true;

            _dataProvider          = new ResourceListDataProvider(baseList);
            _listView.DataProvider = _dataProvider;
            if (selection != null)
            {
                foreach (IResource res in selection)
                {
                    _chkColumn.SetItemCheckState(res, CheckBoxState.Checked);
                }
                if (selection.Count > 0)
                {
                    _listView.Selection.AddIfPresent(selection [0]);
                }
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(base.Request["isCallback"]) && (base.Request["isCallback"] == "true"))
     {
         int    num;
         string str;
         string str2;
         if (string.IsNullOrEmpty(base.Request["orderId"]))
         {
             base.Response.Write("{\"Status\":\"0\"}");
             base.Response.End();
             return;
         }
         OrderInfo     orderInfo = OrderHelper.GetOrderInfo(base.Request["orderId"]);
         StringBuilder builder   = new StringBuilder();
         if (base.Request["type"] == "refund")
         {
             OrderHelper.GetRefundType(base.Request["orderId"], out num, out str2);
         }
         else if (base.Request["type"] == "return")
         {
             OrderHelper.GetRefundTypeFromReturn(base.Request["orderId"], out num, out str2);
         }
         else
         {
             num  = 0;
             str2 = "";
         }
         if (num == 1)
         {
             str = "退到预存款";
         }
         else
         {
             str = "银行转帐";
         }
         builder.AppendFormat(",\"OrderTotal\":\"{0}\"", Globals.FormatMoney(orderInfo.GetTotal()));
         if (base.Request["type"] == "replace")
         {
             string replaceComments = OrderHelper.GetReplaceComments(base.Request["orderId"]);
             builder.AppendFormat(",\"Comments\":\"{0}\"", replaceComments.Replace("\r\n", ""));
         }
         else
         {
             builder.AppendFormat(",\"RefundType\":\"{0}\"", num);
             builder.AppendFormat(",\"RefundTypeStr\":\"{0}\"", str);
         }
         builder.AppendFormat(",\"Contacts\":\"{0}\"", orderInfo.RealName);
         builder.AppendFormat(",\"Email\":\"{0}\"", orderInfo.EmailAddress);
         builder.AppendFormat(",\"Telephone\":\"{0}\"", orderInfo.TelPhone);
         builder.AppendFormat(",\"Address\":\"{0}\"", orderInfo.Address);
         builder.AppendFormat(",\"Remark\":\"{0}\"", str2.Replace("\r\n", ""));
         builder.AppendFormat(",\"PostCode\":\"{0}\"", orderInfo.ZipCode);
         base.Response.Clear();
         base.Response.ContentType = "application/json";
         base.Response.Write("{\"Status\":\"1\"" + builder.ToString() + "}");
         base.Response.End();
     }
     this.dlstOrders.ItemDataBound += new DataListItemEventHandler(this.dlstOrders_ItemDataBound);
     this.btnSearchButton.Click    += new EventHandler(this.btnSearchButton_Click);
     this.dlstOrders.ItemCommand   += new DataListCommandEventHandler(this.dlstOrders_ItemCommand);
     this.btnRemark.Click          += new EventHandler(this.btnRemark_Click);
     this.btnCloseOrder.Click      += new EventHandler(this.btnCloseOrder_Click);
     this.lkbtnDeleteCheck.Click   += new EventHandler(this.lkbtnDeleteCheck_Click);
     this.btnOrderGoods.Click      += new EventHandler(this.btnOrderGoods_Click);
     this.btnProductGoods.Click    += new EventHandler(this.btnProductGoods_Click);
     this.btnAcceptRefund.Click    += new EventHandler(this.btnAcceptRefund_Click);
     this.btnRefuseRefund.Click    += new EventHandler(this.btnRefuseRefund_Click);
     this.btnAcceptReturn.Click    += new EventHandler(this.btnAcceptReturn_Click);
     this.btnRefuseReturn.Click    += new EventHandler(this.btnRefuseReturn_Click);
     this.btnAcceptReplace.Click   += new EventHandler(this.btnAcceptReplace_Click);
     this.btnRefuseReplace.Click   += new EventHandler(this.btnRefuseReplace_Click);
     if (!this.Page.IsPostBack)
     {
         this.shippingModeDropDownList.DataBind();
         this.ddlIsPrinted.Items.Clear();
         this.ddlIsPrinted.Items.Add(new ListItem("全部", string.Empty));
         this.ddlIsPrinted.Items.Add(new ListItem("已打印", "1"));
         this.ddlIsPrinted.Items.Add(new ListItem("未打印", "0"));
         this.SetOrderStatusLink();
         this.BindOrders();
     }
     CheckBoxColumn.RegisterClientCheckEvents(this.Page, this.Page.Form.ClientID);
 }
Beispiel #28
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     this.dlstOrders.ItemDataBound += new System.Web.UI.WebControls.DataListItemEventHandler(this.dlstOrders_ItemDataBound);
     this.btnSearchButton.Click    += new System.EventHandler(this.btnSearchButton_Click);
     this.dlstOrders.ItemCommand   += new System.Web.UI.WebControls.DataListCommandEventHandler(this.dlstOrders_ItemCommand);
     this.btnRemark.Click          += new System.EventHandler(this.btnRemark_Click);
     this.btnCloseOrder.Click      += new System.EventHandler(this.btnCloseOrder_Click);
     this.lkbtnDeleteCheck.Click   += new System.EventHandler(this.lkbtnDeleteCheck_Click);
     this.btnAcceptRefund.Click    += new System.EventHandler(this.btnAcceptRefund_Click);
     this.btnRefuseRefund.Click    += new System.EventHandler(this.btnRefuseRefund_Click);
     this.btnAcceptReturn.Click    += new System.EventHandler(this.btnAcceptReturn_Click);
     this.btnRefuseReturn.Click    += new System.EventHandler(this.btnRefuseReturn_Click);
     this.btnAcceptReplace.Click   += new System.EventHandler(this.btnAcceptReplace_Click);
     this.btnRefuseReplace.Click   += new System.EventHandler(this.btnRefuseReplace_Click);
     if (!string.IsNullOrEmpty(base.Request["isCallback"]) && base.Request["isCallback"] == "true")
     {
         if (string.IsNullOrEmpty(base.Request["orderId"]))
         {
             base.Response.Write("{\"Status\":\"0\"}");
             base.Response.End();
             return;
         }
         OrderInfo orderInfo = SubsiteSalesHelper.GetOrderInfo(base.Request["orderId"]);
         System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder();
         int    num;
         string text;
         if (base.Request["type"] == "refund")
         {
             SubsiteSalesHelper.GetRefundType(base.Request["orderId"], out num, out text);
         }
         else
         {
             if (base.Request["type"] == "return")
             {
                 SubsiteSalesHelper.GetRefundTypeFromReturn(base.Request["orderId"], out num, out text);
             }
             else
             {
                 num  = 0;
                 text = "";
             }
         }
         string arg;
         if (num == 1)
         {
             arg = "退到预存款";
         }
         else
         {
             arg = "银行转帐";
         }
         stringBuilder.AppendFormat(",\"OrderTotal\":\"{0}\"", Globals.FormatMoney(orderInfo.GetTotal()));
         if (base.Request["type"] == "replace")
         {
             string replaceComments = SubsiteSalesHelper.GetReplaceComments(base.Request["orderId"]);
             stringBuilder.AppendFormat(",\"Comments\":\"{0}\"", replaceComments.Replace("\r\n", ""));
         }
         else
         {
             stringBuilder.AppendFormat(",\"RefundType\":\"{0}\"", num);
             stringBuilder.AppendFormat(",\"RefundTypeStr\":\"{0}\"", arg);
         }
         stringBuilder.AppendFormat(",\"Contacts\":\"{0}\"", orderInfo.RealName);
         stringBuilder.AppendFormat(",\"Email\":\"{0}\"", orderInfo.EmailAddress);
         stringBuilder.AppendFormat(",\"Telephone\":\"{0}\"", orderInfo.TelPhone);
         stringBuilder.AppendFormat(",\"Address\":\"{0}\"", orderInfo.Address);
         stringBuilder.AppendFormat(",\"Remark\":\"{0}\"", text.Replace("\r\n", ""));
         stringBuilder.AppendFormat(",\"PostCode\":\"{0}\"", orderInfo.ZipCode);
         base.Response.Clear();
         base.Response.ContentType = "application/json";
         base.Response.Write("{\"Status\":\"1\"" + stringBuilder.ToString() + "}");
         base.Response.End();
     }
     if (!this.Page.IsPostBack)
     {
         this.SetOrderStatusLink();
         this.BindOrders();
     }
     CheckBoxColumn.RegisterClientCheckEvents(this.Page, this.Page.Form.ClientID);
 }
Beispiel #29
0
 private void BindAffiche()
 {
     this.grdAfficheList.DataSource = SubsiteCommentsHelper.GetAfficheList();
     this.grdAfficheList.DataBind();
     CheckBoxColumn.RegisterClientCheckEvents(this.Page, this.Page.Form.ClientID);
 }
        private void InitTable()
        {
            ColumnModel columnModel = new ColumnModel();

            // set the Table's ColumModel and TableModel
            table1.ColumnModel        = columnModel;
            XpTableGlobal.ColumnModel = columnModel;

            table1.TableModel = tableModelMain;

            //VillageId
            TextColumn villId = new TextColumn
            {
                Editable    = false,
                Text        = "Id",
                ToolTipText = "Village Id",
                Width       = 40
            };

            columnModel.Columns.Add(villId);
            //Village name
            TextColumn vill = new TextColumn
            {
                Editable    = true,
                Text        = "Village",
                ToolTipText = "Village name",
                Width       = 120
            };

            columnModel.Columns.Add(vill);

            //Village barracks trainign
            ComboBoxColumn barracks = new ComboBoxColumn
            {
                Text        = "Barracks",
                ToolTipText = "Troops to train in Barracks",
                Width       = 100
            };

            ComboBoxCellEditor barracksEditor = new ComboBoxCellEditor
            {
                DropDownStyle = DropDownStyle.DropDownList
            };

            barracksEditor.Items.AddRange(GetPossibleTroops(Classificator.BuildingEnum.Barracks));
            barracks.Editor = barracksEditor;

            columnModel.Columns.Add(barracks);

            //great barracks training
            CheckBoxColumn GB = new CheckBoxColumn
            {
                Text        = "GB",
                ToolTipText = "Train troops in Great Barracks",
                Width       = 40
            };

            columnModel.Columns.Add(GB);

            //stable
            ComboBoxColumn stable = new ComboBoxColumn
            {
                Text        = "Stable",
                ToolTipText = "Troops to train in Stable",
                Width       = 100
            };

            ComboBoxCellEditor stableEditor = new ComboBoxCellEditor
            {
                DropDownStyle = DropDownStyle.DropDownList
            };

            stableEditor.Items.AddRange(GetPossibleTroops(Classificator.BuildingEnum.Stable));
            stable.Editor = stableEditor;

            columnModel.Columns.Add(stable);
            //great stable
            CheckBoxColumn GS = new CheckBoxColumn
            {
                Text        = "GS",
                ToolTipText = "Train troops in Great Stable",
                Width       = 40
            };

            columnModel.Columns.Add(GS);
            //workshop
            ComboBoxColumn workshop = new ComboBoxColumn
            {
                Text        = "Workshop",
                ToolTipText = "Troops to train in Workshop",
                Width       = 100
            };

            ComboBoxCellEditor workshopEditor = new ComboBoxCellEditor
            {
                DropDownStyle = DropDownStyle.DropDownList
            };

            workshopEditor.Items.AddRange(GetPossibleTroops(Classificator.BuildingEnum.Workshop));
            workshop.Editor = workshopEditor;

            columnModel.Columns.Add(workshop);

            // Auto-Improve troops
            columnModel.Columns.Add(new CheckBoxColumn
            {
                Text        = "AutoImprove",
                ToolTipText = "Auto Improve troops in smithy",
                Width       = 100
            });
        }
Beispiel #31
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            this.LocalUrl = base.Server.UrlEncode(base.Request.Url.ToString());
            //this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
            this.btnBuy.Click             += new System.EventHandler(this.btnBuy_Click);
            this.btnDelete.Click          += new System.EventHandler(this.btnDelete_Click);
            this.grdProducts.RowDataBound += new System.Web.UI.WebControls.GridViewRowEventHandler(this.grdProducts_RowDataBound);
            if (!this.Page.IsPostBack)
            {
                DataTable dtSkuItems = ProductBrowser.GetSkuItems();
                ViewState["dtSkuItem"] = dtSkuItems;//存储到全局值

                DataTable dtProductRegion = ManagerHelper.GetProductRegion(string.Empty);
                ViewState["dtProductRegion"] = dtProductRegion;//存储到全局值

                DataTable dtRegion = ManagerHelper.GetRegion(string.Empty);

                //得到当前登录用户所在区域
                ListItem itemDefault = new ListItem("请选择送货地址", "", true);
                userAddress.Items.Add(itemDefault);
                ManagerInfo currentManager = ManagerHelper.GetCurrentManager();                                                                                  //当前登录用户信息
                IList <ShippingAddressInfo> shippingAddress = MemberProcessor.GetShippingAddresses(Convert.ToInt32("99999" + currentManager.UserId.ToString())); //(currentManager.ClientUserId);
                if (shippingAddress != null && shippingAddress.Count > 0)
                {
                    foreach (ShippingAddressInfo info in shippingAddress)
                    {
                        string   strText = info.ShipTo + info.CellPhone + GetRegionName(dtRegion, info.RegionId) + info.Address;
                        ListItem item    = new ListItem(strText, info.ShippingId.ToString(), true);
                        userAddress.Items.Add(item);
                    }
                }

                //添加配送方式下拉框
                ListItem itemGiveDefault = new ListItem("请选择支付方式", "", true);
                userGiveMode.Items.Add(itemGiveDefault);
                IList <ShippingModeInfo> shippingModes = ShoppingProcessor.GetShippingModes();
                if (shippingModes != null && shippingModes.Count > 0)
                {
                    foreach (ShippingModeInfo info in shippingModes)
                    {
                        ListItem itemGive = new ListItem(info.Name, info.ModeId.ToString(), true);
                        userGiveMode.Items.Add(itemGive);
                    }
                }

                //添加支付方式下拉框
                ListItem itemPayDefault = new ListItem("请选择支付方式", "", true);
                userPayMode.Items.Add(itemPayDefault);
                ListItem itemPayNotLine = new ListItem("线下支付", "99", true);
                userPayMode.Items.Add(itemPayNotLine);
                //得到数据库中的支付方式列表
                IList <PaymentModeInfo> paymentMode = ShoppingProcessor.GetPaymentModes();
                if (paymentMode != null && paymentMode.Count > 0)
                {
                    foreach (PaymentModeInfo info in paymentMode)
                    {
                        ListItem itemPay = new ListItem(info.Name, info.ModeId.ToString(), true);
                        userPayMode.Items.Add(itemPay);
                    }
                }

                //设置订单说明默认值
                this.txtOrderRemark.Text = "代理商采购订单";

                //绑定订货列表
                this.BindProducts();
            }
            CheckBoxColumn.RegisterClientCheckEvents(this.Page, this.Page.Form.ClientID);
        }
Beispiel #32
0
        /// <summary>
        /// Creates the check box column.
        /// </summary>
        /// <param name="prop">The prop.</param>
        /// <param name="dataItem">The data item.</param>
        /// <param name="column">The column.</param>
        /// <returns></returns>
        private TableCell CreateCheckBoxColumn(PropertyDescriptor prop, object dataItem, CheckBoxColumn column)
        {
            TableCell cell = new TableCell();

            CheckBox checkBox = new CheckBox()
            {
                Text = ""
            };

            checkBox.Checked = (bool)prop.GetValue(dataItem);
            cell.Controls.Add(checkBox);

            if (column.Width.HasValue)
            {
                cell.Width = column.Width.Value;
            }

            return(cell);
        }
Beispiel #33
0
        /// <summary>
        /// Creates the check box column.
        /// </summary>
        /// <param name="prop">The prop.</param>
        /// <param name="dataItem">The data item.</param>
        /// <param name="column">The column.</param>
        /// <returns></returns>
        private TableCell CreateCheckBoxColumn(PropertyDescriptor prop, object dataItem, CheckBoxColumn column)
        {
            TableCell cell = new TableCell();

            CheckBox checkBox = new CheckBox() { Text = "" };
            checkBox.Checked = (bool)prop.GetValue(dataItem);
            cell.Controls.Add(checkBox);

            if (column.Width.HasValue)
            {
                cell.Width = column.Width.Value;
            }

            return cell;
        }