Exemplo n.º 1
0
        public static void LoadDropDownList(FineUI.DropDownList prmDropDownList, string prmDataTextField = null, string prmDataValueField = null, object prmDataSource = null, DropDownListAction?prmDropDownListAction = null)
        {
            prmDropDownList.Items.Clear();
            FineUI.ListItem firstItem = null;
            if (prmDropDownListAction != null)
            {
                //prmDropDownList. AppendDataBoundItems = true;

                switch (prmDropDownListAction)
                {
                case DropDownListAction.All:
                    firstItem = new FineUI.ListItem(Constants.All, Constants.AllValue);
                    break;

                case DropDownListAction.Select:
                    firstItem = new FineUI.ListItem(Constants.Select, Constants.SelectValue);
                    break;
                }
            }

            if (prmDataSource != null)
            {
                prmDropDownList.DataTextField  = prmDataTextField;
                prmDropDownList.DataValueField = prmDataValueField;
                prmDropDownList.DataSource     = prmDataSource;
            }

            prmDropDownList.DataBind();

            if (firstItem != null)
            {
                firstItem.Selected = true;
                prmDropDownList.Items.Insert(0, firstItem);
            }
        }
        /// <summary>
        /// 添加商品
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void ButtonStockAdd_Click(object sender, EventArgs e)
        {
            FineUI.DropDownList ddlstock             = Window4.FindControl("PanelGrid4").FindControl("Panel_Search").FindControl("window_ddl_Stock") as FineUI.DropDownList;
            FineUI.DropDownList _window_ddl_INV_TYPE = Window4.FindControl("PanelGrid4").FindControl("Panel_Search").FindControl("window_ddl_INV_TYPE") as FineUI.DropDownList;
            FineUI.DropDownList _window_ddl_Stock    = Window4.FindControl("PanelGrid4").FindControl("Panel_Search").FindControl("window_ddl_Stock") as FineUI.DropDownList;
            string invType  = _window_ddl_INV_TYPE.SelectedValue;
            string invStock = _window_ddl_Stock.SelectedValue;

            ddlINV_TYPE.SelectedValue = invType;
            ddlstock.SelectedValue    = invStock;
            string _SHOP_ID = ddlSHOP_NAME.SelectedValue;

            if (invType == "4")
            {
                Grid2.DataSource = null;
                Grid2.DataBind();
                Toolbar21111.Enabled = true;
            }
            else
            {
                DataTable dt = new DataTable();
                dt = (DataTable)SPs.GET_STOCK01_PROD(invStock, "", _SHOP_ID, invType).ExecuteDataTable();
                Grid2.DataSource = dt;
                Grid2.DataBind();
                Toolbar21111.Enabled = false;
            }
        }
 /// <summary>
 /// 加载下拉列表
 /// </summary>
 public void LoadList()
 {
     FineUI.DropDownList ccPROD_KIND = Window3.FindControl("PanelGrid4").FindControl("Panel_Search").FindControl("ccPROD_KIND") as FineUI.DropDownList;
     PROD_KINDBll.GetInstence().BandDropDownListShowKind(this, ccPROD_KIND);
     FineUI.DropDownList ccPROD_DEP = Window3.FindControl("PanelGrid4").FindControl("Panel_Search").FindControl("ccPROD_DEP") as FineUI.DropDownList;
     PROD_DEPBll.GetInstence().BandDropDownListShowDep(this, ccPROD_DEP);
     FineUI.DropDownList ccPROD_CATE = Window3.FindControl("PanelGrid4").FindControl("Panel_Search").FindControl("ccPROD_CATE") as FineUI.DropDownList;
     PROD_CateBll.GetInstence().BandDropDownListShowCate(this, ccPROD_CATE);
 }
 /// <summary>
 /// 添加商品,采购单位未完成,价格取值未完成,税额未完成
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void ButtonPRODAdd_Click(object sender, EventArgs e)
 {
     FineUI.DropDownList ddlstock     = Window3.FindControl("PanelGrid4").FindControl("Panel_Search").FindControl("window_ddl_Stock") as FineUI.DropDownList;
     FineUI.DropDownList ddl_INV_TYPE = Window3.FindControl("PanelGrid4").FindControl("Panel_Search").FindControl("window_ddl_INV_TYPE") as FineUI.DropDownList;
     string _ddlstock     = ddlstock.SelectedValue;
     string _ddl_INV_TYPE = ddl_INV_TYPE.SelectedValue;
     string _SHOP_ID      = ddlSHOP_NAME.SelectedValue;
     string _Inv_ID       = tbxINV_ID.Text;
 }
 /// <summary>
 /// 新增按钮触发事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 public void btn_DetailAdd()
 {
     //string Pur_status = ddlStatus.SelectedValue;
     FineUI.Panel P_search = Window3.FindControl("PanelGrid4").FindControl("Panel_Search") as FineUI.Panel;
     P_search.Hidden = false;
     FineUI.DropDownList ddlstock = Window3.FindControl("PanelGrid4").FindControl("Panel_Search").FindControl("window_ddl_Stock") as FineUI.DropDownList;
     STOCKBll.GetInstence().BandDropDownListStock(this, ddlstock);
     Window3.Hidden = false;
 }
Exemplo n.º 6
0
        /// <summary>
        /// GRID3(商品)检索的判断条件
        /// </summary>
        /// <returns></returns>
        private List <ConditionFun.SqlqueryCondition> InquiryConditionProduct()
        {
            string _SHOP_ID  = ddlSHOP_NAME.SelectedValue;
            var    modelShop = new SHOP00(x => x.SHOP_ID == _SHOP_ID);
            List <ConditionFun.SqlqueryCondition> conditionProdduct00List = new List <ConditionFun.SqlqueryCondition>();

            //取价格区域
            conditionProdduct00List.Add(new ConditionFun.SqlqueryCondition(ConstraintType.Where, V_Product01_PRCAREATable.PRCAREA_ID, Comparison.Equals, modelShop.SHOP_Price_Area, false, false));

            FineUI.TextBox cPROD_ID = Window3.FindControl("PanelGrid4").FindControl("Panel_Search").FindControl("ccPROD_ID") as FineUI.TextBox;
            var            _PROD_ID = cPROD_ID.Text;

            if (!String.IsNullOrEmpty(cPROD_ID.Text))
            {
                conditionProdduct00List.Add(new ConditionFun.SqlqueryCondition(ConstraintType.And, V_Product01_PRCAREATable.PROD_ID, Comparison.Like, "%" + _PROD_ID + "%", false, false));
            }

            FineUI.TextBox cPROD_NAME = Window3.FindControl("PanelGrid4").FindControl("Panel_Search").FindControl("ccPROD_NAME") as FineUI.TextBox;
            var            _PROD_NAME = cPROD_NAME.Text;

            if (!String.IsNullOrEmpty(_PROD_NAME))
            {
                conditionProdduct00List.Add(new ConditionFun.SqlqueryCondition(ConstraintType.And, V_Product01_PRCAREATable.PROD_NAME1, Comparison.Like, "%" + _PROD_NAME + "%", false, false));
            }
            FineUI.TextBox cPROD_NAME_SPELLING = Window3.FindControl("PanelGrid4").FindControl("Panel_Search").FindControl("ccPROD_NAME_SPELLING") as FineUI.TextBox;
            var            _PROD_NAME_SPELLING = cPROD_NAME_SPELLING.Text;

            if (!String.IsNullOrEmpty(_PROD_NAME_SPELLING))
            {
                conditionProdduct00List.Add(new ConditionFun.SqlqueryCondition(ConstraintType.And, V_Product01_PRCAREATable.PROD_NAME1_SPELLING, Comparison.Like, "%" + _PROD_NAME_SPELLING + "%", false, false));
            }
            FineUI.DropDownList cPROD_KIND = Window3.FindControl("PanelGrid4").FindControl("Panel_Search").FindControl("ccPROD_KIND") as FineUI.DropDownList;
            var _cPROD_KIND = cPROD_KIND.SelectedValue;

            if (!String.IsNullOrEmpty(_cPROD_KIND) && _cPROD_KIND != "0")
            {
                conditionProdduct00List.Add(new ConditionFun.SqlqueryCondition(ConstraintType.And, V_Product01_PRCAREATable.PROD_KIND, Comparison.Equals, _cPROD_KIND, false, false));
            }

            FineUI.DropDownList cPROD_DEP = Window3.FindControl("PanelGrid4").FindControl("Panel_Search").FindControl("ccPROD_DEP") as FineUI.DropDownList;
            var _PROD_DEP = cPROD_DEP.SelectedValue;

            if (!String.IsNullOrEmpty(_PROD_NAME) && _PROD_DEP != "0")
            {
                conditionProdduct00List.Add(new ConditionFun.SqlqueryCondition(ConstraintType.And, V_Product01_PRCAREATable.PROD_DEP, Comparison.Equals, _PROD_DEP, false, false));
            }
            FineUI.DropDownList cPROD_CATE = Window3.FindControl("PanelGrid4").FindControl("Panel_Search").FindControl("ccPROD_CATE") as FineUI.DropDownList;
            var _PROD_CATE = cPROD_CATE.SelectedValue;

            if (!String.IsNullOrEmpty(_PROD_CATE) && _PROD_CATE != "0")
            {
                conditionProdduct00List.Add(new ConditionFun.SqlqueryCondition(ConstraintType.And, V_Product01_PRCAREATable.PROD_CATE, Comparison.Equals, _PROD_CATE, false, false));
            }

            return(conditionProdduct00List);
        }
        /// <summary>
        /// GRID4检索的判断条件
        /// </summary>
        /// <returns></returns>
        private List <ConditionFun.SqlqueryCondition> InquiryCondition()
        {
            List <ConditionFun.SqlqueryCondition> conditionProdduct00List = new List <ConditionFun.SqlqueryCondition>();
            //conditionProdduct00List.Add(new ConditionFun.SqlqueryCondition(ConstraintType.Where, "1", Comparison.Equals, "1", false, false));
            bool sFlag = true;

            FineUI.TextBox cPROD_ID = Window3.FindControl("PanelGrid4").FindControl("cPROD_ID") as FineUI.TextBox;
            var            _PROD_ID = cPROD_ID.Text;

            if (!String.IsNullOrEmpty(cPROD_ID.Text))
            {
                conditionProdduct00List.Add(new ConditionFun.SqlqueryCondition(WhereOrAnd(sFlag), PRODUCT00Table.PROD_ID, Comparison.Like, "%" + _PROD_ID + "%", false, false));
                sFlag = false;
            }

            FineUI.TextBox cPROD_NAME = Window3.FindControl("PanelGrid4").FindControl("cPROD_NAME") as FineUI.TextBox;
            var            _PROD_NAME = cPROD_NAME.Text;

            if (!String.IsNullOrEmpty(_PROD_NAME))
            {
                conditionProdduct00List.Add(new ConditionFun.SqlqueryCondition(WhereOrAnd(sFlag), PRODUCT00Table.PROD_NAME1, Comparison.Like, "%" + _PROD_NAME + "%", false, false));
                sFlag = false;
            }
            FineUI.TextBox cPROD_NAME_SPELLING = Window3.FindControl("PanelGrid4").FindControl("cPROD_NAME_SPELLING") as FineUI.TextBox;
            var            _PROD_NAME_SPELLING = cPROD_NAME_SPELLING.Text;

            if (!String.IsNullOrEmpty(_PROD_NAME_SPELLING))
            {
                conditionProdduct00List.Add(new ConditionFun.SqlqueryCondition(WhereOrAnd(sFlag), PRODUCT00Table.PROD_NAME1_SPELLING, Comparison.Like, "%" + _PROD_NAME_SPELLING + "%", false, false));
                sFlag = false;
            }
            FineUI.DropDownList cPROD_DEP = Window3.FindControl("PanelGrid4").FindControl("cPROD_DEP") as FineUI.DropDownList;
            var _PROD_DEP = cPROD_DEP.SelectedValue;

            if (!String.IsNullOrEmpty(_PROD_NAME) && _PROD_DEP != "0")
            {
                conditionProdduct00List.Add(new ConditionFun.SqlqueryCondition(WhereOrAnd(sFlag), PRODUCT00Table.PROD_DEP, Comparison.Equals, _PROD_DEP, false, false));
                sFlag = false;
            }
            FineUI.DropDownList cPROD_CATE = Window3.FindControl("PanelGrid4").FindControl("cPROD_CATE") as FineUI.DropDownList;
            var _PROD_CATE = cPROD_CATE.SelectedValue;

            if (!String.IsNullOrEmpty(_PROD_CATE) && _PROD_CATE != "0")
            {
                conditionProdduct00List.Add(new ConditionFun.SqlqueryCondition(WhereOrAnd(sFlag), PRODUCT00Table.PROD_CATE, Comparison.Equals, _PROD_CATE, false, false));
                sFlag = false;
            }

            if (sFlag)
            {
                conditionProdduct00List.Add(new ConditionFun.SqlqueryCondition(WhereOrAnd(sFlag), "1", Comparison.Equals, "1", false, false));
            }

            return(conditionProdduct00List);
        }
Exemplo n.º 8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            PageBase pb = new PageBase();

            if (Request.Cookies["Cookies"] == null)
            {
                Response.Redirect("../../Login.aspx");
            }
            if (!IsPostBack)
            {
                FineUI.DropDownList       drop  = new FineUI.DropDownList();
                List <Entity.MonitorItem> items = DAL.MonitorItem.GetMonitorItemList(1);
                //foreach (Entity.MonitorItem item in items)
                //{
                //    FineUI.ListItem li = new FineUI.ListItem();
                //    li.Text = item.ItemName;
                //    li.Value = item.ItemCode;
                //    drop.Items.Add(li);
                //}
                string Code = "";
                if (items.Count > 0)
                {
                    Code = items[0].ItemName;
                }
                string  deleteScript = GetDeleteScript();
                JObject defaultObj   = new JObject();
                defaultObj.Add("ResultID", 999999);
                defaultObj.Add("ItemName", Code);
                defaultObj.Add("Result", 9.1234);
                defaultObj.Add("Delete", String.Format("<a href=\"javascript:;\" onclick=\"{0}\"><img src=\"{1}\"/></a>", deleteScript, IconHelper.GetResolvedIconUrl(Icon.Delete)));

                // 在第一行新增一条数据
                btnNew.OnClientClick = Grid1.GetAddNewRecordReference(defaultObj, AppendToEnd);

                // 重置表格
                //btnReset.OnClientClick = Confirm.GetShowReference("确定要重置表格数据?", String.Empty, Grid1.GetRejectChangesReference(), String.Empty);


                // 删除选中行按钮
                btnDelete.OnClientClick = Grid1.GetNoSelectionAlertReference("请至少选择一项!") + deleteScript;
                //BindGrid();

                BindDropdownList();

                if (Request.QueryString["id"] != null)
                {
                    sGuid = Request.QueryString["id"].ToString().Trim();
                    LoadData(sGuid);
                    BindGrid();
                }
                //BindGrid();
            }
        }
 /// <summary>
 /// 子表添加商品
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 public void btn_DetailAdd(Object sender, EventArgs e)
 {
     //string Pur_status = ddlStatus.SelectedValue;
     FineUI.Panel P_search = Window3.FindControl("PanelGrid4").FindControl("Panel_Search") as FineUI.Panel;
     P_search.Hidden = false;
     FineUI.DropDownList ddlstock = Window3.FindControl("PanelGrid4").FindControl("Panel_Search").FindControl("window_ddl_Stock") as FineUI.DropDownList;
     STOCKBll.GetInstence().BandDropDownListStock(this, ddlstock);
     Window3.Hidden = false;
     FineUI.Grid Grid4 = Window3.FindControl("PanelGrid4").FindControl("Grid4") as FineUI.Grid;
     Grid4.DataSource = null;
     Grid4.DataBind();
 }
        /// <summary>
        /// 加载下拉列表
        /// </summary>
        public void LoadList()
        {
            var model = GetOnlineUserShop();

            SHOP00Bll.GetInstence().BindOnlineUser(this, model.SHOP_ID, ddlSHOP_NAME);
            STOCKBll.GetInstence().BandOnlineUserStock(this, model.SHOP_ID, ddlSTOCK_ID);
            STOCKBll.GetInstence().BandOnlineUserStock(this, model.SHOP_ID, ddlSTOCK_NAME1);
            FineUI.DropDownList ccPROD_KIND = Window3.FindControl("PanelGrid4").FindControl("Panel_Search").FindControl("ccPROD_KIND") as FineUI.DropDownList;
            PROD_KINDBll.GetInstence().BandDropDownListShowKind(this, ccPROD_KIND);
            FineUI.DropDownList ccPROD_DEP = Window3.FindControl("PanelGrid4").FindControl("Panel_Search").FindControl("ccPROD_DEP") as FineUI.DropDownList;
            PROD_DEPBll.GetInstence().BandDropDownListShowDep(this, ccPROD_DEP);
            FineUI.DropDownList ccPROD_CATE = Window3.FindControl("PanelGrid4").FindControl("Panel_Search").FindControl("ccPROD_CATE") as FineUI.DropDownList;
            PROD_CateBll.GetInstence().BandDropDownListShowCate(this, ccPROD_CATE);
        }
Exemplo n.º 11
0
 private void CreatePager()
 {
     this.PageItems.Add(new FineUI.ToolbarSeparator());
     this.PageItems.Add(new FineUI.ToolbarText()
     {
         Text = "每页记录数"
     });
     _ddlGridPageSize = new FineUI.DropDownList()
     {
         Width = 80, AutoPostBack = true
     };
     _ddlGridPageSize.Items.Add(new FineUI.ListItem("10", "10"));
     _ddlGridPageSize.Items.Add(new FineUI.ListItem("20", "20"));
     _ddlGridPageSize.Items.Add(new FineUI.ListItem("30", "30"));
     _ddlGridPageSize.Items.Add(new FineUI.ListItem("50", "50"));
     _ddlGridPageSize.Items.Add(new FineUI.ListItem("100", "100"));
     this.PageItems.Add(_ddlGridPageSize);
 }
Exemplo n.º 12
0
        private void SetGridPageItems()
        {
            Page.Grid.PageItems.Add(new ToolbarSeparator());

            ToolbarText tbt = new ToolbarText();

            tbt.Text = "每页记录数:";
            Page.Grid.PageItems.Add(tbt);

            FineUI.DropDownList ddlGridPageSize = new FineUI.DropDownList();
            ddlGridPageSize.AutoPostBack = true;
            ddlGridPageSize.Items.Add(new FineUI.ListItem("10", "10"));
            ddlGridPageSize.Items.Add(new FineUI.ListItem("30", "30"));
            ddlGridPageSize.Items.Add(new FineUI.ListItem("50", "50"));
            ddlGridPageSize.Items.Add(new FineUI.ListItem("100", "100"));
            ddlGridPageSize.Items.Add(new FineUI.ListItem("200", "200"));
            ddlGridPageSize.Width = 80;
            ddlGridPageSize.SelectedIndexChanged += ddlGridPageSize_SelectedIndexChanged;
            // 初始化选中值
            ddlGridPageSize.SelectedValue = Page.Grid.PageSize.ToString();
            Page.Grid.PageItems.Add(ddlGridPageSize);
        }
        /// <summary>
        /// GRID3检索的判断条件
        /// </summary>
        /// <returns></returns>
        private List <ConditionFun.SqlqueryCondition> InquiryConditionProduct()
        {
            string _shop_id = ddlSHOP_NAME.SelectedValue;
            var    model    = new SHOP00(x => x.SHOP_ID == _shop_id);
            List <ConditionFun.SqlqueryCondition> conditionProdduct00List = new List <ConditionFun.SqlqueryCondition>();
            bool   sFlag   = true;
            string _SUP_ID = ddlSUP_NAME.SelectedValue;

            conditionProdduct00List.Add(new ConditionFun.SqlqueryCondition(ConstraintType.Or, V_Product01_PRCAREATable.PROD_TYPE, Comparison.In, new string[2] {
                "1", "2"
            }, true, true));
            if (!String.IsNullOrEmpty(_SUP_ID))
            {
                conditionProdduct00List.Add(new ConditionFun.SqlqueryCondition(WhereOrAnd(sFlag), V_Product01_PRCAREATable.SUP_ID, Comparison.Like, _SUP_ID, true, false));
                sFlag = false;
            }

            if (!String.IsNullOrEmpty(model.SHOP_Price_Area))
            {
                conditionProdduct00List.Add(new ConditionFun.SqlqueryCondition(WhereOrAnd(sFlag), V_Product01_PRCAREATable.PRCAREA_ID, Comparison.Equals, model.SHOP_Price_Area, true, true));
                sFlag = false;
            }
            //conditionProdduct00List.Add(new ConditionFun.SqlqueryCondition(ConstraintType.Where, "1", Comparison.Equals, "1", false, false));

            FineUI.TextBox cPROD_ID = Window3.FindControl("PanelGrid4").FindControl("Panel_Search").FindControl("ccPROD_ID") as FineUI.TextBox;
            var            _PROD_ID = cPROD_ID.Text;

            if (!String.IsNullOrEmpty(cPROD_ID.Text))
            {
                conditionProdduct00List.Add(new ConditionFun.SqlqueryCondition(WhereOrAnd(sFlag), V_Product01_PRCAREATable.PROD_ID, Comparison.Like, "%" + _PROD_ID + "%", true, true));
                sFlag = false;
            }

            FineUI.TextBox cPROD_NAME = Window3.FindControl("PanelGrid4").FindControl("Panel_Search").FindControl("ccPROD_NAME") as FineUI.TextBox;
            var            _PROD_NAME = cPROD_NAME.Text;

            if (!String.IsNullOrEmpty(_PROD_NAME))
            {
                conditionProdduct00List.Add(new ConditionFun.SqlqueryCondition(WhereOrAnd(sFlag), V_Product01_PRCAREATable.PROD_NAME1, Comparison.Like, "%" + _PROD_NAME + "%", true, true));
                sFlag = false;
            }
            FineUI.TextBox cPROD_NAME_SPELLING = Window3.FindControl("PanelGrid4").FindControl("Panel_Search").FindControl("ccPROD_NAME_SPELLING") as FineUI.TextBox;
            var            _PROD_NAME_SPELLING = cPROD_NAME_SPELLING.Text;

            if (!String.IsNullOrEmpty(_PROD_NAME_SPELLING))
            {
                conditionProdduct00List.Add(new ConditionFun.SqlqueryCondition(WhereOrAnd(sFlag), V_Product01_PRCAREATable.PROD_NAME1_SPELLING, Comparison.Like, "%" + _PROD_NAME_SPELLING + "%", true, true));
                sFlag = false;
            }
            FineUI.DropDownList cPROD_KIND = Window3.FindControl("PanelGrid4").FindControl("Panel_Search").FindControl("ccPROD_KIND") as FineUI.DropDownList;
            var _cPROD_KIND = cPROD_KIND.SelectedValue;

            if (!String.IsNullOrEmpty(_cPROD_KIND) && _cPROD_KIND != "0")
            {
                conditionProdduct00List.Add(new ConditionFun.SqlqueryCondition(WhereOrAnd(sFlag), V_Product01_PRCAREATable.PROD_KIND, Comparison.Equals, _cPROD_KIND, true, true));
                sFlag = false;
            }

            FineUI.DropDownList cPROD_DEP = Window3.FindControl("PanelGrid4").FindControl("Panel_Search").FindControl("ccPROD_DEP") as FineUI.DropDownList;
            var _PROD_DEP = cPROD_DEP.SelectedValue;

            if (!String.IsNullOrEmpty(_PROD_NAME) && _PROD_DEP != "0")
            {
                conditionProdduct00List.Add(new ConditionFun.SqlqueryCondition(WhereOrAnd(sFlag), V_Product01_PRCAREATable.PROD_DEP, Comparison.Equals, _PROD_DEP, true, true));
                sFlag = false;
            }
            FineUI.DropDownList cPROD_CATE = Window3.FindControl("PanelGrid4").FindControl("Panel_Search").FindControl("ccPROD_CATE") as FineUI.DropDownList;
            var _PROD_CATE = cPROD_CATE.SelectedValue;

            if (!String.IsNullOrEmpty(_PROD_CATE) && _PROD_CATE != "0")
            {
                conditionProdduct00List.Add(new ConditionFun.SqlqueryCondition(WhereOrAnd(sFlag), V_Product01_PRCAREATable.PROD_CATE, Comparison.Equals, _PROD_CATE, true, true));
                sFlag = false;
            }
            return(conditionProdduct00List);
        }