Ejemplo n.º 1
0
 /// <summary>
 /// 私有方法,加载BOM型号
 /// </summary>
 private void LoadPartTypeData()
 {
     Ctrl.DbConStrFactory conFactory = Ctrl.DbConStrFactory.CreateInstance();
     Ctrl.FileCtrl        fileCtrl   = Ctrl.FileCtrl.CreateInstance(conFactory.GetSqlConStr("defaultSqlDb"), conFactory.GetAccessConStr("defaultAccessDb"));
     cmbType.DataSource = null;
     cmbType.DataSource = fileCtrl.LoadType(cmbWkc.SelectedValue.ToString());
 }
Ejemplo n.º 2
0
        private void LoadBom(object state)
        {
            Dictionary <string, string> pms = state as Dictionary <string, string>;

            Ctrl.DbConStrFactory conFactory = Ctrl.DbConStrFactory.CreateInstance();
            Ctrl.FileCtrl        fileCtrl   = Ctrl.FileCtrl.CreateInstance(conFactory.GetSqlConStr("defaultSqlDb"), conFactory.GetSqlConStr("defaultAccessDb"));
            DataTable            dt         = fileCtrl.LoadBom(pms["condition"], pms["eqmNo"]);

            if (dgvBom.InvokeRequired == true)
            {
                dgvBom.Invoke(new Action <object>(LoadBom), state);
            }
            else
            {
                dgvBom.DataSource = null;
                dgvBom.DataSource = dt;
                for (int i = 0; i < dgvBom.Columns.Count; i++)
                {
                    dgvBom.Columns[i].HeaderText = dt.Columns[i].Caption;
                }
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 重载数据
        /// </summary>
        /// <param name="state">参数对象</param>
        private void ReLoadData(string where = null)
        {
            Ctrl.DbConStrFactory conFactory   = Ctrl.DbConStrFactory.CreateInstance();
            Ctrl.DataLoadCtrl    dataloadCtrl = Ctrl.DataLoadCtrl.CreateInstance(conFactory.GetSqlConStr("defaultSqlDb"), conFactory.GetAccessConStr("defaultAccessDb"));
            DataTable            dt1          = dataloadCtrl.LoadPartBackup(where);

            dgvMaintainceInfo.Rows.Clear();
            int i = 0;

            foreach (DataRow item in dt1.Rows)
            {
                dgvMaintainceInfo.Rows.Add();
                dgvMaintainceInfo.Rows[i].Cells["dgvColumnBackupPartNo"].Value         = item[0];
                dgvMaintainceInfo.Rows[i].Cells["dgvColumnBackupPartName"].Value       = item[1];
                dgvMaintainceInfo.Rows[i].Cells["dgvColumnBackupPartDesc"].Value       = item[2];
                dgvMaintainceInfo.Rows[i].Cells["dgvColumnBackupPartQty"].Value        = item[3];
                dgvMaintainceInfo.Rows[i].Cells["dgvColumnBackupPartUnitPrice"].Value  = item[4];
                dgvMaintainceInfo.Rows[i].Cells["dgvColumnBackupPartManufacter"].Value = item[5];
                dgvMaintainceInfo.Rows[i].Cells["dgvColumnBackupPartSize"].Value       = item[6];
                dgvMaintainceInfo.Rows[i].Cells["dgvColumnBackupPartRegistime"].Value  = item[7];
                dgvMaintainceInfo.Rows[i].Cells["dgvColumnBackupPartRemark"].Value     = item[8];
                i++;
            }
        }
Ejemplo n.º 4
0
        private void frmApoAct_Load(object sender, EventArgs e)
        {
            Ctrl.DbConStrFactory            conFactory = Ctrl.DbConStrFactory.CreateInstance();
            Ctrl.FileCtrl                   fileCtrl   = Ctrl.FileCtrl.CreateInstance(conFactory.GetSqlConStr("defaultSqlDb"), conFactory.GetAccessConStr("defaultAccessDb"));
            List <Model.TableModel.Apo_act> list       = fileCtrl.GetFileFlow(_fileNo);

            dgvApoAct.Rows.Clear();
            int i = 0;

            if (list == null)
            {
                return;
            }
            if (list.Count <= 0)
            {
                return;
            }
            foreach (Model.TableModel.Apo_act item in list)
            {
                dgvApoAct.Rows.Add();
                dgvApoAct.Rows[i].Cells["colApoActStep"].Value = item.act_step;
                dgvApoAct.Rows[i].Cells["colApoActUser"].Value = item.act_user_name;
                dgvApoAct.Rows[i].Cells["colApoActName"].Value = item.apo_item_name;
                dgvApoAct.Rows[i].Cells["colApoActTime"].Value = item.act_time;
                i++;
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 加载文件列表
        /// </summary>
        private void LoadFile()
        {
            string fileTypeNo = GetFileTypeNo();
            string eqmNo      = GetCmbEqmValue();

            Ctrl.DbConStrFactory             conFactory = Ctrl.DbConStrFactory.CreateInstance();
            Ctrl.FileCtrl                    fileCtrl   = Ctrl.FileCtrl.CreateInstance(conFactory.GetSqlConStr("defaultSqlDb"), conFactory.GetAccessConStr("defaultAccessDb"));
            List <Model.TableModel.Dms_file> list       = fileCtrl.LoadFile(eqmNo, fileTypeNo);

            dgvFileFlow.Rows.Clear();
            int i = 0;

            foreach (Model.TableModel.Dms_file item in list)
            {
                dgvFileFlow.Rows.Add();
                dgvFileFlow.Rows[i].Cells["colPeFileName"].Value = item.file_name + item.file_extension;
                string fileTime;
                string crtUser = fileCtrl.GetFileCreatorAndTime(item.file_no, out fileTime);
                dgvFileFlow.Rows[i].Cells["colPeFileDateTime"].Value = fileTime;
                dgvFileFlow.Rows[i].Cells["colPeFileCreater"].Value  = crtUser;
                dgvFileFlow.Rows[i].Tag = item.file_no;
                i++;
            }
        }