Пример #1
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();
        }
Пример #2
0
        private void InitialPos()
        {
            dgvSelectItem.DataSource = null;

            bsPosDetail.DataSource  = null;
            dgvPosDetail.DataSource = null;

            //1.取出最新的流水号,新增并保存一张未结算pos单
            SupplyChainPos fscp = SupplyChainPos.New;

            fscp.SerialNumber = BllSupplyChainPos.GetPosSN();
            //fscp.SerialNumber = "00000000000";
            fscp.PosDateTime          = DateTime.Now;
            fscp.Cashier              = UserStatics.ChineseName;
            fscp.Quantity             = 0;
            fscp.PaidQuantity         = 0;
            fscp.UnPaidQuantity       = 0;
            fscp.GiftQuantity         = 0;
            fscp.PosAmount            = 0;
            fscp.UnPayAmount          = 0;
            fscp.PayInAmount          = 0;
            fscp.PayByStoredValueCard = 0;
            fscp.PayByCash            = 0;
            fscp.PayByCoupons         = 0;
            fscp.PayByBank            = 0;
            fscp.PosProfit            = 0;
            fscp.IsAllPaid            = false;
            fscp.IsHolded             = false;
            fscp.Save();
            PosId = fscp.Id;

            FrmAddEditBindComboBoxText.BindObjectToControls(fscp, panelTop);
            FrmAddEditBindComboBoxText.BindObjectToControls(fscp, panelBottom);
        }
Пример #3
0
        protected override void Loading()
        {
            if (UserStatics.OptrType == "Test")
            {
                ctProcess.Enabled = false;
                label14.Text      = "复测产量";
            }

            ctProcess.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "工序");
            ctProcess.DisplayMember = "Name";

            ctGrouping.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "班组");
            ctGrouping.DisplayMember = "Name";

            ctRepairMonitor.DataSource    = BllEquipmentDee.GetRepairMonitorByWorkShop(UserStatics.OptrType, UserStatics.WorkShop);
            ctRepairMonitor.DisplayMember = "Name";

            ctGroupMonitor.DataSource    = BllEquipmentDee.GetGroupMonitorByWorkShop(UserStatics.OptrType, UserStatics.WorkShop);
            ctGroupMonitor.DisplayMember = "Name";

            ctOperator.DataSource    = BllEquipmentDee.GetOperatorByWorkShop(UserStatics.OptrType, UserStatics.WorkShop);
            ctOperator.DisplayMember = "Name";

            if (!IsAdd)
            {
                var obj = EquipmentDee.FindById(long.Parse(ItemID));
                FrmAddEditBindComboBoxText.BindObjectToControls(obj, tabPage1);
            }
        }
Пример #4
0
        protected override void Loading()
        {
            if (UserStatics.OptrType == "Test")
            {
                ctModeNo.Enabled      = false;
                ctProductType.Enabled = false;
            }

            ctProductType.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "适应产品");
            ctProductType.DisplayMember = "Name";

            ctWhoUninstalled.DataSource    = BllTechnologicalEquipment.GetWhoRepairByWorkShop(UserStatics.OptrType, UserStatics.WorkShop);
            ctWhoUninstalled.DisplayMember = "Name";

            ctTeHandle.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "工装处理");
            ctTeHandle.DisplayMember = "Name";

            ctSupplier.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "供应商");
            ctSupplier.DisplayMember = "Name";

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

            FrmAddEditBindComboBoxText.BindObjectToControls(obj, tabPage1);

            ctUninstallDate.Value = UserStatics.GetSqlServerDateTime();
            OwnTE           = ctTeNo.Text;
            OwnWhoInstalled = ctWhoInstalled.Text;
        }
Пример #5
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);
        }
Пример #6
0
        private void tbSelectItem_KeyDown(object sender, KeyEventArgs e)
        {
            //选好单品,并且回车
            if (e.KeyCode == Keys.Enter && tbSelectItem.Text != "")
            {
                SupplyChainPos       scp  = SupplyChainPos.FindById(PosId);
                SupplyChainPosDetail scpd = SupplyChainPosDetail.New;
                BaseInfoMaterial     bim  = BaseInfoMaterial.FindById(MaterialId);
                scpd.IsPaid           = false;
                scpd.MaterialId       = bim.Id;
                scpd.MaterialName     = bim.Name;
                scpd.MaterialCategory = bim.Category;
                scpd.UnitName         = bim.SaleUnitName;
                if (scp.MemberId != 0)
                {
                    scpd.UnitPrice = bim.MemberPrice;
                }
                else
                {
                    scpd.UnitPrice = bim.RetailPrice;
                }
                scpd.Quantity      = 1;
                scpd.Discount      = 0;
                scpd.Amount        = scpd.UnitPrice * scpd.Quantity;
                scpd.IsReturns     = false;
                scpd.IsGift        = false;
                scpd.OrderDateTime = DateTime.Now;
                scpd.Save();
                scp.SupplyChainPosDetails.Add(scpd);
                scp.Quantity       += 1;
                scp.UnPaidQuantity += 1;
                scp.UnPayAmount    += scpd.Amount;
                scp.PosAmount      += scpd.Amount;
                scp.Cashier         = UserStatics.ChineseName;
                scp.Save();
                bim.ConvQuantity -= 1;
                bim.InvQuantity   = bim.ConvQuantity / bim.UnitConvValue;
                bim.Save();

                FrmAddEditBindComboBoxText.BindObjectToControls(scp, panelBottom);

                TableForPosDetail = BllSupplyChainPos.GetPosDetail(PosId);
                ReloadDgvPosDetail();
                foreach (DataGridViewRow row in dgvPosDetail.Rows)
                {
                    row.Selected = true;
                }
                tbSelectItem.Text = "";
                ctUnderPay.Text   = scp.UnPayAmount.ToString();
            }
            if (e.KeyCode == Keys.Down)
            {
                bsSelectItem.MoveNext();
            }
            if (e.KeyCode == Keys.Up)
            {
                bsSelectItem.MovePrevious();
            }
        }
Пример #7
0
        protected override void Loading()
        {
            var obj = TechnologicalEquipment.FindById(long.Parse(ItemID));

            FrmAddEditBindComboBoxText.BindObjectToControls(obj, tabPage1);
            ctUseCount.Value      = BllTechnologicalEquipment.GetUseAmount(long.Parse(ItemID));
            ctUninstallDate.Value = UserStatics.GetSqlServerDateTime();
        }
Пример #8
0
 protected override void Loading()
 {
     if (!IsAdd)
     {
         var obj = BaseInfoVendor.FindById(long.Parse(ItemID));
         FrmAddEditBindComboBoxText.BindObjectToControls(obj, tabPage1);
     }
 }
Пример #9
0
 protected override void Loading()
 {
     if (!IsAdd)
     {
         var dict = MainDict.FindById(long.Parse(ItemID));
         FrmAddEditBindComboBoxText.BindObjectToControls(dict, tabPage1);
     }
 }
Пример #10
0
        protected override void Loading()
        {
            var obj = BaseInfoMember.FindById(MemberId);

            FrmAddEditBindComboBoxText.BindObjectToControls(obj, tabPage1);
            ctRechargeDate.Value = DateTime.Now;
            remainingSum         = ctRemainingSum.Value;
        }
Пример #11
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";
        }
Пример #12
0
 protected override void Loading()
 {
     if (!IsAdd)
     {
         var obj = BaseInfoStaff.FindById(long.Parse(ItemID));
         FrmAddEditBindComboBoxText.BindObjectToControls(obj, tabPage1);
     }
     else
     {
         ctDateOfEmployment.Value = DateTime.Now.Date;
     }
 }
        protected override void Loading()
        {
            ctAccepter2.DataSource    = BllEquipmentVariationHandle2.GetWhoRepairByWorkShop(UserStatics.OptrType, UserStatics.WorkShop);
            ctAccepter2.DisplayMember = "Name";

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

            ctFinishDate2.Value = DateTime.Now;
            var obj = EquipmentVariation.FindById(long.Parse(ItemID));

            FrmAddEditBindComboBoxText.BindObjectToControls(obj, tabPage1);
        }
Пример #14
0
        private void RaiseSearchWindow()
        {
            FrmEquipmentInformation fei = new FrmEquipmentInformation();;

            fei.IsSelect = true;
            fei.ShowDialog();
            //返回的SelectedValue,取出SelectedValue的EquipmentInformation
            EquipmentInformation ei = EquipmentInformation.FindById(fei.SelectedValue);

            //绑定各个控件
            FrmAddEditBindComboBoxText.BindObjectToControls(ei, tabPage1);
            fei.Dispose();
        }
Пример #15
0
        protected override void Loading()
        {
            if (!IsAdd)
            {
                var optr = MainDictType.FindById(long.Parse(ItemID));
                FrmAddEditBindComboBoxText.BindObjectToControls(optr, tabPage1);
            }

            if (UserStatics.OptrType != "All")
            {
                ctOptrType.Text = UserStatics.OptrType;
            }
        }
Пример #16
0
        private void ctEquipmentNo_Click(object sender, EventArgs e)
        {
            FrmEquipmentInformation fei = new FrmEquipmentInformation();;

            fei.IsSelect = true;
            fei.ShowDialog();
            //返回的SelectedValue,取出SelectedValue的EquipmentInformation
            EquipmentInformation ei = EquipmentInformation.FindById(fei.SelectedValue);

            //绑定各个控件
            FrmAddEditBindComboBoxText.BindObjectToControls(ei, tabPage1);
            fei.Dispose();
        }
Пример #17
0
 protected override void Loading()
 {
     if (!IsAdd)
     {
         var obj = BaseInfoMember.FindById(long.Parse(ItemID));
         FrmAddEditBindComboBoxText.BindObjectToControls(obj, tabPage1);
     }
     else
     {
         ctDiscountRate.Value = 100;
         ctJoinedDate.Value   = DateTime.Now.Date;
     }
 }
Пример #18
0
        protected override void Loading()
        {
            if (UserStatics.OptrType != "Package")
            {
                ctModeNo.Enabled = false;
            }

            if (UserStatics.OptrType == "Package" || UserStatics.OptrType == "Assembly")
            {
                ctTestStation.Enabled  = false;
                ctChannelCount.Enabled = false;
            }

            if (UserStatics.OptrType == "Test")
            {
                ctProcess.Enabled = false;
            }

            ctEquipmentType.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "设备分类");
            ctEquipmentType.DisplayMember = "Name";

            ctProductAdaptation.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "适应产品");
            ctProductAdaptation.DisplayMember = "Name";

            ctCondition.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "使用状态");
            ctCondition.DisplayMember = "Name";

            ctManagementGroup.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "管理分组");
            ctManagementGroup.DisplayMember = "Name";

            ctProcess.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "工序");
            ctProcess.DisplayMember = "Name";

            ctDeviceClass.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "设备分级");
            ctDeviceClass.DisplayMember = "Name";

            ctStatisticalClass.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "统计分类");
            ctStatisticalClass.DisplayMember = "Name";

            ctManufacturer.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "制造厂家");
            ctManufacturer.DisplayMember = "Name";

            if (!IsAdd)
            {
                var obj = EquipmentInformation.FindById(long.Parse(ItemID));
                FrmAddEditBindComboBoxText.BindObjectToControls(obj, tabPage1);
            }
        }
Пример #19
0
        protected override void Loading()
        {
            if (!IsAdd)
            {
                ctOfflineResultConfirm.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "离线效果确认");
                ctOfflineResultConfirm.DisplayMember = "Name";

                ctOfflineWhoRepaired.DataSource    = BllEquipmentOffline.GetWhoNotice(UserStatics.OptrType);
                ctOfflineWhoRepaired.DisplayMember = "Name";

                var obj = EquipmentOffline.FindById(long.Parse(ItemID));
                FrmAddEditBindComboBoxText.BindObjectToControls(obj, tabPage1);

                ctOfflineRepairDate.Value = UserStatics.GetSqlServerDateTime();
            }
        }
Пример #20
0
 protected override void Loading()
 {
     if (!IsAdd)
     {
         var obj = BaseInfoCard.FindById(long.Parse(ItemID));
         FrmAddEditBindComboBoxText.BindObjectToControls(obj, tabPage1);
         if (obj.BaseInfoMember != null)
         {
             ctMemberCardNumber.Text = obj.BaseInfoMember.CardNumber;
         }
     }
     else
     {
         ctCountLeft.Value  = 10;
         ctJoinedDate.Value = DateTime.Now;
     }
 }
Пример #21
0
        protected override void Loading()
        {
            if (IsAdd)
            {
                cbSavePassword.Visible = false;
            }
            else
            {
                var optr = MainOptr.FindById(long.Parse(ItemID));
                FrmAddEditBindComboBoxText.BindObjectToControls(optr, tabPage1);
            }

            if (UserStatics.OptrType != "All")
            {
                ctMainOptrType.Text = UserStatics.OptrType;
            }
        }
        protected override void Loading()
        {
            toolStripStatusLabel1.Text = toolStripStatusLabel1.Text + ",按F7选机台。";
            if (UserStatics.OptrType == "Test")
            {
                ctCurrentProduct.Enabled = false;
                ctProcess.Enabled        = false;
                label14.Text             = "复测产量";
            }
            else
            {
                ctProcess.Enabled = false;
            }

            ctProductAdaptation.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "适应产品");
            ctProductAdaptation.DisplayMember = "Name";

            ctProcess.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "工序");
            ctProcess.DisplayMember = "Name";

            ctGrouping.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "班组");
            ctGrouping.DisplayMember = "Name";

            ctRepairMonitor.DataSource    = BllEquipmentDee.GetRepairMonitorByWorkShop(UserStatics.OptrType, UserStatics.WorkShop);
            ctRepairMonitor.DisplayMember = "Name";

            ctGroupMonitor.DataSource    = BllEquipmentDee.GetGroupMonitorByWorkShop(UserStatics.OptrType, UserStatics.WorkShop);
            ctGroupMonitor.DisplayMember = "Name";

            ctOperator.DataSource    = BllEquipmentDee.GetOperatorByWorkShop(UserStatics.OptrType, UserStatics.WorkShop);
            ctOperator.DisplayMember = "Name";



            if (!IsAdd)
            {
                var obj = EquipmentDee.FindById(long.Parse(ItemID));
                FrmAddEditBindComboBoxText.BindObjectToControls(obj, tabPage1);
            }
            else
            {
                ctDeeDate.Value = DateTime.Now.AddDays(-1);
            }
        }
Пример #23
0
        protected override void Loading()
        {
            ctSex.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "性别");
            ctSex.DisplayMember = "Name";

            ctMarries.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "婚姻状况");
            ctMarries.DisplayMember = "Name";

            ctPoliticalBackground.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "政治面貌");
            ctPoliticalBackground.DisplayMember = "Name";

            ctWorkShop.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "车间");
            ctWorkShop.DisplayMember = "Name";

            ctProcess.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "工序");
            ctProcess.DisplayMember = "Name";

            ctPosition.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "职务");
            ctPosition.DisplayMember = "Name";

            ctProfessionalTitle.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "职称");
            ctProfessionalTitle.DisplayMember = "Name";

            ctWageGrade.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "工资级别");
            ctWageGrade.DisplayMember = "Name";

            ctHighestEducation.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "学历");
            ctHighestEducation.DisplayMember = "Name";

            ctStatus.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "在职状态");
            ctStatus.DisplayMember = "Name";

            if (!IsAdd)
            {
                var obj = HrPersonnelFile.FindById(long.Parse(ItemID));
                FrmAddEditBindComboBoxText.BindObjectToControls(obj, tabPage1);
            }
            else
            {
                ctBirthday.Value     = DateTime.Now.Date;
                ctDateEmployed.Value = DateTime.Now.Date;
            }
        }
Пример #24
0
        private void RaiseMemberSearchWindow()
        {
            FrmBaseInfoMember fim = new FrmBaseInfoMember();;

            fim.IsSelect = true;
            fim.Text     = "请选择会员";
            fim.ShowDialog();
            MemberId = fim.SelectedValue;
            //返回的SelectedValue,取出SelectedValue的EquipmentInformation
            if (MemberId != 0)
            {
                BaseInfoMember bim = BaseInfoMember.FindById(MemberId);
                //绑定各个控件
                FrmAddEditBindComboBoxText.BindObjectToControls(bim, panelTop);
                if (bim.RemainingSum > 0)
                {
                    ctRemainingSum.Text    = bim.RemainingSum.ToString();
                    lbRemainingSum.Visible = true;
                    ctRemainingSum.Visible = true;
                }
            }

            fim.Dispose();
        }
Пример #25
0
        protected override void Loading()
        {
            var obj = EquipmentMaintenance.FindById(long.Parse(ItemID));

            FrmAddEditBindComboBoxText.BindObjectToControls(obj, tabPage1);
        }