Esempio n. 1
0
        private void barManager2_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                if (backgroundWorker1.IsBusy == false)
                {
                    switch (e.Item.Name)
                    {
                    case "ButAdd":
                        if (gmc.GetSelectedRows().Count > 0)
                        {
                            this.DialogResult = DialogResult.OK;
                        }
                        else
                        {
                            ClsMsg.ShowWarningMsg("请勾选检漏的转鼓");
                        }
                        break;

                    case "ButExit":
                        this.Close();
                        break;

                    default:
                        break;
                    }
                }
            }
            catch (Exception ex)
            {
                ClsMsg.ShowErrMsg(ex.ToString());
            }
        }
Esempio n. 2
0
        private void barManager1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                switch (e.Item.Name)
                {
                case "bbtniAdd":
                    EidtStatus             = 0;
                    modelSource.DataSource = new SRUserRole.UAD_Role();
                    break;

                case "bbtniSave":
                    SaveFun();
                    break;

                case "bbtniDel":

                    break;

                case "bbtniQuit":
                    this.Close();
                    break;

                default:
                    break;
                }
            }
            catch (Exception ex)
            {
                ClsMsg.ShowErrMsg(ex.ToString());
            }
        }
Esempio n. 3
0
        private void SaveFun()
        {
            try
            {
                using (SRUserRole.UserRoleServiceClient client = new SRUserRole.UserRoleServiceClient())
                {
                    SRUserRole.CommonResult resData = null;
                    var model = modelSource.DataSource as SRUserRole.UAD_Role;

                    if (model != null)
                    {
                        if (EidtStatus == 0)
                        {
                            resData = client.AddRole(model);
                        }
                        else
                        {
                            resData = client.EditRole(model);
                        }
                        if (resData.IsSuccess)
                        {
                            ClsMsg.ShowInfoMsg("保存成功!");
                        }
                        else
                        {
                            ClsMsg.ShowErrMsg(resData.Message);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                ClsMsg.ShowErrMsg(ex.ToString());
            }
        }
Esempio n. 4
0
 private void bgWait_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     try
     {
         if (e.Result != null)
         {
             if (e.Result is SRPersonInfo.Person)
             {
                 if (ClsMsg.ShowQuestionMsg("数据新增成功!\n 是否继续新增职员档案?") == DialogResult.Yes)
                 {
                     AddPersonData();
                 }
                 else
                 {
                     this.DialogResult = DialogResult.OK;
                 }
             }
             else if (e.Result is bool)
             {
                 this.DialogResult = DialogResult.OK;
             }
         }
     }
     catch (Exception ex)
     {
         ClsMsg.ShowErrMsg(ex.Message);
         Utils.Logger.Error(ex.ToString());
     }
 }
Esempio n. 5
0
 //添加
 private void ButAdd_Click(object sender, EventArgs e)
 {
     try
     {
         qCDrumsFindLeakReportBindingSource.EndEdit();//获取文本框数据
         if (model.FLResult.IsNullOrEmpty())
         {
             FLResultTextEdit.Focus();
             ClsMsg.ShowWarningEmptyMsg(ItemForFLResult.Text);
         }
         else if (model.Frequency.IsNullOrEmpty())
         {
             FrequencyTextEdit.Focus();
             ClsMsg.ShowWarningEmptyMsg(ItemForFrequency.Text);
         }
         else if (model.DevName.IsNullOrEmpty())
         {
             ClsMsg.ShowWarningEmptyMsg(ItemForDrumsName.Text);
         }
         else if (model.FLSituation.IsNullOrEmpty())
         {
             FLSituationTextEdit.Focus();
             ClsMsg.ShowWarningEmptyMsg(ItemForFLSituation.Text);
         }
         else if (model.FLResult.Equals("合格") || ClsMsg.ShowQuestionMsg("当前检漏结果为:不合格!\r\n是否继续提交呢?") == DialogResult.Yes)
         {
             BgWait.RunWorkerAsync("SaveData");
         }
     }
     catch (Exception ex)
     {
         Utils.Logger.Error(ex.ToString());
         ClsMsg.ShowErrMsg(ex.Message);
     }
 }
Esempio n. 6
0
        private void barManager1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                switch (e.Item.Name)
                {
                case "bbtniCarftsExecute":
                    if (gridView1.FocusedRowHandle >= 0)
                    {
                        string        ArrangedVouchCode = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "ArrangedVouchCode").ToString();
                        frmCfPExecute frm = new frmCfPExecute(context, ArrangedVouchCode);
                        frm.ShowDialog();
                    }
                    break;

                case "bbtniDetails":
                    if (gridView1.FocusedRowHandle >= 0)
                    {
                        string           ArrangedVouchCode = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "ArrangedVouchCode").ToString();
                        frmArrangedVouch frm = new frmArrangedVouch(context, ArrangedVouchCode);
                        frm.ShowDialog();
                    }
                    break;

                default:
                    break;
                }
            }
            catch (Exception ex)
            {
                Utils.Logger.Error(ex.ToString());
                ClsMsg.ShowErrMsg(ex.Message);
            }
        }
Esempio n. 7
0
        private void backgroundWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            backgroundWorker.ReportProgress(0);
            try
            {
                switch (e.Argument.ToString())
                {
                case "SearchData":
                    GetOperatingData(e);
                    break;

                default:
                    break;
                }
            }
            catch (System.ServiceModel.FaultException <CustomFaultMessage> fex)
            {
                backgroundWorker.ReportProgress(102, fex.Message);
                Utils.Logger.Error(fex.ToString());
            }
            catch (Exception ex)
            {
                ClsMsg.ShowErrMsg(ex.Message);
                Utils.Logger.Error(ex.ToString());
            }
            backgroundWorker.ReportProgress(100);
        }
Esempio n. 8
0
 private void OrderCodeTextEdit_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
 {
     try
     {
         frmOrderChoose frm = new frmOrderChoose(context);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             model.OrderType      = frm.OrderType;
             model.OrderCode      = frm.OrderID;
             model.ProductionLine = string.Format("{0}{1}", frm.Machine, frm.LineNum);
             model.Strength       = frm.Strength;
             if (frm.Specifications.IsNullOrEmpty() == false)
             {
                 model.Width = Convert.ToDecimal(frm.Specifications.Substring(0, 3)) / 10;
                 model.Thick = Convert.ToDecimal(frm.Specifications.Substring(3, 3)) / 100;
             }
             else
             {
                 model.Width = 0;
                 model.Thick = 0;
             }
             model.StandardPull = model.Width * model.Thick * Convert.ToDecimal((frm.Strength.Replace("强", "")));
         }
     }
     catch (Exception ex)
     {
         ClsMsg.ShowErrMsg(ex.Message);
         Utils.Logger.Error(ex.ToString());
     }
 }
Esempio n. 9
0
        private void frmPullDetectionReg_Load(object sender, EventArgs e)
        {
            try
            {
                ProcessTypeSpinEdit.Properties.DataSource = TProcessType;
                AddFun();

                this.BeginInvoke((MethodInvoker) delegate()
                {
                    using (SRQZData.QZDataServiceClient client = new SRQZData.QZDataServiceClient())
                    {
                        var data = client.GetQualityInspector(context.SessionID);
                        this.Invoke((MethodInvoker) delegate()
                        {
                            QualityInspectorTextEdit.Properties.DataSource = data;
                        });
                        dtPullRule = client.GetPullCompute(context.SessionID);
                    }
                });
            }
            catch (Exception ex)
            {
                ClsMsg.ShowErrMsg(ex.Message);
                Utils.Logger.Error(ex.ToString());
            }
        }
Esempio n. 10
0
        /// <summary>
        /// 工具栏事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void barManager1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                if (backgroundWorker1.IsBusy == false)
                {
                    switch (e.Item.Name)
                    {
                    case "bbtiEnsure":
                        string b = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "DevpCode").ToString();
                        DevpCode          = b;
                        this.DialogResult = DialogResult.OK;
                        break;


                    case "bbtiExit":
                        this.Close();
                        break;

                    default:
                        break;
                    }
                }
            }
            catch (Exception ex)
            {
                ClsMsg.ShowErrMsg(ex.ToString());
            }
        }
Esempio n. 11
0
        /// <summary>
        /// 单据体 参照控件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        internal void HeadRefer_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            try
            {
                //if (string.IsNullOrEmpty(e.Button.Caption) == false && model != null && model.Rows.Count > 0)
                //{
                //    var currControl = sender as ButtonEdit;
                //    var Ret = FilterConditions.FilterProcess(Context, e.Button.Caption.ToString(), false, null, currControl.Text, null);
                //    DataRow dRow = model.Rows[0];
                //    if (Ret != null)
                //    {
                //        if (Ret.Item1 != null && Ret.Item1.Rows.Count > 0)
                //        {
                //            for (int i = 0; i < Ret.Item1.Rows.Count; i++)
                //            {
                //                foreach (DataColumn item in Ret.Item1.Columns)
                //                {
                //                    if (dRow.Table.Columns.Contains(item.ColumnName))
                //                    {
                //                        dRow[item.ColumnName] = Ret.Item1.Rows[i][item.ColumnName];
                //                    }
                //                }
                //            }
                //        }
                //        model.AcceptChanges();

                //        //modelSource.EndEdit();
                //    }
                //}
            }
            catch (Exception ex)
            {
                ClsMsg.ShowErrMsg(ex.ToString());
            }
        }
Esempio n. 12
0
        private void CfPExecute_Load(object sender, EventArgs e)
        {
            try
            {
                var ExecuteStatus = DataEnum.GetEnumData(context, "CF.ExecuteStatus");

                ExecuteModeTextEdit.Properties.DataSource = DataEnum.GetEnumData("treatment");
                riluePriority.DataSource = DataEnum.GetEnumData(context, "CF.Priority");
                repositoryItemExecuteStatusLookUpEdit.DataSource = ExecuteStatus;
                ExecuteStatusTextEdit.Properties.DataSource      = ExecuteStatus;
                this.AddSysOperLogs(this.Text, OperateStatus.查询);
                using (SRBase.BaseServiceClient client = new SRBase.BaseServiceClient())
                {
                    var ret = client.GetCraftsParameterContrastList(context.SessionID);
                    if (ret.IsSuccess)
                    {
                        rilueParameterName.DataSource = ret.Data;
                    }
                    else
                    {
                        ClsMsg.ShowWarningMsg(ret.Message);
                    }
                }
                bgwWait.RunWorkerAsync("LoadTreeData");
            }
            catch (Exception ex)
            {
                Utils.Logger.Error(ex.ToString());
                ClsMsg.ShowErrMsg(ex.Message);
            }
        }
Esempio n. 13
0
        /// <summary>
        /// barManager控件响应事件,打开新窗体,传入参数区分新增跟修改,等待窗体数据返回更新列表数据
        /// lastupdata:20161115XXQ
        /// /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void barManager1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                frmExecute AddExetue = null;
                strDeviCode = null;
                if (BgWait1.IsBusy == false)
                {
                    switch (e.Item.Name)
                    {
                    case "bbtniAdd":

                        AddExetue = new frmExecute(context, strDeviCode);

                        if (AddExetue.ShowDialog() == DialogResult.OK)
                        {
                            BgWait1.RunWorkerAsync("SearchData");
                        }

                        break;

                    case "bbtniUpdate":

                        if (gridView1.FocusedRowHandle >= 0)
                        {
                            var model1 = gridView1.GetRow(gridView1.FocusedRowHandle) as SRExcute.DeviceExecute;

                            AddExetue = new frmExecute(context, model1.DeviCode);

                            if (AddExetue.ShowDialog() == DialogResult.OK)
                            {
                                BgWait1.RunWorkerAsync("SearchData");
                            }
                        }
                        else
                        {
                            ClsMsg.ShowWarningMsg("选中要修改的设备信息");
                        }

                        break;

                    case "bbtnExit":

                        this.Close();

                        break;

                    default:
                        break;
                    }
                }
            }
            catch (Exception ex)
            {
                ClsMsg.ShowErrMsg(ex.ToString());
            }
        }
Esempio n. 14
0
        private void bmTool_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                switch (e.Item.Name)
                {
                case "bbtniSave":
                    //EndEditOnAllBindingSources();
                    deviceBindingSource.EndEdit();
                    if (model.DevCode.IsNullOrEmpty())
                    {
                        ClsMsg.ShowWarningEmptyMsg(ItemForDevCode.Text);
                        DevCodeTextEdit.Focus();
                    }
                    else if (model.DevName.IsNullOrEmpty())
                    {
                        ClsMsg.ShowWarningEmptyMsg(ItemForDevName.Text);
                        DevNameTextEdit.Focus();
                    }
                    else if (model.DevCCode.IsNullOrEmpty())
                    {
                        ClsMsg.ShowWarningEmptyMsg(ItemForDevCCode.Text);
                        DevCCodeTextEdit.Focus();
                    }
                    else if (ClsMsg.ShowQuestionMsg("是否要保存设备档案信息呢?") == DialogResult.Yes)
                    {
                        bgwWait.RunWorkerAsync("SaveData");
                    }
                    break;

                case "bbtniDel":
                    if (strDevCode.IsNullOrEmpty())
                    {
                        ClsMsg.ShowWarningMsg("无任何数据可删除!");
                        return;
                    }
                    if (ClsMsg.ShowQuestionMsg("是否要删除设备档案呢?") == DialogResult.Yes)
                    {
                        bgwWait.RunWorkerAsync("DeleteData");
                    }
                    break;

                case "bbtniExit":
                    this.Close();
                    break;

                default:
                    break;
                }
            }
            catch (Exception ex)
            {
                ClsMsg.ShowErrMsg(ex.Message);
                Utils.Logger.Error(ex.ToString());
            }
        }
Esempio n. 15
0
 private void cmsTreeMenu_Opening(object sender, CancelEventArgs e)
 {
     try
     {
         tsmiAddChildren.Visible = (tvDepartmentClass.SelectedNode == null) ? false : true;
     }
     catch (Exception ex)
     {
         ClsMsg.ShowErrMsg(ex.Message);
         Utils.Logger.Error(ex.ToString());
     }
 }
Esempio n. 16
0
 private void frmDeviceClassList_Load(object sender, EventArgs e)
 {
     try
     {
         this.AddSysOperLogs(this.Text, OperateStatus.查询);
         bgwWait.RunWorkerAsync("LoadTreeData");
     }
     catch (Exception ex)
     {
         ClsMsg.ShowErrMsg(ex.Message);
         Utils.Logger.Error(ex.ToString());
     }
 }
Esempio n. 17
0
 private void tvDepartmentClass_AfterSelect(object sender, TreeViewEventArgs e)
 {
     try
     {
         departmentBindingSource.DataSource = e.Node.Tag as SRDepartment.Department;
         SetTextEditReadOnly("Check");
     }
     catch (Exception ex)
     {
         ClsMsg.ShowErrMsg(ex.Message);
         Utils.Logger.Error(ex.ToString());
     }
 }
Esempio n. 18
0
        private void GetPipelineOpereate(string PipelineCode)
        {
            try
            {
                using (var client = new SRPiPeline.PipelineServiceClient())
                {
                    var ret = client.GetDaviceInformation(context.SessionID, "06", PipelineCode);

                    if (ret.IsSuccess)
                    {
                        Model          = new SRPiPeline.MainPipelineInfo();
                        Model.Operator = context.UserName;
                        Model.Creator  = context.UserName;
                        //mainPipelineInfoBindingSource.DataSource = Model;
                        Model.DeveCode = ret.Data.DevCode;
                        Model.DeveName = ret.Data.DevName;
                        mainPipelineInfoBindingSource.DataSource = Model;
                        int iCurrPage = 0;
                        int iPageSize = 0;
                        Tuple <StringBuilder, List <object> > dtFilter = Tuple.Create <StringBuilder, List <object> >(new StringBuilder(), new List <object>());
                        dtFilter.Item1.Append("1 = 1");
                        FilterProcess.MergeFilterCondition("DeveCode", ret.Data.DevCode, ref dtFilter);
                        var mp_ret = client.GetOperatingRecord(context.SessionID, Tuple.Create <string, object[]>(dtFilter.Item1.ToString(), dtFilter.Item2.ToArray()), iCurrPage, iPageSize);
                        if (mp_ret.IsSuccess && mp_ret.Data.Count() > 0)
                        {
                            // PipelineStatusTextEdit.Properties.ReadOnly = true;
                            Model.PipelineStatus = mp_ret.Data.First(t => t.OperatingTime < DateTime.Now).PipelineStatus;

                            //if (PipelineStatusTextEdit.Text == "管道打开")
                            //{
                            //    Model.PromptDes = "管道关闭";
                            //}
                            //else if (PipelineStatusTextEdit.Text == "管道关闭")
                            //{
                            //    Model.PromptDes = "管道打开";
                            //}
                            mainPipelineInfoBindingSource.DataSource = Model;
                        }
                    }
                    else
                    {
                        ClsMsg.ShowInfoMsg(ret.Message);
                    }
                }
            }
            catch (Exception ex)
            {
                Utils.Logger.Error(ex.ToString());
                ClsMsg.ShowErrMsg(ex.Message);
            }
        }
Esempio n. 19
0
 private void gridViewPaging1_PagingChanged(object sender, MyPagingEventArgs e)
 {
     try
     {
         if (bgWait.IsBusy == false)
         {
             bgWait.RunWorkerAsync("LoadPersonData");
         }
     }
     catch (Exception ex)
     {
         ClsMsg.ShowErrMsg(ex.Message);
         Utils.Logger.Error(ex.ToString());
     }
 }
Esempio n. 20
0
 private void bt_Search_Click(object sender, EventArgs e)
 {
     try
     {
         if ((string.IsNullOrEmpty(te_DepCode.Text) == false || string.IsNullOrEmpty(te_PersonCode.Text) == false || string.IsNullOrEmpty(te_PersonName.Text) == false || string.IsNullOrEmpty(te_PersonType.Text) == false) && bgWait.IsBusy == false)
         {
             bgWait.RunWorkerAsync("LoadPersonData");
         }
     }
     catch (Exception ex)
     {
         ClsMsg.ShowErrMsg(ex.Message);
         Utils.Logger.Error(ex.ToString());
     }
 }
Esempio n. 21
0
 private void btn_Search_Click(object sender, EventArgs e)
 {
     try
     {
         if (backgroundWorker.IsBusy == false)
         {
             backgroundWorker.RunWorkerAsync("SearchData");
         }
     }
     catch (Exception ex)
     {
         ClsMsg.ShowErrMsg(ex.Message);
         Utils.Logger.Error(ex.ToString());
     }
 }
Esempio n. 22
0
 private void gridViewPaging1_PagingChanged(object sender, Client.Utility.Controls.MyPagingEventArgs e)
 {
     try
     {
         if (backgroundWorker.IsBusy == false)
         {
             backgroundWorker.RunWorkerAsync("SearchData");
         }
     }
     catch (Exception ex)
     {
         ClsMsg.ShowErrMsg(ex.Message);
         Utils.Logger.Error(ex.ToString());
     }
 }
Esempio n. 23
0
 private void frmRoleList_Load(object sender, EventArgs e)
 {
     try
     {
         using (SRUserRole.UserRoleServiceClient client = new SRUserRole.UserRoleServiceClient())
         {
             var resData = client.GetRoleList();
             gridControl1.DataSource = resData;
         }
     }
     catch (Exception ex)
     {
         ClsMsg.ShowErrMsg(ex.ToString());
     }
 }
Esempio n. 24
0
        private void barManager1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                if (backgroundWorker1.IsBusy == false)
                {
                    switch (e.Item.Name)
                    {
                    case "bbtnensure":
                        string a = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "销售方式").ToString();
                        OrderType = a;


                        string b = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "明细ID").ToString();
                        OrderID = b;

                        string c = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "机台").ToString();
                        Machine = c;

                        string d = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "线号").ToString();
                        LineNum = d;

                        string f = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "强度").ToString();
                        Strength = f;

                        string g = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "规格").ToString();
                        Specifications = g;



                        this.DialogResult = DialogResult.OK;
                        break;


                    case "bbtnexit":
                        this.Close();
                        break;

                    default:
                        break;
                    }
                }
            }
            catch (Exception ex)
            {
                ClsMsg.ShowErrMsg(ex.ToString());
            }
        }
Esempio n. 25
0
 private void tvPersonInfo_AfterSelect(object sender, TreeViewEventArgs e)
 {
     try
     {
         if (tvPersonInfo.SelectedNode != null && bgWait.IsBusy == false)
         {
             te_DepCode.Text = (e.Node.Tag as SRDepartment.Department).DepCode;
             bgWait.RunWorkerAsync("LoadPersonData");
         }
     }
     catch (Exception ex)
     {
         ClsMsg.ShowErrMsg(ex.Message);
         Utils.Logger.Error(ex.ToString());
     }
 }
Esempio n. 26
0
        private void barManager_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                switch (e.Item.Name)
                {
                case "bbtniAdd":
                    if (string.IsNullOrEmpty(te_DepCode.Text))
                    {
                        ClsMsg.ShowInfoMsg("请选择相应的部门!");
                    }
                    else
                    {
                        var frm = new frmPersonalInfo(context, te_DepCode.Text);
                        if (frm.ShowDialog() == DialogResult.OK)
                        {
                            bgWait.RunWorkerAsync("LoadPersonData");
                        }
                    }
                    break;

                case "bbtniModify":
                    if (gvPerson.FocusedRowHandle >= 0)
                    {
                        var model = gvPerson.GetRow(gvPerson.FocusedRowHandle) as SRPersonInfo.Person;
                        var fPI   = new frmPersonalInfo(context, model.DepCode, model.PersonCode);
                        if (fPI.ShowDialog() == DialogResult.OK)
                        {
                            bgWait.RunWorkerAsync("LoadPersonData");
                        }
                    }
                    break;

                case "bbtniExit":
                    this.Close();
                    break;

                default:
                    break;
                }
            }
            catch (Exception ex)
            {
                ClsMsg.ShowErrMsg(ex.Message);
                Utils.Logger.Error(ex.ToString());
            }
        }
Esempio n. 27
0
        /// <summary>
        /// 根据RFID卡号获取明细信息,包括残留的排配单号获取上一步数据
        /// </summary>&& CraftsNameTextEdit.Text == "上料"  第一个判断条件因为界面遗留数据简便操作,暂时注释20170109XCQ
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void RFIDCodeTextEdit_EditValueChanged(object sender, EventArgs e)
        {
            //  if (RFIDCodeTextEdit.Text.Length == 10)
            if (RFIDCodeTextEdit.Text.Length == 10)
            {
                if (DeveUseStatusSpinEdit.Text != "正常")
                {
                    ClsMsg.ShowErrMsg("当前鼓号设备状态异常,请先扫描正确的鼓号");

                    return;
                }

                if (NewCraftsName.Text != "上料")
                {
                    ClsMsg.ShowErrMsg("当前鼓号设备工艺状态异常,不处于可上料状态,无法上料,请先扫描正确的鼓号");
                    return;
                }

                string Flag_ID = RFIDCodeTextEdit.Text.Substring(0, 2);
                //   string a=  RFIDCodeTextEdit.EditValue.ToString();
                if (Flag_ID != "ID")
                {
                    if (!BgWait.IsBusy)
                    {
                        BgWait.RunWorkerAsync("SearchRFID");
                    }
                }
            }


            if (RFIDCodeTextEdit.Text.Length == 13)
            {
                string Flag_ID = RFIDCodeTextEdit.Text.Substring(0, 2);

                RFIDCodeTextEdit.EditValue = RFIDCodeTextEdit.Text.Substring(3, 10);

                RFIDCodeTextEdit.Refresh();

                if (Flag_ID == "ID")
                {
                    if (!BgWait.IsBusy)
                    {
                        BgWait.RunWorkerAsync("SearchRFID");
                    }
                }
            }
        }
Esempio n. 28
0
        private void btn_Reset_Click(object sender, EventArgs e)
        {
            try
            {
                Model          = new SRPiPeline.MainPipelineInfo();
                Model.Operator = context.UserName;
                Model.Creator  = context.UserName;
                mainPipelineInfoBindingSource.DataSource = Model;

                ResetRW();
            }
            catch (Exception ex)
            {
                Utils.Logger.Error(ex.ToString());
                ClsMsg.ShowErrMsg(ex.Message);
            }
        }
Esempio n. 29
0
        private void frmDeviceList_Load(object sender, EventArgs e)
        {
            this.AddSysOperLogs(this.Text, OperateStatus.查询);

            this.WindowState = FormWindowState.Maximized;
            try
            {
                var task = Task.Run(() =>
                {
                    InitData();
                });
            }
            catch (Exception ex)
            {
                ClsMsg.ShowErrMsg(ex.Message);
            }
        }
Esempio n. 30
0
 private void gvDetail_CustomRowFilter(object sender, DevExpress.XtraGrid.Views.Base.RowFilterEventArgs e)
 {
     try
     {
         var currModel = lstbodyModel[e.ListSourceRow];
         if (currModel != null && currModel.Editprop.IsNullOrEmpty() == false && currModel.Editprop.Equals("D"))
         {
             e.Visible = false;
         }
         e.Handled = true;
     }
     catch (Exception ex)
     {
         Utils.Logger.Error(ex.ToString());
         ClsMsg.ShowErrMsg(ex.Message);
     }
 }