Exemple #1
0
    public void storeCode_Callback(object sender, CallbackEventArgsBase e)
    {
        ASPxComboBox cBox = sender as ASPxComboBox;

        cBox.Items.Clear();
        cBox.Items.Add("全部", "All");

        string pline = plineCode.SelectedItem.Value.ToString();

        if (pline.Equals("All"))
        {
            List <LineSideStoreEntity> stores = LinesideStoreFactory.GetAll();

            foreach (var s in stores)
            {
                cBox.Items.Add(s.STORE_NAME, s.STORE_CODE);
            }
        }
        else
        {
            List <LineSideStoreEntity> stores = LinesideStoreFactory.GetByPline(pline);

            foreach (var s in stores)
            {
                cBox.Items.Add(s.STORE_NAME, s.STORE_CODE);
            }
        }

        cBox.SelectedIndex = 0;
    }
Exemple #2
0
        private void SetDataBind(List <ItemLineSideStore2LineEntity> ds)//绑定数据源
        {
            DataSource = ds;
            List <LineSideStoreEntity> stores = LinesideStoreFactory.GetAll();

            for (int i = 0; i < ds.Count; i++)
            {
                string        ws         = ds[i].WORKSHOP;
                string        tl         = ds[i].T_LINESIDESTORE;
                List <string> storeNames = new List <string>();
                storeNames = (from s in stores where s.STORE_CODE.Equals(tl) select s.STORE_CODE).ToList <string>();
                if (storeNames.Count > 0)
                {
                    ds[i].T_LINESIDESTORE = storeNames[0];
                }
                if (ws == "8101")
                {
                    ds[i].WORKSHOP = "园区";
                }
                else
                {
                    ds[i].WORKSHOP = "基地";
                }
            }


            this.xrTableCell7.DataBindings.Add("Text", DataSource, "ITEM_CODE");
            this.xrTableCell8.DataBindings.Add("Text", DataSource, "ITEM_QTY");
            this.xrTableCell9.DataBindings.Add("Text", DataSource, "S_LINESIDESTORE");
            this.xrTableCell10.DataBindings.Add("Text", DataSource, "T_LINESIDESTORE");
            this.xrTableCell11.DataBindings.Add("Text", DataSource, "ITEM_NAME");
            this.xrTableCell12.DataBindings.Add("Text", DataSource, "CREATE_TIME");
        }
Exemple #3
0
        public void comResourceStore_DataBinding(object sender, EventArgs e)
        {
            ASPxComboBox comStock          = sender as ASPxComboBox;
            List <LineSideStoreEntity> all = LinesideStoreFactory.GetMaterialStore();

            comStock.DataSource = all;
            comStock.TextField  = "STORE_NAME";
            comStock.ValueField = "STORE_CODE";
        }
Exemple #4
0
    private void setCondition()
    {
        //绑定表数据
        userManager theUserManager = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManager.getCompanyCode();
        string theUserId = theUserManager.getUserId();

        List <LineSideStockEntity> dataSource = LineSideStockFactory.GetAll();

        if (!plineCode.SelectedItem.Value.ToString().Equals("All"))
        {
            dataSource = (from s in dataSource where s.PLINE_CODE == (plineCode.SelectedItem.Value.ToString()) select s).ToList <LineSideStockEntity>();
        }
        if (storeCode.SelectedItem != null && !storeCode.SelectedItem.Value.ToString().Equals("All"))
        {
            dataSource = (from s in dataSource where s.STORE_CODE == (storeCode.SelectedItem.Value.ToString()) select s).ToList <LineSideStockEntity>();
        }


        ASPxGridView1.DataSource = dataSource;

        GridViewDataComboBoxColumn comFactory = ASPxGridView1.Columns["FACTORY_CODE"] as GridViewDataComboBoxColumn;
        DataTable dt_factory = new DataTable();

        dt_factory.Columns.Add("text");
        dt_factory.Columns.Add("value");
        dt_factory.Rows.Add("园区", "8101");
        dt_factory.Rows.Add("基地", "8102");
        comFactory.PropertiesComboBox.TextField  = "text";
        comFactory.PropertiesComboBox.ValueField = "value";

        GridViewDataComboBoxColumn comStore = ASPxGridView1.Columns["STORE_CODE"] as GridViewDataComboBoxColumn;
        List <LineSideStoreEntity> stores   = LinesideStoreFactory.GetAll();

        comStore.PropertiesComboBox.DataSource = stores;
        comStore.PropertiesComboBox.TextField  = "STORE_NAME";
        comStore.PropertiesComboBox.ValueField = "STORE_CODE";

        GridViewDataComboBoxColumn comPline = ASPxGridView1.Columns["PLINE_CODE"] as GridViewDataComboBoxColumn;
        List <ProductLineEntity>   plines   = ProductLineFactory.GetAll();

        comPline.PropertiesComboBox.DataSource = plines;
        comPline.PropertiesComboBox.TextField  = "PLINE_NAME";
        comPline.PropertiesComboBox.ValueField = "RMES_ID";


        GridViewDataComboBoxColumn comLocation = ASPxGridView1.Columns["LOCATION_CODE"] as GridViewDataComboBoxColumn;

        ASPxGridView1.DataBind();
    }
Exemple #5
0
        public void BindData()
        {
            List <LineSideStoreEntity> allEntity = LinesideStoreFactory.GetAll();

            ASPxGridView1.DataSource = allEntity;

            GridViewDataComboBoxColumn comPline = ASPxGridView1.Columns["PLINE_CODE"] as GridViewDataComboBoxColumn;
            List <ProductLineEntity>   allPline = ProductLineFactory.GetAll();

            comPline.PropertiesComboBox.DataSource = allPline;
            comPline.PropertiesComboBox.TextField  = "PLINE_NAME";
            comPline.PropertiesComboBox.ValueField = "PLINE_CODE";

            GridViewDataComboBoxColumn comWorkUnit = ASPxGridView1.Columns["WORKUNIT_CODE"] as GridViewDataComboBoxColumn;
            List <StationEntity>       allStation  = StationFactory.GetAll();

            comWorkUnit.PropertiesComboBox.DataSource = allStation;
            comWorkUnit.PropertiesComboBox.TextField  = "STATION_NAME";
            comWorkUnit.PropertiesComboBox.ValueField = "WORKUNIT_CODE";


            GridViewDataComboBoxColumn comWorkShop = ASPxGridView1.Columns["WORKSHOP_CODE"] as GridViewDataComboBoxColumn;
            DataTable dt = new DataTable();

            dt.Columns.Add("text");
            dt.Columns.Add("value");
            dt.Rows.Add("园区", 8101);
            dt.Rows.Add("基地", 8102);


            comWorkShop.PropertiesComboBox.DataSource = dt;
            comWorkShop.PropertiesComboBox.TextField  = "text";
            comWorkShop.PropertiesComboBox.ValueField = "value";


            GridViewDataComboBoxColumn comStoreType = ASPxGridView1.Columns["STORE_TYPE"] as GridViewDataComboBoxColumn;
            DataTable dt1 = new DataTable();

            dt1.Columns.Add("text");
            dt1.Columns.Add("value");
            dt1.Rows.Add("线边库", 0);
            dt1.Rows.Add("中心仓库", 1);


            comStoreType.PropertiesComboBox.DataSource = dt;
            comStoreType.PropertiesComboBox.TextField  = "text";
            comStoreType.PropertiesComboBox.ValueField = "value";

            ASPxGridView1.DataBind();
        }
Exemple #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];
            string      theCompanyCode = theUserManager.getCompanyCode();
            string      theUserID      = theUserManager.getUserId();

            if (!IsPostBack)
            {
                List <LineSideStoreEntity> stores     = LinesideStoreFactory.GetAll();
                List <PlanEntity>          dataSource = PlanFactory.GetByUserID(theUserID);
                PlanCode.DataSource = dataSource;
                PlanCode.ValueField = "ORDER_CODE";
                PlanCode.TextField  = "ORDER_CODE";
                PlanCode.DataBind();
            }
            setCondition();
        }
Exemple #7
0
        public ctrlBomItemMng(string pPlanCode, string pSn, List <SNBomTempEntity> pDS)
        {
            InitializeComponent();
            stationCode = LoginInfo.StationInfo.RMES_ID;
            plineCode   = LoginInfo.ProductLineInfo.RMES_ID;
            companyCode = LoginInfo.CompanyInfo.COMPANY_CODE;
            SN          = pDS.First().SN;

            StationEntity ent1 = StationFactory.GetByKey(stationCode);

            WorkunitCode = "";
            LineSideStoreEntity ent2 = LinesideStoreFactory.GetByWKUnit(companyCode, WorkunitCode);

            LinesideStock = ent2.STORE_CODE;

            dgvBom.AutoGenerateColumns = false;
            dgvBom.RowHeadersVisible   = false;

            dgvBom.DataSource = pDS;
        }
Exemple #8
0
        public void BindData()
        {
            List <LinesideAutoIssueEntity> allEntity = LinesideAutoIssueFactory.GetAll();

            ASPxGridView1.DataSource = allEntity;

            GridViewDataComboBoxColumn comStock = ASPxGridView1.Columns["LINESIDE_STORE_CODE"] as GridViewDataComboBoxColumn;
            List <LineSideStoreEntity> all      = LinesideStoreFactory.GetLineSideStore();

            comStock.PropertiesComboBox.DataSource = all;
            comStock.PropertiesComboBox.TextField  = "STORE_NAME";
            comStock.PropertiesComboBox.ValueField = "STORE_CODE";

            GridViewDataComboBoxColumn comResourceStore = ASPxGridView1.Columns["RESOURCE_STORE"] as GridViewDataComboBoxColumn;
            List <LineSideStoreEntity> _all             = LinesideStoreFactory.GetMaterialStore();

            comResourceStore.PropertiesComboBox.DataSource = _all;
            comResourceStore.PropertiesComboBox.TextField  = "STORE_NAME";
            comResourceStore.PropertiesComboBox.ValueField = "STORE_CODE";

            GridViewDataComboBoxColumn comType = ASPxGridView1.Columns["BATCH_TYPE"] as GridViewDataComboBoxColumn;

            DataTable dt = new DataTable();

            dt.Columns.Add("text");
            dt.Columns.Add("value");
            dt.Rows.Add("天", 0);
            dt.Rows.Add("周", 1);
            dt.Rows.Add("旬", 2);
            dt.Rows.Add("月", 3);
            dt.Rows.Add("季度", 4);

            comType.PropertiesComboBox.DataSource = dt;
            comType.PropertiesComboBox.TextField  = "text";
            comType.PropertiesComboBox.ValueField = "value";

            ASPxGridView1.DataBind();
        }
Exemple #9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManager.getCompanyCode();

        if (!IsPostBack)
        {
            List <ProductLineEntity>   plineEntities = ProductLineFactory.GetAll();
            List <LineSideStoreEntity> stores        = LinesideStoreFactory.GetAll();

            foreach (var s in stores)
            {
                storeCode.Items.Add(s.STORE_NAME, s.STORE_CODE);
            }

            foreach (var p in plineEntities)
            {
                plineCode.Items.Add(p.PLINE_NAME, p.PLINE_CODE);
            }
        }

        setCondition();
    }