Exemple #1
0
        public JISEditForm()
        {
            InitializeComponent();
            this.requireValueExceptions.Add(Model.PCExportReportANSI.PRO_ExportReportId, new AA(Properties.Resources.NumsIsNotNull, this.TxtOrderId));
            this.requireValueExceptions.Add(Model.PCExportReportANSI.PRO_ProductId, new AA(Properties.Resources.Noproduct, this.TxtProduct));
            this.requireValueExceptions.Add(Model.PCExportReportANSI.PRO_InvoiceCusXOId, new AA("客戶訂單編號不能為空", this.TxtCustomersId));
            this.requireValueExceptions.Add(Model.PCExportReportANSI.PRO_CustomerId, new AA("客戶不能為空", this.NccCustomer));
            this.requireValueExceptions.Add(Model.PCExportReportANSI.PRO_Amount, new AA("訂單數量不能為空", this.SpinOrderAmount));
            this.requireValueExceptions.Add(Model.PCExportReportANSI.PRO_AmountTest, new AA("測試數量不能為空", this.SpinTestAmount));
            this.requireValueExceptions.Add(Model.PCExportReportANSI.PRO_EmployeeId, new AA(Properties.Resources.EmployeeNotNull, this.NccTestPerson));
            this.requireValueExceptions.Add(Model.PCExportReportANSI.PRO_ReportDate, new AA(Properties.Resources.DateNotNull, this.DateReportDate));

            //this.invalidValueExceptions.Add(Model.PCExportReportANSI.PRO_AmountTest + "_ForInvoiceXoQuantity", new AA("測試數量未達標:測試數量≈訂單數量/500(不齊不足1)", this.SpinTestAmount));
            //this.invalidValueExceptions.Add(Model.PCExportReportANSI.PRO_AmountTest + "_ForDetailsCount", new AA("測試數量未達標:測試數量詳細測試數量總和", this.SpinTestAmount));

            this.NccCustomer.Choose              = new Settings.BasicData.Customs.ChooseCustoms();
            this.NccTestPerson.Choose            = new Settings.BasicData.Employees.ChooseEmployee();
            this.NccTestPerson2.Choose           = new Settings.BasicData.Employees.ChooseEmployee();
            this.NccTestPerson3.Choose           = new Settings.BasicData.Employees.ChooseEmployee();
            this.NccTestPerson4.Choose           = new Settings.BasicData.Employees.ChooseEmployee();
            this.newChooseContorlAuditEmp.Choose = new Settings.BasicData.Employees.ChooseEmployee();
            this.bindingSourceUnit.DataSource    = (new BL.ProductUnitManager()).Select();;
            this.action = "view";

            var jiShuBiaoZhun = new BL.SettingManager().SelectByName("JISJiShuBiaoZhun");

            jiShuBiaoZhun = jiShuBiaoZhun.OrderByDescending(j => j.IdNO).ToList();
            foreach (var item in jiShuBiaoZhun)
            {
                comboBoxEdit1.Properties.Items.Add(item.SettingCurrentValue);
            }
            comboBoxEdit1.SelectedIndex = 0;
        }
Exemple #2
0
        protected override void AddNew()
        {
            this._PCExportReportANSI = new Book.Model.PCExportReportANSI();
            this._PCExportReportANSI.ExportReportId = this._PCExportReportANSIManager.GetId();
            this._PCExportReportANSI.ReportDate     = DateTime.Now.Date;
            this._PCExportReportANSI.ExpType        = "CSA";

            this._PCExportReportANSI.Employee   = BL.V.ActiveOperator.Employee;
            this._PCExportReportANSI.EmployeeId = BL.V.ActiveOperator.EmployeeId;
            var jiShuBiaoZhun = new BL.SettingManager().SelectByName("CSAJiShuBiaoZhun").FirstOrDefault();

            this._PCExportReportANSI.CSAJiShuBiaoZhun = jiShuBiaoZhun == null ? "CSA Z94.3-2015" : jiShuBiaoZhun.SettingCurrentValue;

            //为了打印固定格式
            this._PCExportReportANSI.ShouCeShu1 = 2;
            this._PCExportReportANSI.ShouCeShu2 = 2;
            this._PCExportReportANSI.ShouCeShu3 = 2;
            this._PCExportReportANSI.ShouCeShu4 = 2;
            this._PCExportReportANSI.ShouCeShu5 = 1;
            this._PCExportReportANSI.ShouCeShu6 = 2;

            this._PCExportReportANSI.PanDing0 = 2;
            this._PCExportReportANSI.PanDing1 = 2;
            this._PCExportReportANSI.PanDing2 = 2;
            this._PCExportReportANSI.PanDing3 = 2;
            this._PCExportReportANSI.PanDing4 = 1;
            this._PCExportReportANSI.PanDing5 = 2;
        }
Exemple #3
0
        public EditFormStayWire()
        {
            InitializeComponent();

            this.invalidValueExceptions.Add(Model.PCEarplugsStayWireCheck.PRO_PCEarplugsStayWireCheckDate, new AA("日期不能爲空", this.date_Check));

            this.ncc_Employee.Choose = new Settings.BasicData.Employees.ChooseEmployee();
            this.action = "view";

            #region LookUpEdit
            DataTable dt = new DataTable();
            dt.Columns.Add("id", typeof(string));
            //dt.Columns.Add("name", typeof(string));
            DataRow dr;
            dr = dt.NewRow();
            //dr[0] = "";
            dr[0] = " ";
            dt.Rows.Add(dr);
            dr = dt.NewRow();
            //dr[0] = "0";
            dr[0] = "√";
            dt.Rows.Add(dr);
            dr = dt.NewRow();
            //dr[0] = "1";
            dr[0] = "×";
            dt.Rows.Add(dr);
            dr = dt.NewRow();
            //dr[0] = "2";
            dr[0] = "△";
            dt.Rows.Add(dr);

            for (int i = 0; i < this.gridView1.Columns.Count; i++)
            {
                if (this.gridView1.Columns[i].Name == "gridColumn4" || this.gridView1.Columns[i].Name == "gridColumn5" || this.gridView1.Columns[i].Name == "colParameter")
                {
                    ((DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit) this.gridView1.Columns[i].ColumnEdit).DataSource = dt;
                    ((DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit) this.gridView1.Columns[i].ColumnEdit).Columns.Clear();
                    ((DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit) this.gridView1.Columns[i].ColumnEdit).NullText = "";
                    ((DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit) this.gridView1.Columns[i].ColumnEdit).Columns.AddRange(new DevExpress.XtraEditors.Controls.LookUpColumnInfo[] {
                        new DevExpress.XtraEditors.Controls.LookUpColumnInfo("id", 25, "标识"),
                    });
                    ((DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit) this.gridView1.Columns[i].ColumnEdit).DisplayMember = "id";
                    ((DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit) this.gridView1.Columns[i].ColumnEdit).ValueMember   = "id";
                }
            }
            #endregion

            this.bindingSourceProduct.DataSource = this._pCEarplugsStayWireCheckManager.Query("select ProductId,Id,ProductName from Product", 30, "Product").Tables[0];

            var testCondition = new BL.SettingManager().SelectByName("EarplugsStayWire");
            if (testCondition != null && testCondition.Count > 0)
            {
                foreach (var item in testCondition)
                {
                    this.cob_TestCondition.Properties.Items.Add(item.SettingCurrentValue);
                }
            }
        }
Exemple #4
0
        private void simpleButtonAddFP_Click(object sender, EventArgs e)
        {
            AddFP f = new AddFP();

            f.ShowDialog();
            this.comboBoxEditFP.Properties.Items.Clear();
            IList <Model.Setting> list = new BL.SettingManager().SelectTagOrderDefault("FP");

            foreach (var item in list)
            {
                this.comboBoxEditFP.Properties.Items.Add(item.SettingCurrentValue);
            }
        }
Exemple #5
0
        private void EditForm_Load(object sender, EventArgs e)
        {
            IList <Model.CompanyLevel> levelList = this.companyLevelManager.Select();

            foreach (Model.CompanyLevel level in levelList)
            {
                this.comboBoxEditCompanyLevel.Properties.Items.Add(level.CompanyLevelId + @"-" + level.CompanyLevelName);
            }
            this.bindingSourceCustom.DataSource = customerManager.Select();

            IList <Model.Setting> list = new BL.SettingManager().SelectTagOrderDefault("FP");

            foreach (var item in list)
            {
                this.comboBoxEditFP.Properties.Items.Add(item.SettingCurrentValue);
            }
        }
Exemple #6
0
        public ANSI2015()
        {
            InitializeComponent();
            this.requireValueExceptions.Add(Model.PCExportReportANSI.PRO_ExportReportId, new AA(Properties.Resources.NumsIsNotNull, this.TxtOrderId));
            this.requireValueExceptions.Add(Model.PCExportReportANSI.PRO_ProductId, new AA(Properties.Resources.Noproduct, this.TxtProduct));
            this.requireValueExceptions.Add(Model.PCExportReportANSI.PRO_InvoiceCusXOId, new AA("客戶訂單編號不能為空", this.TxtCustomersId));
            this.requireValueExceptions.Add(Model.PCExportReportANSI.PRO_CustomerId, new AA("客戶不能為空", this.NccCustomer));
            this.requireValueExceptions.Add(Model.PCExportReportANSI.PRO_Amount, new AA("訂單數量不能為空", this.SpinOrderAmount));
            this.requireValueExceptions.Add(Model.PCExportReportANSI.PRO_AmountTest, new AA("測試數量不能為空", this.SpinTestAmount));
            this.requireValueExceptions.Add(Model.PCExportReportANSI.PRO_EmployeeId, new AA(Properties.Resources.EmployeeNotNull, this.NccTestPerson));
            this.requireValueExceptions.Add(Model.PCExportReportANSI.PRO_ReportDate, new AA(Properties.Resources.DateNotNull, this.DateReportDate));


            this.NccCustomer.Choose              = new Settings.BasicData.Customs.ChooseCustoms();
            this.NccTestPerson.Choose            = new Settings.BasicData.Employees.ChooseEmployee();
            this.NccTestPerson2.Choose           = new Settings.BasicData.Employees.ChooseEmployee();
            this.NccTestPerson3.Choose           = new Settings.BasicData.Employees.ChooseEmployee();
            this.NccTestPerson4.Choose           = new Settings.BasicData.Employees.ChooseEmployee();
            this.newChooseContorlAuditEmp.Choose = new Settings.BasicData.Employees.ChooseEmployee();
            this.bindingSourceUnit.DataSource    = UnitList = (new BL.ProductUnitManager()).Select();
            this.action = "view";

            var jiShuBiaoZhun = new BL.SettingManager().SelectByName("ANSI2015JiShuBiaoZhun");

            foreach (var item in jiShuBiaoZhun)
            {
                comboBoxEdit1.Properties.Items.Add(item.SettingCurrentValue);
            }
            comboBoxEdit1.SelectedIndex = 0;

            var signature = new BL.SettingManager().SelectByName("ALANSignature");

            foreach (var item in jiShuBiaoZhun)
            {
                cob_Singnature.Properties.Items.Add(item.SettingCurrentValue);
            }
            cob_Singnature.SelectedIndex = 0;
        }