示例#1
0
 protected override void Saving()
 {
     if (IsAdd)
     {
         var obj = EquipmentInformation.New;
         FrmAddEditBindComboBoxText.BindControlsToObject(obj, tabPage1);
         obj.OptrType = UserStatics.OptrType;
         if (UserStatics.OptrType == "Test")
         {
             obj.Process = "测试";
         }
         obj.Save();
     }
     else
     {
         var obj = EquipmentInformation.FindById(long.Parse(ItemID));
         FrmAddEditBindComboBoxText.BindControlsToObject(obj, tabPage1);
         obj.OptrType = UserStatics.OptrType;
         if (UserStatics.OptrType == "Test")
         {
             obj.Process = "测试";
         }
         obj.Save();
     }
 }
示例#2
0
 protected override void Saving()
 {
     //todo 判断如果用户存在,则不允许保存,提示改名
     //加密密码text
     ctPassword.Text = EncryptDecrypt.MD5(ctPassword.Text);
     if (IsAdd)
     {
         var optr = MainOptr.New;
         FrmAddEditBindComboBoxText.BindControlsToObject(optr, tabPage1);
         optr.Save();
     }
     else
     {
         if (cbSavePassword.Checked)
         {
             var optr = MainOptr.FindById(long.Parse(ItemID));
             FrmAddEditBindComboBoxText.BindControlsToObject(optr, tabPage1);
             optr.Save();
         }
         else
         {
             var optr = MainOptr.FindById(long.Parse(ItemID));
             optr.Name         = ctName.Text;
             optr.Description  = ctDescription.Text;
             optr.MainOptrType = ctMainOptrType.Text;
             optr.Save();
         }
     }
 }
示例#3
0
        protected override void Saving()
        {
            var obj = EquipmentDee.FindById(long.Parse(ItemID));

            FrmAddEditBindComboBoxText.BindControlsToObject(obj, tabPage1);
            obj.Save();
        }
示例#4
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();
            }
        }
示例#5
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();
        }
示例#6
0
        protected override void Saving()
        {
            //将原先的工装,改为报废,并保存时.保存一份旧档.
            //a.窗口打开时,读取工装编号和安装人,放在窗体变量。先保存旧档。
            //b.新建一个新档,初始化后保存
            //不为报废,保存时,保存动作不变
            if (ctTeHandle.Text == "报废")
            {
                var obj = TechnologicalEquipment.FindById(long.Parse(ItemID));
                FrmAddEditBindComboBoxText.BindControlsToObject(obj, tabPage1);
                obj.OptrType     = UserStatics.OptrType;
                obj.TeNo         = OwnTE;
                obj.WhoInstalled = OwnWhoInstalled;
                obj.Save();

                var obj2 = TechnologicalEquipment.New;
                FrmAddEditBindComboBoxText.BindControlsToObject(obj2, tabPage1);
                obj2.OptrType        = UserStatics.OptrType;
                obj2.InstallDate     = DateTime.Now;
                obj2.UninstallDate   = Convert.ToDateTime("1900-01-01 00:00:00");
                obj2.UninstallReason = "";
                obj2.WhoUninstalled  = "";
                obj2.UseCount        = 0;
                obj2.TechnologicalEquipmentStatus = 0;
                obj2.TeHandle = "在用";
                obj2.Save();
            }
            else
            {
                var obj = TechnologicalEquipment.FindById(long.Parse(ItemID));
                FrmAddEditBindComboBoxText.BindControlsToObject(obj, tabPage1);
                obj.OptrType = UserStatics.OptrType;
                obj.Save();
            }
        }
示例#7
0
        protected override void Saving()
        {
            ////如果使用寿命 != 0 并且 工装处理 = 备用,则原始寿命= 原始寿命+使用寿命
            //if (ctUseCount.Value != 0 && (ctTeHandle.Text == "备用" || ctTeHandle.Text == "报废"))
            //{
            //    var obj = TechnologicalEquipment.FindById(long.Parse(ItemID));
            //    FrmAddEditBindComboBoxText.BindControlsToObject(obj, tabPage1);
            //    obj.OptrType = UserStatics.OptrType;
            //    obj.ElderCount = obj.UseCount + obj.ElderCount;
            //    obj.UseCount = 0;
            //    obj.Save();
            //}
            //else
            //{

            //工装状态+1
            ctTechnologicalEquipmentStatus.Value = ctTechnologicalEquipmentStatus.Value + 1;
            ctUseCount.Value = 0;
            //原始寿命必须清零
            ctElderCount.Value = 0;
            var obj = TechnologicalEquipment.FindById(long.Parse(ItemID));

            FrmAddEditBindComboBoxText.BindControlsToObject(obj, tabPage1);
            obj.OptrType = UserStatics.OptrType;
            obj.Save();
            //}
        }
        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();
        }
示例#10
0
 protected override void Saving()
 {
     if (!IsAdd)
     {
         var obj = EquipmentOffline.FindById(long.Parse(ItemID));
         FrmAddEditBindComboBoxText.BindControlsToObject(obj, tabPage1);
         obj.OptrType = UserStatics.OptrType;
         obj.Save();
     }
 }
示例#11
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();
        }
 protected override void Saving()
 {
     if (IsAdd)
     {
         var obj = EquipmentOffline.New;
         FrmAddEditBindComboBoxText.BindControlsToObject(obj, tabPage1);
         obj.OptrType          = UserStatics.OptrType;
         obj.OfflineRepairDate = Convert.ToDateTime("1900-01-01 00:00:01");
         obj.Save();
     }
 }
 protected override void Saving()
 {
     if (!IsAdd)
     {
         var obj = TechnologicalEquipment.FindById(long.Parse(ItemID));
         FrmAddEditBindComboBoxText.BindControlsToObject(obj, tabPage1);
         obj.OptrType = UserStatics.OptrType;
         obj.TeHandle = "在用";
         obj.Save();
     }
 }
 protected override void Saving()
 {
     if (IsAdd)
     {
         var obj = TechnologicalEquipment.New;
         FrmAddEditBindComboBoxText.BindControlsToObject(obj, tabPage1);
         obj.OptrType      = UserStatics.OptrType;
         obj.UninstallDate = Convert.ToDateTime("1900-01-01 00:00:00");
         obj.TeHandle      = "在用";
         obj.Save();
     }
 }
        protected override void Saving()
        {
            var obj = EquipmentVariation.FindById(long.Parse(ItemID));

            FrmAddEditBindComboBoxText.BindControlsToObject(obj, tabPage1);
            TimeSpan ts = ctFinishDate2.Value - (DateTime)obj.FinishDate1;

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

            obj.Status = VariationResult.已完成.ToString();
            obj.Save();
        }
示例#16
0
 protected override void Saving()
 {
     if (IsAdd)
     {
         var obj = EquipmentVariation.New;
         FrmAddEditBindComboBoxText.BindControlsToObject(obj, tabPage1);
         obj.OptrType        = UserStatics.OptrType;
         obj.Status          = VariationResult.已安排.ToString();
         obj.WaitingTakes    = 0;
         obj.VariationTakes1 = 0;
         obj.VariationTakes2 = 0;
         obj.Save();
     }
 }
示例#17
0
 protected override void Saving()
 {
     if (IsAdd)
     {
         var optr = MainDictType.New;
         FrmAddEditBindComboBoxText.BindControlsToObject(optr, tabPage1);
         optr.Save();
     }
     else
     {
         var optr = MainDictType.FindById(long.Parse(ItemID));
         FrmAddEditBindComboBoxText.BindControlsToObject(optr, tabPage1);
         optr.Save();
     }
 }
示例#18
0
        protected override void Saving()
        {
            if (IsAdd)
            {
                var obj = BaseInfoMember.FindById(MemberId);

                var objRecharge = BaseInfoMemberRecharge.New;
                FrmAddEditBindComboBoxText.BindControlsToObject(objRecharge, tabPage1);
                objRecharge.OptrType = UserStatics.OptrType;
                objRecharge.PayType  = "现金";
                objRecharge.Save();

                obj.RemainingSum = ctRemainingSum.Value;
                obj.BaseInfoMemberRecharges.Add(objRecharge);
                obj.Save();
            }
        }
 protected override void Saving()
 {
     if (IsAdd)
     {
         var obj = HrPersonnelFile.New;
         FrmAddEditBindComboBoxText.BindControlsToObject(obj, tabPage1);
         obj.OptrType = UserStatics.OptrType;
         obj.Save();
     }
     else
     {
         var obj = HrPersonnelFile.FindById(long.Parse(ItemID));
         FrmAddEditBindComboBoxText.BindControlsToObject(obj, tabPage1);
         obj.OptrType = UserStatics.OptrType;
         obj.Save();
     }
 }
示例#20
0
 protected override void Saving()
 {
     if (IsAdd)
     {
         var dict = MainDict.New;
         FrmAddEditBindComboBoxText.BindControlsToObject(dict, tabPage1);
         dict.OptrType = UserStatics.OptrType;
         dict.Save();
     }
     else
     {
         var dict = MainDict.FindById(long.Parse(ItemID));
         FrmAddEditBindComboBoxText.BindControlsToObject(dict, tabPage1);
         dict.OptrType = UserStatics.OptrType;
         dict.Save();
     }
 }
示例#21
0
 protected override void Saving()
 {
     if (IsAdd)
     {
         if (MemberId == -1)
         {
             var obj = BaseInfoCard.New;
             FrmAddEditBindComboBoxText.BindControlsToObject(obj, tabPage1);
             obj.OptrType = UserStatics.OptrType;
             obj.Save();
         }
         else
         {
             var member = BaseInfoMember.FindById(MemberId);
             var obj    = BaseInfoCard.New;
             FrmAddEditBindComboBoxText.BindControlsToObject(obj, tabPage1);
             obj.OptrType = UserStatics.OptrType;
             obj.Save();
             member.BaseInfoCards.Add(obj);
             member.Save();
         }
     }
     else
     {
         if (MemberId == -1)
         {
             var obj = BaseInfoCard.FindById(long.Parse(ItemID));
             FrmAddEditBindComboBoxText.BindControlsToObject(obj, tabPage1);
             obj.OptrType = UserStatics.OptrType;
             obj.Save();
         }
         else
         {
             var member = BaseInfoMember.FindById(MemberId);
             var obj    = BaseInfoCard.FindById(long.Parse(ItemID));
             FrmAddEditBindComboBoxText.BindControlsToObject(obj, tabPage1);
             obj.OptrType = UserStatics.OptrType;
             obj.Save();
             member.BaseInfoCards.Add(obj);
             member.Save();
         }
     }
 }
示例#22
0
        protected override void Saving()
        {
            var obj = EquipmentVariation.FindById(long.Parse(ItemID));

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

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

            if (ctResultConfirm.Text == VariationResult.未完成.ToString())
            {
                obj.Status = VariationResult.未完成.ToString();
                obj.Save();
            }
            else
            {
                obj.Status = VariationResult.已完成.ToString();
                obj.Save();
            }
        }
示例#23
0
        protected override void Saving()
        {
            if (IsAdd)
            {
                ctNoticeDate.Value = UserStatics.GetSqlServerDateTime();
                var obj = EquipmentMaintenance.New;
                FrmAddEditBindComboBoxText.BindControlsToObject(obj, tabPage1);
                obj.OptrType        = UserStatics.OptrType;
                obj.Status          = EquipmentResult.已报修.ToString();
                obj.WaitingTakes    = 0;
                obj.RepairingTakes1 = 0;
                obj.RepairingTakes2 = 0;
                obj.IsIsolated      = false;
                if (UserStatics.OptrType == "Test")
                {
                    obj.Process = "测试";
                }

                obj.Save();
            }
        }