Example #1
0
        public EditForm()
        {
            InitializeComponent();

            this.ncc_Customer.Choose = new Settings.BasicData.Customs.ChooseCustoms();
            this.requireValueExceptions.Add(Model.PackingListHeader.PRO_PackingNo, new AA("PackingNo 不能為空!", this.txt_PackingNo));
            this.requireValueExceptions.Add(Model.PackingListHeader.PRO_PackingDate, new AA("Date 不能為空!", this.Date_PackingDate));
            this.requireValueExceptions.Add(Model.PackingListHeader.PRO_CustomerId, new AA("CONSIGNEE 不能為空!", this.ncc_Customer));
            this.requireValueExceptions.Add(Model.PackingListHeader.PRO_PerSS, new AA("PerSS 不能為空!", this.txt_PerSS));
            this.requireValueExceptions.Add(Model.PackingListHeader.PRO_SailingOnOrAbout, new AA("SailingOnOrAbout 不能為空!", this.date_Sailing));
            this.requireValueExceptions.Add(Model.PackingListHeader.PRO_FromPortId, new AA("From 不能為空!", this.lue_From));
            this.requireValueExceptions.Add(Model.PackingListHeader.PRO_ToPortId, new AA("TO 不能為空!", this.lue_TO));

            this.requireValueExceptions.Add(Model.PackingListDetail.PRO_PLTNo, new AA("PLTNo 不能為空!", this.gridControl3));
            this.requireValueExceptions.Add(Model.PackingListDetail.PRO_CartonNo, new AA("CartonNo 不能為空!", this.gridControl3));

            this.action            = "view";
            this.gridControl3.Dock = DockStyle.Fill;

            //设置单位
            this.bindingSourcePort.DataSource = portManager.Select();
            var unitList = new BL.ProductUnitManager().Select().GroupBy(U => U.CnName).Select(D => D.Key).ToList();

            unitList.ForEach(U =>
            {
                this.cob_Unit.Properties.Items.Add(U);
            });
        }
Example #2
0
        public Editform()
        {
            InitializeComponent();

            this.newChooseContorlAuditEmp.Choose = new Settings.BasicData.Employees.ChooseEmployee();
            this.requireValueExceptions.Add(Model.PCFirstOnlineCheck.PRO_OnlineDate, new AA(Properties.Resources.OnlineDateNotNull, this.date_Online));

            this.bindingSourceBusinessHours.DataSource = new BL.BusinessHoursManager().Select();
            this.bindingSourceEmployee.DataSource      = new BL.EmployeeManager().SelectOnActive();

            #region LookUp Data
            DataTable  dt = new DataTable();
            DataColumn dc;
            dc = new DataColumn("Name", typeof(string));
            dt.Columns.Add(dc);
            DataRow dr;
            dr    = dt.NewRow();
            dr[0] = " ";
            dt.Rows.Add(dr);

            dr    = dt.NewRow();
            dr[0] = "√";
            dt.Rows.Add(dr);

            dr    = dt.NewRow();
            dr[0] = "×";
            dt.Rows.Add(dr);

            dr    = dt.NewRow();
            dr[0] = "△";
            dt.Rows.Add(dr);

            this.repositoryItemLookUpEdit4.DataSource  = dt;
            this.repositoryItemLookUpEdit5.DataSource  = dt;
            this.repositoryItemLookUpEdit6.DataSource  = dt;
            this.repositoryItemLookUpEdit7.DataSource  = dt;
            this.repositoryItemLookUpEdit8.DataSource  = dt;
            this.repositoryItemLookUpEdit9.DataSource  = dt;
            this.repositoryItemLookUpEdit10.DataSource = dt;
            this.repositoryItemLookUpEdit11.DataSource = dt;

            #endregion

            this.action = "view";

            IList <Model.ProductUnit> unitList = new BL.ProductUnitManager().Select();
            this.cobProductUnit.Properties.Items.Clear();
            foreach (var item in unitList)
            {
                this.cobProductUnit.Properties.Items.Add(item.CnName);
            }
        }
Example #3
0
        public Editform()
        {
            InitializeComponent();
            this.newCCEmployee.Choose            = new Settings.BasicData.Employees.ChooseEmployee();
            this.newChooseContorlAuditEmp.Choose = new Settings.BasicData.Employees.ChooseEmployee();
            //this.requireValueExceptions.Add(Model.ProductOnlineCheck.PRO_ProductOnlineCheckDate, new AA(Properties.Resources.InvoiceDateNotNull, this.date_ProductOnlineCheck));
            this.requireValueExceptions.Add(Model.ProductOnlineCheck.PRO_OnlineDate, new AA(Properties.Resources.OnlineDateNotNull, this.date_Online));
            this.requireValueExceptions.Add(Model.ProductOnlineCheck.PRO_ProductId, new AA(Properties.Resources.Noproduct, this.txt_ProductName));
            this.bindingSourceBusinessHours.DataSource = new BL.BusinessHoursManager().SelectIdAndName();
            DataTable  dt = new DataTable();
            DataColumn dc;

            dc = new DataColumn("Id", typeof(string));
            dt.Columns.Add(dc);
            dc = new DataColumn("Name", typeof(string));
            dt.Columns.Add(dc);
            DataRow dr;

            dr    = dt.NewRow();
            dr[0] = "0";
            dr[1] = "√";
            dt.Rows.Add(dr);

            dr    = dt.NewRow();
            dr[0] = "1";
            dr[1] = "×";
            dt.Rows.Add(dr);

            dr    = dt.NewRow();
            dr[0] = "2";
            dr[1] = "△";
            dt.Rows.Add(dr);

            dr    = dt.NewRow();
            dr[0] = "3";
            dr[1] = " ";
            dt.Rows.Add(dr);
            this.repositoryItemLookUpEdit1.DataSource = dt;

            this.action = "view";

            IList <Model.ProductUnit> unitList = new BL.ProductUnitManager().Select();

            this.cobProductUnit.Properties.Items.Clear();
            foreach (var item in unitList)
            {
                this.cobProductUnit.Properties.Items.Add(item.CnName);
            }
        }
Example #4
0
        public EditForm()
        {
            InitializeComponent();

            this.newChooseEmployee.Choose        = new Settings.BasicData.Employees.ChooseEmployee();
            this.newChooseContorlAuditEmp.Choose = new Settings.BasicData.Employees.ChooseEmployee();

            this.bindingSourceBusinessHours.DataSource = new BL.BusinessHoursManager().SelectIdAndName();
            this.action = "view";

            DataTable dt = new DataTable();

            dt.Columns.Add("Id", typeof(int));
            dt.Columns.Add("Name", typeof(string));

            DataRow dr = dt.NewRow();

            dr[0] = 0;
            dr[1] = "√";
            dt.Rows.Add(dr);
            dr    = dt.NewRow();
            dr[0] = 1;
            dr[1] = "×";
            dt.Rows.Add(dr);
            dr    = dt.NewRow();
            dr[0] = 2;
            dr[1] = "△";
            dt.Rows.Add(dr);

            this.repositoryItemLookUpEdit1.DataSource = dt;

            IList <Model.ProductUnit> unitList = new BL.ProductUnitManager().Select();

            this.cobUnit.Properties.Items.Clear();
            foreach (var item in unitList)
            {
                this.cobUnit.Properties.Items.Add(item.CnName);
            }
        }
Example #5
0
        public EditFormInvoice()
        {
            InitializeComponent();

            this.ncc_Customer.Choose = new Settings.BasicData.Customs.ChooseCustoms();
            this.requireValueExceptions.Add(Model.PackingInvoiceHeader.PRO_InvoiceNo, new AA("InvoiceNo 不能為空!", this.txt_InvoiceNo));
            this.requireValueExceptions.Add(Model.PackingInvoiceHeader.PRO_InvoiceDate, new AA("Date 不能為空!", this.Date_InvoiceDate));

            this.requireValueExceptions.Add(Model.PackingInvoiceDetail.PRO_Number, new AA("No 不能為空!", this.gridControl3));

            this.action = "view";

            this.bindingSourcePort.DataSource = portManager.Select();

            //设置单位
            this.bindingSourcePort.DataSource = portManager.Select();
            var unitList = new BL.ProductUnitManager().Select().GroupBy(U => U.CnName).Select(D => D.Key).ToList();

            unitList.ForEach(U =>
            {
                this.cob_Unit.Properties.Items.Add(U);
            });
        }