Beispiel #1
0
        public void BindData()
        {
            string projectCode = txtProjectCode.Text;

            if (string.IsNullOrEmpty(projectCode))
            {
                return;
            }
            List <SAPPlanEntity> entity = new List <SAPPlanEntity>(); //SAPPlanFactory.GetByOrderCode(orderCode);

            entity.AddRange(SAPPlanFactory.GetByProjectCode(projectCode));

            ASPxGridView1.DataSource = entity;

            DataTable dt = new DataTable();

            dt.Columns.Add("Text");
            dt.Columns.Add("Value");
            dt.Rows.Add("初始状态", "0");
            dt.Rows.Add("导入中", "1");
            dt.Rows.Add("已导入", "2");

            GridViewDataComboBoxColumn colPrind = ASPxGridView1.Columns["PRIND"] as GridViewDataComboBoxColumn;

            colPrind.PropertiesComboBox.DataSource = dt;
            colPrind.PropertiesComboBox.TextField  = "Text";
            colPrind.PropertiesComboBox.ValueField = "Value";

            ASPxGridView1.DataBind();
        }
Beispiel #2
0
        protected void ASPxGridView1_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
        {
            string orderCode = e.Values["AUFNR"] as string;

            SAPPlanFactory.CancleOrder(orderCode);
            e.Cancel = true;
            BindData();
        }
Beispiel #3
0
        public void BindData()
        {
            List <SAPPlanEntity> entity = SAPPlanFactory.GetAll();

            ASPxGridView1.DataSource = entity;

            DataTable dt = new DataTable();

            dt.Columns.Add("Text");
            dt.Columns.Add("Value");
            dt.Rows.Add("初始状态", "0");
            dt.Rows.Add("导入中", "1");
            dt.Rows.Add("已导入", "2");

            GridViewDataComboBoxColumn colPrind = ASPxGridView1.Columns["PRIND"] as GridViewDataComboBoxColumn;

            colPrind.PropertiesComboBox.DataSource = dt;
            colPrind.PropertiesComboBox.TextField  = "Text";
            colPrind.PropertiesComboBox.ValueField = "Value";

            ASPxGridView1.DataBind();
        }