Ejemplo n.º 1
0
        //查询所有
        public override bool QueryAll()
        {
            try
            {
                maList = new List <MaterialCls>();

                maList = MaterialDAL.GetAll();

                MaterialBindingSource.DataSource = maList;
                this.gridControl1.DataSource     = MaterialBindingSource;

                return(true);
            }
            catch (System.Exception ex)
            {
                return(false);
            }
        }
Ejemplo n.º 2
0
        //下拉框初始化
        public bool init_cmbBox()
        {
            try
            {
                this.cmbObjectList.Items.Clear();
                maList = new List <MaterialCls>();
                maList = MaterialDAL.GetAll();

                foreach (var val in maList)
                {
                    this.cmbObjectList.Items.Add(val.MaterialName);
                }

                return(true);;
            }
            catch (System.Exception ex)
            {
                return(false);
            }
        }
 public List <Material> GetAll()
 {
     return(_materialDAL.GetAll());
 }