Example #1
0
        protected override void Saving()
        {
            var obj = EquipmentMaintenance.FindById(long.Parse(ItemID));

            FrmAddEditBindComboBoxText.BindControlsToObject(obj, tabPage1);
            TimeSpan ts = ctRestoreDate2.Value - (DateTime)(obj.RestoreDate1);

            obj.RepairingTakes2 = Math.Ceiling(ts.TotalMinutes);

            if (ctResultConfirm.Text == "未修复")
            {
                obj.Status = EquipmentResult.未修复.ToString();
                obj.Save();
                MessageBox.Show("设备维修未修复!");
            }
            else if (ctProductHandle.Text == "前批隔离/本批复测")
            {
                obj.Status = EquipmentResult.产品处理.ToString();
                obj.Save();
            }
            else if (cbRemainingProblem.Checked && ctRemainingProblem.Text != "")
            {
                //todo: 查询"修复完成"时,需要统计同时查询遗留问题
                obj.Status = EquipmentResult.遗留问题.ToString();
                obj.Save();
            }
            else
            {
                obj.Status = EquipmentResult.已修复.ToString();
                obj.Save();
            }
        }
Example #2
0
        protected override void Saving()
        {
            //设置flag,当取不到修复时间时,保存时继续确保修复时间为空
            int flag1 = 1, flag2 = 1;
            var obj = EquipmentMaintenance.FindById(long.Parse(ItemID));

            if (obj.RestoreDate1 == null)
            {
                flag1 = 0;
            }
            if (obj.RestoreDate2 == null)
            {
                flag2 = 0;
            }
            FrmAddEditBindComboBoxText.BindControlsToObject(obj, tabPage1);
            if (flag1 == 0)
            {
                obj.RestoreDate1 = null;
            }
            if (flag2 == 0)
            {
                obj.RestoreDate2 = null;
            }
            obj.Save();
        }
Example #3
0
        protected override void Loading()
        {
            if (UserStatics.OptrType == "Test")
            {
                ctIsIsolated.Checked = false;
                ctIsIsolated.Enabled = false;

                ctRetestEquipment.DataSource    = BllEquipmentProductHandle.GetEquipmentNo(UserStatics.OptrType);
                ctRetestEquipment.DisplayMember = "EquipmentNo";
            }
            else
            {
                ctRetestEquipment.Enabled = false;
            }

            ctProductHandledConfirm.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "处理确认");
            ctProductHandledConfirm.DisplayMember = "Name";

            ctWhoHandled.DataSource    = BllEquipmentProductHandle.GetWhoHandledByWorkShop(UserStatics.OptrType, UserStatics.WorkShop);
            ctWhoHandled.DisplayMember = "Name";

            var obj = EquipmentMaintenance.FindById(long.Parse(ItemID));

            FrmAddEditBindComboBoxText.BindObjectToControls(obj, tabPage1);
            ctHandleDate.Value = UserStatics.GetSqlServerDateTime();
        }
Example #4
0
        protected override void Loading()
        {
            ctAccepter2.DataSource    = BllEquipmentRepairSecond.GetWhoRepairByWorkShop(UserStatics.OptrType, UserStatics.WorkShop);
            ctAccepter2.DisplayMember = "Name";

            ctAssist2.DataSource    = BllEquipmentRepairSecond.GetWhoRepairByWorkShop(UserStatics.OptrType, UserStatics.WorkShop);
            ctAssist2.DisplayMember = "Name";

            ctResultConfirm.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "效果确认");
            ctResultConfirm.DisplayMember = "Name";

            ctFailureType.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "故障分类");
            ctFailureType.DisplayMember = "Name";

            ctProductHandle.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "产品处理");
            ctProductHandle.DisplayMember = "Name";

            ctMonitor2.DataSource    = BllEquipmentRepairSecond.GetRepairMonitorByWorkShop(UserStatics.OptrType, UserStatics.WorkShop);
            ctMonitor2.DisplayMember = "Name";

            ctRestoreDate2.Value = UserStatics.GetSqlServerDateTime();
            var obj = EquipmentMaintenance.FindById(long.Parse(ItemID));

            FrmAddEditBindComboBoxText.BindObjectToControls(obj, tabPage1);
        }
        protected override void Saving()
        {
            var obj = EquipmentMaintenance.FindById(long.Parse(ItemID));

            FrmAddEditBindComboBoxText.BindControlsToObject(obj, tabPage1);
            TimeSpan ts = ctRestoreDate1.Value - ctAcceptDate.Value;

            obj.RepairingTakes1 = Math.Ceiling(ts.TotalMinutes);

            if (ctProductHandle.Text == "前批隔离/本批复测")
            {
                obj.Status = EquipmentResult.产品处理.ToString();
                obj.Save();
            }
            else if (ctResultConfirm.Text == EquipmentResult.未修复.ToString())
            {
                obj.Status = EquipmentResult.未修复.ToString();
                obj.Save();
            }
            else if (cbRemainingProblem.Checked && ctRemainingProblem.Text != "")
            {
                obj.Status = EquipmentResult.遗留问题.ToString();
                obj.Save();
            }
            else
            {
                obj.Status = EquipmentResult.已修复.ToString();
                obj.Save();
            }
        }
        protected override void Saving()
        {
            var obj = EquipmentMaintenance.FindById(long.Parse(ItemID));

            FrmAddEditBindComboBoxText.BindControlsToObject(obj, tabPage1);
            obj.Status = EquipmentResult.遗留问题修复.ToString();
            obj.Save();
        }
Example #7
0
        protected override void Loading()
        {
            ctAcceptDate.Value = UserStatics.GetSqlServerDateTime();
            var obj = EquipmentMaintenance.FindById(long.Parse(ItemID));

            FrmAddEditBindComboBoxText.BindObjectToControls(obj, tabPage1);

            ctAccepter1.DataSource    = BllEquipmentAccept.GetWhoRepairByWorkShop(UserStatics.OptrType, UserStatics.WorkShop);
            ctAccepter1.DisplayMember = "Name";
        }
Example #8
0
        protected override void Saving()
        {
            var obj = EquipmentMaintenance.FindById(long.Parse(ItemID));

            FrmAddEditBindComboBoxText.BindControlsToObject(obj, tabPage1);
            TimeSpan ts = ctAcceptDate.Value - ctNoticeDate.Value;

            obj.WaitingTakes = Math.Ceiling(ts.TotalMinutes);
            obj.Status       = EquipmentResult.已接单.ToString();
            obj.Save();
        }
        public static DataTable GetTable(string optrType)
        {
            var dt = EquipmentMaintenance.Find(CK.K["OptrType"] == optrType && CK.K["Status"] == EquipmentResult.未修复.ToString()).ToDataTable();

            dt.Columns[1].ColumnName  = "机台号";
            dt.Columns[2].ColumnName  = "工序";
            dt.Columns[3].ColumnName  = "测试系统";
            dt.Columns[4].ColumnName  = "模具号";
            dt.Columns[5].ColumnName  = "测试仪";
            dt.Columns[6].ColumnName  = "品种";
            dt.Columns[7].ColumnName  = "批号";
            dt.Columns[8].ColumnName  = "报修人";
            dt.Columns[9].ColumnName  = "报修日期";
            dt.Columns[10].ColumnName = "管理分类";
            dt.Columns[11].ColumnName = "故障现象";
            dt.Columns[12].ColumnName = "接单日期";
            dt.Columns[13].ColumnName = "接单人";
            dt.Columns[14].ColumnName = "故障确认";
            dt.Columns[15].ColumnName = "原因分析";
            dt.Columns[16].ColumnName = "维修内容";
            dt.Columns[17].ColumnName = "效果确认";
            dt.Columns[18].ColumnName = "故障分类";
            dt.Columns[19].ColumnName = "产品处理";
            dt.Columns[20].ColumnName = "修复日期1";
            dt.Columns[21].ColumnName = "协助人员1";
            dt.Columns[22].ColumnName = "当班班长1";
            dt.Columns[23].ColumnName = "更换备件1";
            dt.Columns[24].ColumnName = "遗留问题";
            dt.Columns[25].ColumnName = "备注";
            dt.Columns[26].ColumnName = "修复者2";
            dt.Columns[27].ColumnName = "协助人员2";
            dt.Columns[28].ColumnName = "当班班长2";
            dt.Columns[29].ColumnName = "更换备件2";
            dt.Columns[30].ColumnName = "修复日期2";
            dt.Columns[31].ColumnName = "处理确认";
            dt.Columns[32].ColumnName = "复测机台";
            dt.Columns[33].ColumnName = "处理者";
            dt.Columns[34].ColumnName = "处理日期1";
            dt.Columns[35].ColumnName = "已隔离";
            dt.Columns[36].ColumnName = "问题处理";
            dt.Columns[37].ColumnName = "处理日期2";
            dt.Columns[39].ColumnName = "流程状态";

            return(dt);
        }
Example #10
0
        protected override void Loading()
        {
            var obj = EquipmentMaintenance.FindById(long.Parse(ItemID));

            FrmAddEditBindComboBoxText.BindObjectToControls(obj, tabPage1);
        }
 public static long GetCount(string optrType)
 {
     return(EquipmentMaintenance.GetCount(CK.K["OptrType"] == optrType && CK.K["Status"] == EquipmentResult.未修复.ToString()));
 }