Пример #1
0
        private void SelectProductTypeData()
        {
            //调用查询接口
            radGridView1.DataSource = null;
            DataSet   dataSet   = serviceClient.SelectProductContinairCapacity("");
            DataTable dataTable = dataSet.Tables[0];

            typeNoData.Clear();
            if (dataTable.Rows.Count > 0)
            {
                //显示数据
                for (int i = 0; i < dataTable.Rows.Count; i++)
                {
                    DataRow dr = typeNoData.NewRow();
                    dr[DATA_ORDER]              = i + 1;
                    dr[DATA_TYPENO_NAME]        = dataTable.Rows[i][0].ToString();
                    dr[DATA_CONTAINER_CAPACITY] = dataTable.Rows[i][1].ToString();
                    dr[DATA_USER_NAME]          = dataTable.Rows[i][2].ToString();
                    dr[DATA_UPDATE_DATE]        = dataTable.Rows[i][3].ToString();
                    dr[DATA_DESCRIBLE]          = dataTable.Rows[i][4].ToString();
                    typeNoData.Rows.Add(dr);
                }
                radGridView1.DataSource = typeNoData;
                SetGridReadOnly();
            }
            else
            {
                typeNoData.Clear();
                radGridView1.DataSource = typeNoData;
            }
            DataGridViewCommon.SetRadGridViewProperty(this.radGridView1, true);
            SetGridReadOnly();
        }
Пример #2
0
 async private void InitControl()
 {
     //type no
     cb_typeNo.Items.Clear();
     cb_material_typeNo.Items.Clear();
     cb_station.Items.Clear();
     try
     {
         DataTable dt = (await serviceClient.SelectProductContinairCapacityAsync("")).Tables[0];
         for (int i = 0; i < dt.Rows.Count; i++)
         {
             cb_typeNo.Items.Add(dt.Rows[i][0]);
             cb_material_typeNo.Items.Add(dt.Rows[i][0]);
         }
         cb_typeNo.Items.Add("");
         //station
         dt = null;//(await serviceClient.SelectStationAsync("", "")).Tables[0];
         for (int i = 0; i < dt.Rows.Count; i++)
         {
             cb_station.Items.Add(dt.Rows[i][1]);
         }
         cb_station.Items.Add("");
     }
     catch (Exception ex)
     {
         LogHelper.Log.Error(ex.Message + "\r\n" + ex.StackTrace);
     }
     DataGridViewCommon.SetRadGridViewProperty(this.radGridViewMaterial, false);
     DataGridViewCommon.SetRadGridViewProperty(this.radGridViewPackage, false);
 }
Пример #3
0
 private void UserManager_Load(object sender, EventArgs e)
 {
     serviceClient = new MesService.MesServiceClient();
     InitDataTable();
     DataGridViewCommon.SetRadGridViewProperty(this.radGridView1, false);
     this.radGridView1.ReadOnly = true;
     SelectAllUser();
 }
Пример #4
0
 private void Init()
 {
     serviceClient = new MesService.MesServiceClient();
     DataGridViewCommon.SetRadGridViewProperty(this.radGridViewSn, false);
     DataGridViewCommon.SetRadGridViewProperty(this.radGridViewPackage, false);
     DataGridViewCommon.SetRadGridViewProperty(this.radGridViewMaterial, false);
     DataGridViewCommon.SetRadGridViewProperty(this.radGridViewCheck, false);
     DataGridViewCommon.SetRadGridViewProperty(this.radGridViewQuanlity, false);
     this.radGridViewSn.ReadOnly       = true;
     this.radGridViewPackage.ReadOnly  = true;
     this.radGridViewMaterial.ReadOnly = true;
     this.radGridViewCheck.ReadOnly    = true;
     this.radGridViewQuanlity.ReadOnly = true;
     InitDataTable();
     this.panel_sn.Visible = true;
     this.panel_sn.Dock    = DockStyle.Fill;
     this.tool_sn_exportFilter.Items.Clear();
     this.tool_sn_exportFilter.Items.Add(GridViewExport.ExportFormat.EXCEL);
     this.tool_sn_exportFilter.Items.Add(GridViewExport.ExportFormat.HTML);
     this.tool_sn_exportFilter.Items.Add(GridViewExport.ExportFormat.PDF);
     this.tool_sn_exportFilter.Items.Add(GridViewExport.ExportFormat.CSV);
     this.tool_sn_exportFilter.SelectedIndex = 0;
     this.tool_package_exportFilter.Items.Clear();
     this.tool_package_exportFilter.Items.Add(GridViewExport.ExportFormat.EXCEL);
     this.tool_package_exportFilter.Items.Add(GridViewExport.ExportFormat.HTML);
     this.tool_package_exportFilter.Items.Add(GridViewExport.ExportFormat.PDF);
     this.tool_package_exportFilter.Items.Add(GridViewExport.ExportFormat.CSV);
     this.tool_package_exportFilter.SelectedIndex = 0;
     this.tool_material_exportFilter.Items.Clear();
     this.tool_material_exportFilter.Items.Add(GridViewExport.ExportFormat.EXCEL);
     this.tool_material_exportFilter.Items.Add(GridViewExport.ExportFormat.HTML);
     this.tool_material_exportFilter.Items.Add(GridViewExport.ExportFormat.PDF);
     this.tool_material_exportFilter.Items.Add(GridViewExport.ExportFormat.CSV);
     this.tool_material_exportFilter.SelectedIndex = 0;
     this.tool_productCheck_exportFilter.Items.Clear();
     this.tool_productCheck_exportFilter.Items.Add(GridViewExport.ExportFormat.EXCEL);
     this.tool_productCheck_exportFilter.Items.Add(GridViewExport.ExportFormat.HTML);
     this.tool_productCheck_exportFilter.Items.Add(GridViewExport.ExportFormat.PDF);
     this.tool_productCheck_exportFilter.Items.Add(GridViewExport.ExportFormat.CSV);
     this.tool_productCheck_exportFilter.SelectedIndex = 0;
     this.tool_quanlity_exportFilter.Items.Clear();
     this.tool_quanlity_exportFilter.Items.Add(GridViewExport.ExportFormat.EXCEL);
     this.tool_quanlity_exportFilter.Items.Add(GridViewExport.ExportFormat.HTML);
     this.tool_quanlity_exportFilter.Items.Add(GridViewExport.ExportFormat.PDF);
     this.tool_quanlity_exportFilter.Items.Add(GridViewExport.ExportFormat.CSV);
     this.tool_quanlity_exportFilter.SelectedIndex = 0;
     if (MESMainForm.currentUsetType != 0)
     {
         this.tool_materialClearDB.Enabled     = false;
         this.tool_packageClearDB.Enabled      = false;
         this.tool_productCheckClearDB.Enabled = false;
         this.tool_quanlityClearDB.Enabled     = false;
         this.tool_SNClearDB.Enabled           = false;
     }
     this.tool_SNClearDB.Visible = false;
     this.radDock1.ActiveWindow  = this.dw_snHistory;
 }
Пример #5
0
        async private void SelectStationList(string processName)
        {
            //调用查询接口
            if (string.IsNullOrEmpty(processName))
            {
                return;
            }
            radGridView1.DataSource = null;
            DataSet dataSet = await serviceClient.SelectStationListAsync(processName);

            DataTable dataTable = dataSet.Tables[0];

            stationData.Clear();
            this.groupbox_graph.Controls.Clear();
            if (dataTable.Rows.Count > 0)
            {
                this.radGridView1.BeginEdit();
                //显示数据
                for (int i = 0; i < dataTable.Rows.Count; i++)
                {
                    DataRow dr          = stationData.NewRow();
                    var     originID    = dataTable.Rows[i][0].ToString();
                    var     stationName = dataTable.Rows[i][1].ToString();
                    if (originID == (i + 1).ToString())
                    {
                        dr[DATA_ORDER] = originID;
                    }
                    else
                    {
                        //修改ID
                        var row = serviceClient.UpdateProcessOrder(processName, stationName, i + 1, MESMainForm.currentUser);
                        SelectStationList(processName);
                        return;
                    }
                    dr[DATA_STATION_NAME] = stationName;
                    dr[DATA_USER_NAME]    = dataTable.Rows[i][2].ToString();
                    dr[DATA_UPDATE_DATE]  = dataTable.Rows[i][3].ToString();
                    stationData.Rows.Add(dr);
                    //this.radGridView1.Rows[i].Cells[0].Value = dataTable.Rows[i][0].ToString();
                }
                this.radGridView1.DataSource = stationData;
                this.radGridView1.EndEdit();
                NetronLightGraph();
            }
            else
            {
                stationData.Clear();
                radGridView1.DataSource = stationData;
                this.radGridView1.Rows.AddNew();
            }
            DataGridViewCommon.SetRadGridViewProperty(this.radGridView1, true);
            this.radGridView1.AllowRowHeaderContextMenu = false;
            this.radGridView1.Columns[0].ReadOnly       = true;
            this.radGridView1.Columns[2].ReadOnly       = true;
            this.radGridView1.Columns[3].ReadOnly       = true;
            stationDataTemp = stationData.Copy();
        }
 private void Init()
 {
     serviceClient = new MesService.MesServiceClient();
     pmListTemp    = new List <ProductMaterial>();
     pmStockList   = new List <ProductMaterial>();
     this.radDock1.ActiveWindow = this.dw_materialBind;
     DataGridViewCommon.SetRadGridViewProperty(this.radGridViewBind, true);
     DataGridViewCommon.SetRadGridViewProperty(this.radGridViewStock, false);
     BindingDataSource();
     InitDataTable();
     InitMaterialRID();
 }
        async private void QueryPcbaMsg()
        {
            LogHelper.Log.Info("start...");
            if (this.tb_pcbasn.Text != "")
            {
                this.currentPage = 1;//根据条件查询
                this.bindingNavigatorPositionItem.Text = currentPage.ToString();
            }
            this.radGridView1.DataSource = null;
            this.radGridView1.Update();
            var pcbaMesObj = (await serviceClientTest.QueryPCBAMesAsync(this.tb_pcbasn.Text, currentPage, pageSize));

            if (pcbaMesObj.BindNumber % pageSize > 0)
            {
                pageCount = pcbaMesObj.BindNumber / pageSize + 1;
            }
            else
            {
                pageCount = pcbaMesObj.BindNumber / pageSize;
            }
            var dtSource = InitBindRowSource();

            this.radGridView1.BeginEdit();
            DataGridViewCommon.SetRadGridViewProperty(this.radGridView1, false);
            this.radGridView1.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.None;
            var dt = pcbaMesObj.BindHistoryData.Tables[0];

            this.radGridView1.DataSource        = dt;
            bindingSource.DataSource            = dtSource;
            this.bindingNavigator.BindingSource = bindingSource;
            this.radGridView1.ReadOnly          = true;
            foreach (var rowInfo in this.radGridView1.Rows)
            {
                var bindingState = rowInfo.Cells[5].Value.ToString();
                var pcbaState    = rowInfo.Cells[6].Value.ToString();
                var outterState  = rowInfo.Cells[7].Value.ToString();
                if (bindingState == "已解除绑定")
                {
                    rowInfo.Cells[5].Style.ForeColor = Color.Red;
                }
                if (pcbaState == "异常")
                {
                    rowInfo.Cells[6].Style.ForeColor = Color.PaleVioletRed;
                }
                if (outterState == "异常")
                {
                    rowInfo.Cells[7].Style.ForeColor = Color.PaleVioletRed;
                }
            }
            this.radGridView1.EndEdit();
            this.radGridView1.BestFitColumns();
        }
 private void ProductPackageDetail_Load(object sender, EventArgs e)
 {
     this.tool_package_exportFilter.Items.Clear();
     this.tool_package_exportFilter.Items.Add(GridViewExport.ExportFormat.EXCEL);
     this.tool_package_exportFilter.Items.Add(GridViewExport.ExportFormat.HTML);
     this.tool_package_exportFilter.Items.Add(GridViewExport.ExportFormat.PDF);
     this.tool_package_exportFilter.Items.Add(GridViewExport.ExportFormat.CSV);
     this.tool_package_exportFilter.SelectedIndex = 0;
     serviceClient = new MesService.MesServiceClient();
     DataGridViewCommon.SetRadGridViewProperty(this.radGridViewPackage, false);
     this.radGridViewPackage.ReadOnly = true;
     LoadDataSource(this.outCaseCode);
 }
Пример #9
0
 private void Init()
 {
     this.status_username.Text         = MESMainForm.currentUser;
     this.cb_curprocess.DropDownStyle  = ComboBoxStyle.DropDownList;
     this.cb_processItem.DropDownStyle = ComboBoxStyle.DropDownList;
     serviceClient     = new MesService.MesServiceClient();
     serviceClientTest = new MesServiceTest.MesServiceClient();
     stationListTemp   = new List <string>();
     DataGridViewCommon.SetRadGridViewProperty(this.radGridView1, true);
     this.radGridView1.AllowRowHeaderContextMenu = false;
     DataSource();
     RefreshCurrentProcess();
     this.cb_processItem.Text = serviceClientTest.SelectCurrentTProcess();
 }
 private void MaterialDetailMsg_Load(object sender, EventArgs e)
 {
     this.tool_exportFilter.Items.Clear();
     this.tool_exportFilter.Items.Add(GridViewExport.ExportFormat.EXCEL);
     this.tool_exportFilter.Items.Add(GridViewExport.ExportFormat.HTML);
     this.tool_exportFilter.Items.Add(GridViewExport.ExportFormat.PDF);
     this.tool_exportFilter.Items.Add(GridViewExport.ExportFormat.CSV);
     this.tool_exportFilter.SelectedIndex = 0;
     serviceClient = new MesService.MesServiceClient();
     DataGridViewCommon.SetRadGridViewProperty(this.radGridView1, false);
     this.radGridView1.ReadOnly = true;
     InitDataTable();
     SelectMaterialDetail(this.materialCode);
 }
Пример #11
0
        private void TestLogDetail_Load(object sender, EventArgs e)
        {
            InitLogDataSource();
            serviceClient = new MesService.MesServiceClient();
            DataGridViewCommon.SetRadGridViewProperty(this.radGridView1, false);
            SetGroup();
            this.radGridView1.ReadOnly = true;
            this.pickerStartTime.Text  = DateTime.Now.ToString("yyyy-MM-dd") + " 00:00:00";
            this.pickerEndTime.Text    = DateTime.Now.ToString("yyyy-MM-dd") + " 23:59:59";
            var ds = serviceClient.SelectTestLogDataDetail(productSn, "", "");

            SetConditions();
            LoadDataSource(ds);
        }
Пример #12
0
        async private void Material_Load(object sender, EventArgs e)
        {
            serviceClient = new MesService.MesServiceClient();
            DataGridViewCommon.SetRadGridViewProperty(this.radGridView1, true);
            materialCodeTemp  = new List <string>();
            rlbx_explain.Text = "在新行添加物料名称、物料库存,右键行头可删除行数据";
            //设置第一列为只读
            this.radGridView1.DataSource = DataSource();
            SelectMaterial();//查询数据
            this.radGridView1.Columns[0].ReadOnly = true;

            this.radGridView1.CellBeginEdit      += RadGridView1_CellBeginEdit;
            this.radGridView1.CellEndEdit        += RadGridView1_CellEndEdit;
            this.radGridView1.ContextMenuOpening += RadGridView1_ContextMenuOpening;
            this.radGridView1.MouseDown          += RadGridView1_MouseDown;
        }
Пример #13
0
        private void ProductType_Load(object sender, EventArgs e)
        {
            mesService       = new MesService.MesServiceClient();
            modifyTypeNoTemp = new List <string>();
            InitDataSource();
            DataGridViewCommon.SetRadGridViewProperty(this.radGridView1, true);
            SelectServiceData("");

            btn_commit.Click       += Btn_commit_Click;
            btn_select.Click       += Btn_select_Click;
            btn_clear_server.Click += Btn_clear_server_Click;

            this.radGridView1.ContextMenuOpening += RadGridView1_ContextMenuOpening;
            this.radGridView1.MouseDown          += RadGridView1_MouseDown;
            this.radGridView1.CellBeginEdit      += RadGridView1_CellBeginEdit;
            this.radGridView1.CellEndEdit        += RadGridView1_CellEndEdit;
        }
Пример #14
0
        async private void Init()
        {
            serviceClient = new MesService.MesServiceClient();
            //packageProduct = new MesService.PackageProduct();
            InitCaseCodeList();
            //获取型号
            cb_typeNo.Items.Clear();
            DataTable dt = null;// (await serviceClient.SelectProductTypeNoAsync("")).Tables[0];

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                cb_typeNo.Items.Add(dt.Rows[i][0].ToString());
            }
            cb_typeNo.Items.Add("");
            DataSource();
            DataGridViewCommon.SetRadGridViewProperty(this.radGridView1, false);
        }
Пример #15
0
        private void Init()
        {
            serviceClient = new MesService.MesServiceClient();
            DataGridViewCommon.SetRadGridViewProperty(this.radGridView1, false);
            this.radGridView1.Columns[0].Width = 15;

            var len1 = ConfigurationManager.AppSettings["snLength1"].ToString();
            var len2 = ConfigurationManager.AppSettings["snLength2"].ToString();

            if (!string.IsNullOrEmpty(len1) && !string.IsNullOrEmpty(len2))
            {
                if (!int.TryParse(len1, out snLength1) || !int.TryParse(len2, out snLength2))
                {
                    MessageBox.Show("配置文件格式错误!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
Пример #16
0
        async private void SelectMaterialMsg()
        {
            DataTable dt = (await serviceClient.SelectMaterialAsync(this.tb_inputMsg.Text, MesService.MaterialStockState.PUT_IN_STOCK_AND_STATEMENT)).Tables[0];

            DataTable data = new DataTable();

            data.Columns.Add("序号");
            data.Columns.Add("物料编码");
            data.Columns.Add("物料名称");
            data.Columns.Add("库存状态");

            if (dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    DataRow dr           = data.NewRow();
                    var     materialCode = dt.Rows[i][0].ToString();
                    var     materialPN   = AnalysisMaterialCode.GetMaterialPN(materialCode);
                    dr["序号"]   = i + 1;
                    dr["物料编码"] = materialCode;
                    dr["物料名称"] = serviceClient.SelectMaterialName(materialPN);
                    var stockState = dt.Rows[i][6].ToString();
                    if (stockState == "2")
                    {
                        stockState = "已使用完成";
                    }
                    else if (stockState == "3")
                    {
                        stockState = "已经结单";
                    }
                    else if (stockState == "1")
                    {
                        stockState = "正常使用";
                    }
                    dr["库存状态"] = stockState;
                    data.Rows.Add(dr);
                }
            }
            this.radGridView1.DataSource = data;
            DataGridViewCommon.SetRadGridViewProperty(this.radGridView1, false);
            this.radGridView1.ReadOnly = true;
            this.radGridView1.MasterTemplate.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.None;
            this.radGridView1.BestFitColumns();
        }
Пример #17
0
        async private void Init()
        {
            serviceClient = new MesService.MesServiceClient();
            if (MESMainForm.currentUsetType != 0)
            {
                this.tool_clearDB.Enabled = false;
            }
            rbtn_today.Checked     = true;
            this.radGridView1.Dock = DockStyle.Fill;
            DataGridViewCommon.SetRadGridViewProperty(this.radGridView1, false);
            DataGridViewCommon.SetRadGridViewProperty(this.gridProgrameVersion, false);
            DataGridViewCommon.SetRadGridViewProperty(this.gridSpec, false);
            this.radGridView1.ReadOnly        = true;
            this.gridSpec.ReadOnly            = true;
            this.gridProgrameVersion.ReadOnly = true;
            var dt = (await serviceClient.SelectProductContinairCapacityAsync("")).Tables[0];

            if (dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    this.tool_queryCondition.Items.Add(dt.Rows[i][0].ToString());
                }
            }
            //init treeview
            string    path      = @"D:\work\project\FigKey\RetrospectiveSystem\project\IIS";
            ImageList imageList = new ImageList();

            imageList.Images.Add("open", Resources.FolderList32);
            //LoadTreeView.SetTreeNoByFilePath(this.treeView1,path,new ImageList());
            //TreeViewData.PopulateTreeView(path, this.treeView1);
            this.pickerStartTime.Text = DateTime.Now.ToString("yyyy-MM-dd") + " 00:00:00";
            this.pickerEndTime.Text   = DateTime.Now.ToString("yyyy-MM-dd") + " 23:59:59";
            //this.tool_exportCondition.Items.Add(GridViewExport.ExportFormat.EXCEL.ToString());
            //this.tool_exportCondition.Items.Add(GridViewExport.ExportFormat.HTML.ToString());
            //this.tool_exportCondition.Items.Add(GridViewExport.ExportFormat.PDF.ToString());
            this.tool_exportCondition.Items.Add(GridViewExport.ExportFormat.CSV.ToString());
            this.tool_exportCondition.SelectedIndex = 0;

            this.radDock1.ActiveWindow   = this.tool_logData;
            this.label_delStatus.Visible = false;
        }
Пример #18
0
        private void SelectMaterial()
        {
            //调用查询接口
            radGridView1.DataSource = null;
            DataSet   dataSet   = serviceClient.SelectMaterialPN();
            DataTable dataTable = dataSet.Tables[0];

            materialData.Clear();
            if (dataTable.Rows.Count > 0)
            {
                //显示数据
                for (int i = 0; i < dataTable.Rows.Count; i++)
                {
                    DataRow dr = materialData.NewRow();
                    dr[DATA_ORDER]         = i + 1;
                    dr[DATA_MATERIAL_CODE] = dataTable.Rows[i][0].ToString();
                    dr[DATA_MATERIAL_NAME] = dataTable.Rows[i][1].ToString();
                    dr[DATA_USER_NAME]     = dataTable.Rows[i][2].ToString();
                    dr[DATA_UPDATE_DATE]   = dataTable.Rows[i][3].ToString();
                    dr[DATA_DESCRIBLE]     = dataTable.Rows[i][4].ToString();
                    materialData.Rows.Add(dr);
                }
                radGridView1.DataSource = materialData;
            }
            else
            {
                materialData.Clear();
                radGridView1.DataSource = materialData;
            }
            DataGridViewCommon.SetRadGridViewProperty(this.radGridView1, false);
            this.radGridView1.Columns[0].ReadOnly = true;
            this.radGridView1.Columns[1].ReadOnly = true;
            materialCodeTemp.Clear();
            modifyTypeNoTemp.Clear();
            modifyProductTypeNoList.Clear();
        }
Пример #19
0
        private void Init()
        {
            serviceClient           = new MesService.MesServiceClient();
            serviceClientTest       = new MesServiceTest.MesServiceClient();
            modifyTypeNoTemp        = new List <string>();
            modifyProductTypeNoList = new List <BasicConfig>();
            materialCodeTemp        = new List <BasicConfig>();
            DataGridViewCommon.SetRadGridViewProperty(this.radGridView1, true);
            this.radGridView1.AllowRowHeaderContextMenu = false;
            var bMaterialCode = int.TryParse(ConfigurationManager.AppSettings["materialLength"].ToString(), out materialCodeLength);

            int.TryParse(ConfigurationManager.AppSettings["IsAutoAdd"].ToString(), out IsAutoAdd);
            this.menu_exportCondition.Items.Add(GridViewExport.ExportFormat.EXCEL.ToString());
            this.menu_exportCondition.Items.Add(GridViewExport.ExportFormat.HTML.ToString());
            this.menu_exportCondition.Items.Add(GridViewExport.ExportFormat.PDF.ToString());
            this.menu_exportCondition.Items.Add(GridViewExport.ExportFormat.CSV.ToString());
            this.menu_exportCondition.Text = GridViewExport.ExportFormat.EXCEL.ToString();
            DataSource();
            RefreshData();
            if (!bMaterialCode)
            {
                MessageBox.Show("配置参数格式错误!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }