Example #1
0
        private void DgBind()
        {
            err = null;
            DataTable dt = new DataTable();

            dt = ca.GetCurOilStorage(out err);
            if (err != null)
            {
                MessageBox.Show("查询错误,请重试!", "系统提示", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
                clog.WriteLine(err);
                return;
            }
            if (dt != null)
            {
                this.dataGrid1.SetDataBinding(dt, "");
                this.EnToCh("物料名称,物料型号,库存数量,部门名称", "100,100,100,100", dt, this.dataGrid1);
            }
            else
            {
                MessageBox.Show("查询错误,请重试!", "系统提示", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
            }
        }