Esempio n. 1
0
        public override void InitUIVar()
        {
            f2 = new F2Window(this);
            GC_Main.DataSource = pOSXRBindingSource;
            SBtnList.Add(btnStar1);
            SBtnList.Add(btnStar2);
            SBtnList.Add(btnStar3);
            SBtnList.Add(btnStar4);
            SBtnList.Add(btnStar5);

            MainControls.Add(XR001);
            MainControls.Add(XR002);
            MainControls.Add(XR003);
            MainControls.Add(XR004);
            //MainControls.Add(XR005);
            MainControls.Add(XR006);

            KeyFieldMain           = "XR001,XR002,XR003";
            ReadOnlyFieldMain      = "XR001";
            RequiredFieldMain      = "XR004";
            OrderFieldMain         = "XR001,XR002,XR003";
            NumberFieldMain.Fields = "XR005";

            ButtonFieldListMain.Add(XR002);
            ButtonFieldListMain.Add(XR003);
            ButtonFieldListMain.Add(XR004);

            VisibleListMain.Add("XR001", 0);
            VisibleListMain.Add("XR002", 1);
            VisibleListMain.Add("XR002C", 2);
            VisibleListMain.Add("XR003", 3);
            VisibleListMain.Add("XR003C", 4);
            VisibleListMain.Add("XR004", 5);
            VisibleListMain.Add("XR004C", 6);
            VisibleListMain.Add("XR005", 7);
            VisibleListMain.Add("XR006", 8);

            FieldWidthMain.Add("XR001", 133);
            FieldWidthMain.Add("XR002", 86);
            FieldWidthMain.Add("XR003", 86);
            FieldWidthMain.Add("XR004", 70);
            FieldWidthMain.Add("XR005", 163);
            FieldWidthMain.Add("XR006", 622);
            FieldWidthMain.Add("XR002C", 183);
            FieldWidthMain.Add("XR003C", 204);
            FieldWidthMain.Add("XR004C", 102);
            GV_Main.Columns["XR005"].MinWidth = 163;
            GV_Main.Columns["XR005"].MaxWidth = 163;
            GV_Main.RowHeight = 32;

            DS_RESAI09.POSXRDataTable dataTable = pOSXRTableAdapter.GetDataBy("");
            if (dataTable != null)
            {
                for (int i = 0; i < dataTable.Columns.Count - 1; i++)
                {
                    if (!dataTable.Columns[i].ColumnName.StartsWith("X"))
                    {
                        continue;
                    }
                    SchemaList.Add(dataTable.Columns[i].ColumnName + " " + dataTable.Columns[i].Caption);
                }
            }

            /*RepositoryItemTextEdit edit = new RepositoryItemTextEdit();
             * GV_Main.Columns["XC009"].ColumnEdit = edit;
             * edit.DisplayFormat.FormatType = FormatType.Custom;
             * edit.DisplayFormat.FormatString = "XC009";
             * edit.DisplayFormat.Format = new AI02Formatter();*/

            XR002C.Text  = "";
            XR003C.Text  = "";
            XR004C.Text  = "";
            LBGrade.Text = "";

            base.InitUIVar();
        }
Esempio n. 2
0
        public override void InitUIVar()
        {
            f2 = new F2Window(this);
            GC_Main.DataSource = pOSXCBindingSource;
            MainControls.Add(XC001);
            MainControls.Add(XC010);
            MainControls.Add(XC009);
            MainControls.Add(XC004);
            MainControls.Add(XC002);
            MainControls.Add(XC002C);
            MainControls.Add(XC003);
            MainControls.Add(XC008);
            MainControls.Add(XC007);
            MainControls.Add(XC006);

            VisibleFieldMain  = "XC005";
            KeyFieldMain      = "XC001";
            RequiredFieldMain = "XC009,XC004,XC002,XC003,XC008,XC007,XC006";
            OrderFieldMain    = "XC001";

            DateFieldMain.Fields = "XC002,XC008";
            TimeFieldMain.Fields = "XC003,XC007";

            ButtonFieldListMain.Add(XC004);
            ButtonFieldListMain.Add(XC006);

            VisibleListMain.Add("XC001", 0);
            VisibleListMain.Add("XC010", 1);
            VisibleListMain.Add("XC009", 2);
            VisibleListMain.Add("XC004", 3);
            VisibleListMain.Add("XC004C", 4);
            VisibleListMain.Add("XC002", 5);
            VisibleListMain.Add("XC003", 6);
            VisibleListMain.Add("XC008", 7);
            VisibleListMain.Add("XC007", 8);
            VisibleListMain.Add("XC006", 9);
            VisibleListMain.Add("XC006C", 10);

            FieldWidthMain.Add("XC001", 114);
            FieldWidthMain.Add("XC002", 93);
            FieldWidthMain.Add("XC003", 86);
            FieldWidthMain.Add("XC004", 86);
            FieldWidthMain.Add("XC005", 75);
            FieldWidthMain.Add("XC006", 70);
            FieldWidthMain.Add("XC007", 86);
            FieldWidthMain.Add("XC008", 93);
            FieldWidthMain.Add("XC009", 86);
            FieldWidthMain.Add("XC010", 251);
            FieldWidthMain.Add("XC004C", 119);
            FieldWidthMain.Add("XC006C", 102);

            DS_RESAI02.POSXCDataTable dataTable = pOSXCTableAdapter.GetDataBy("");
            if (dataTable != null)
            {
                for (int i = 0; i < dataTable.Columns.Count - 1; i++)
                {
                    if (!dataTable.Columns[i].ColumnName.StartsWith("X"))
                    {
                        continue;
                    }
                    SchemaList.Add(dataTable.Columns[i].ColumnName + " " + dataTable.Columns[i].Caption);
                }
            }
            RepositoryItemTextEdit edit = new RepositoryItemTextEdit();

            GV_Main.Columns["XC009"].ColumnEdit = edit;
            edit.DisplayFormat.FormatType       = FormatType.Custom;
            edit.DisplayFormat.FormatString     = "XC009";
            edit.DisplayFormat.Format           = new AI02Formatter();

            XC004C.Text = "";
            XC006C.Text = "";

            XC009.Properties.DisplayMember = "Text";
            XC009.Properties.ValueMember   = "Value";

            var items = new[] {
                new { Text = "1.早餐", Value = "1" },
                new { Text = "2.午餐", Value = "2" },
                new { Text = "3.下午茶", Value = "3" },
                new { Text = "4.晚餐", Value = "4" }
            };

            XC009.Properties.DataSource = items;
            base.InitUIVar();
        }
Esempio n. 3
0
        public override void InitUIVar()
        {
            f2 = new F2Window(this);
            TabControlMainHeight = 230;
            GC_Main.DataSource   = pOSXFBindingSource;
            GC_Body.DataSource   = pOSXGBindingSource;

            MainControls.Add(XF001);
            MainControls.Add(XF008);

            KeyFieldMain      = "XF001";
            KeyFieldBody      = "XG001,XG010,XG002";
            VisibleFieldMain  = "XF005,XF006,XF007";
            VisibleFieldBody  = "XG001,XB006,XG007,XG008";
            OrderFieldMain    = "XF001";
            OrderFieldBody    = "XG001,XG010,XG002";
            RequiredFieldMain = "XF008";
            RequiredFieldBody = "XG002,XG010";
            ReadOnlyFieldBody = "XB007C,XG002C,XB004,XG006C,XG004,XG010";

            DateFieldMain.Fields   = "XF003,XC008";
            TimeFieldMain.Fields   = "XF004,XC007";
            NumberFieldBody.Fields = "XG004,XG006C";
            NumberFieldBody.NumFields.Add("XB004", "n1");

            SetGroupSum("XG003", "XG004");
            GV_Body.Columns["XG006C"].GroupIndex = 0;

            ButtonFieldListMain.Add(XF008);
            ButtonFieldListBody.Add(new ButtonFieldFormat(GCNum.GCN_Body, "", "XG002", this.XG002ButtonEdit_ButtonClick));
            ButtonFieldListBody.Add(new ButtonFieldFormat(GCNum.GCN_Body, "", "XB007", this.XB007ButtonEdit_ButtonClick));
            ButtonFieldListBody.Add(new ButtonFieldFormat(GCNum.GCN_Body, "", "XG006", this.XG006ButtonEdit_ButtonClick));
            ButtonFieldListBody.Add(new ButtonFieldFormat(GCNum.GCN_Body, "", "XG009", this.XG009ButtonEdit_ButtonClick));

            VisibleListMain.Add("XF001", 0);
            VisibleListMain.Add("XF008", 1);
            VisibleListMain.Add("XC009", 2);
            VisibleListMain.Add("XF002", 3);
            VisibleListMain.Add("XF002C", 4);
            VisibleListMain.Add("XF003", 5);
            VisibleListMain.Add("XF004", 6);
            VisibleListMain.Add("XC006", 7);
            VisibleListMain.Add("XC006C", 8);
            VisibleListMain.Add("XC008", 9);
            VisibleListMain.Add("XC007", 10);

            VisibleListBody.Add("XG010", 0);    //序號
            VisibleListBody.Add("XB007", 1);    //菜色類別
            VisibleListBody.Add("XB007C", 2);   //類別名稱
            VisibleListBody.Add("XG002", 3);    //菜色編號
            VisibleListBody.Add("XG002C", 4);   //菜色名稱
            VisibleListBody.Add("XB004", 5);    //單價
            VisibleListBody.Add("XG003", 6);    //數量
            VisibleListBody.Add("XG004", 7);    //金額
            VisibleListBody.Add("XG006", 8);    //訂購人
            VisibleListBody.Add("XG006C", 9);   //名稱
            VisibleListBody.Add("XG009", 10);   //口味加料
            VisibleListBody.Add("XG005", 11);   //備註

            FieldWidthMain.Add("XF001", 116);
            FieldWidthMain.Add("XF002", 86);
            FieldWidthMain.Add("XF003", 98);
            FieldWidthMain.Add("XF004", 86);
            FieldWidthMain.Add("XF005", 75);
            FieldWidthMain.Add("XF006", 75);
            FieldWidthMain.Add("XF007", 75);
            FieldWidthMain.Add("XF008", 119);
            FieldWidthMain.Add("XC006", 70);
            FieldWidthMain.Add("XC007", 86);
            FieldWidthMain.Add("XC008", 93);
            FieldWidthMain.Add("XC009", 86);
            FieldWidthMain.Add("XF002C", 205);
            FieldWidthMain.Add("XC006C", 102);

            FieldWidthBody.Add("XG001", 75);
            FieldWidthBody.Add("XG002", 86);
            FieldWidthBody.Add("XG003", 54);
            FieldWidthBody.Add("XG004", 75);
            FieldWidthBody.Add("XG005", 473);
            FieldWidthBody.Add("XG006", 70);
            FieldWidthBody.Add("XB004", 75);
            FieldWidthBody.Add("XB006", 75);
            FieldWidthBody.Add("XB007", 86);
            FieldWidthBody.Add("XG002C", 172);
            FieldWidthBody.Add("XB007C", 86);
            FieldWidthBody.Add("XG007", 75);
            FieldWidthBody.Add("XG008", 75);
            FieldWidthBody.Add("XG006C", 75);
            FieldWidthBody.Add("XG009", 335);
            FieldWidthBody.Add("XG010", 87);

            DS_RESAI04.POSXFDataTable dataTable = pOSXFTableAdapter.GetDataBy("");
            if (dataTable != null)
            {
                for (int i = 0; i < dataTable.Columns.Count - 1; i++)
                {
                    if (!dataTable.Columns[i].ColumnName.StartsWith("X"))
                    {
                        continue;
                    }
                    SchemaList.Add(dataTable.Columns[i].ColumnName + " " + dataTable.Columns[i].Caption);
                }
            }

            RepositoryItemTextEdit edit = new RepositoryItemTextEdit();

            GV_Main.Columns["XC009"].ColumnEdit = edit;
            edit.DisplayFormat.FormatType       = FormatType.Custom;
            edit.DisplayFormat.FormatString     = "XC009";
            edit.DisplayFormat.Format           = new AI04Formatter();

            //body
            RepositoryItemTextEdit mTextEdit = new RepositoryItemTextEdit();

            GV_Body.Columns["XG003"].ColumnEdit = mTextEdit;
            mTextEdit.EditValueChanging        += mTextEdit_EditValueChanging;

            SelectKeyMain = "XF001";
            SelectKeyBody = "XG001";

            XF002C.Text = "";
            XC006C.Text = "";

            XC009.Properties.DisplayMember = "Text";
            XC009.Properties.ValueMember   = "Value";

            var items = new[] {
                new { Text = "1.早餐", Value = "1" },
                new { Text = "2.午餐", Value = "2" },
                new { Text = "3.下午茶", Value = "3" },
                new { Text = "4.晚餐", Value = "4" }
            };

            XC009.Properties.DataSource = items;

            base.InitUIVar();
            GV_Body.SetMasterRowExpanded(GV_Body.FocusedRowHandle, GV_Body.GetMasterRowExpanded(GV_Body.FocusedRowHandle));
        }
Esempio n. 4
0
        public override void InitUIVar()
        {
            f2 = new F2Window(this);
            TabControlMainHeight = 250;
            GC_Main.DataSource   = pOSXABindingSource;
            GC_Body.DataSource   = pOSXBBindingSource;
            MainControls.Add(XA001);
            MainControls.Add(XA002);
            MainControls.Add(XA003);
            MainControls.Add(XA004);
            MainControls.Add(XA005);
            MainControls.Add(XA006);
            MainControls.Add(XA007);
            MainControls.Add(XA008);
            MainControls.Add(XA009);

            KeyFieldMain      = "XA001";
            KeyFieldBody      = "XB001,XB002";
            VisibleFieldMain  = "XA010,XA011";
            VisibleFieldBody  = "XB001,XB006,XB008,XB009,XB010";
            OrderFieldMain    = "XA001";
            OrderFieldBody    = "XB001,XB002";
            ReadOnlyFieldBody = "XB002,XB007C";
            RequiredFieldMain = "XA002";

            TimeFieldMain.Fields  = "XA007";
            CheckFieldMain.Fields = "XA009";
            NumberFieldBody.NumFields.Add("XB004", "n1");
            ButtonFieldListMain.Add(XA002);
            ButtonFieldListBody.Add(new ButtonFieldFormat(GCNum.GCN_Body, "", "XB007", this.XB002ButtonEdit_ButtonClick));

            VisibleListMain.Add("XA001", 0);
            VisibleListMain.Add("XA002", 1);
            VisibleListMain.Add("XA002C", 2);
            VisibleListMain.Add("XA003", 3);
            VisibleListMain.Add("XA009", 4);
            VisibleListMain.Add("XA007", 5);
            VisibleListMain.Add("XA004", 6);
            VisibleListMain.Add("XA005", 7);
            VisibleListMain.Add("XA006", 8);
            VisibleListMain.Add("XA008", 9);

            VisibleListBody.Add("XB002", 0);
            VisibleListBody.Add("XB007", 1);
            VisibleListBody.Add("XB007C", 2);
            VisibleListBody.Add("XB003", 4);
            VisibleListBody.Add("XB004", 5);
            VisibleListBody.Add("XB005", 6);

            FieldWidthMain.Add("XA001", 86);
            FieldWidthMain.Add("XA002", 86);
            FieldWidthMain.Add("XA003", 257);
            FieldWidthMain.Add("XA004", 111);
            FieldWidthMain.Add("XA005", 111);
            FieldWidthMain.Add("XA006", 500);
            FieldWidthMain.Add("XA007", 86);
            FieldWidthMain.Add("XA008", 500);
            FieldWidthMain.Add("XA009", 54);
            FieldWidthMain.Add("XA011", 75);
            FieldWidthMain.Add("XA002C", 87);
            FieldWidthMain.Add("XA010", 75);

            FieldWidthBody.Add("XB001", 75);
            FieldWidthBody.Add("XB002", 86);
            FieldWidthBody.Add("XB003", 237);
            FieldWidthBody.Add("XB004", 67);
            FieldWidthBody.Add("XB005", 588);
            FieldWidthBody.Add("XB006", 75);
            FieldWidthBody.Add("XB007", 86);
            FieldWidthBody.Add("XB008", 75);
            FieldWidthBody.Add("XB009", 75);
            FieldWidthBody.Add("XB010", 75);
            FieldWidthBody.Add("XB007C", 86);

            DS_RESAI01.POSXADataTable dataTable = pOSXATableAdapter.GetDataBy("");
            if (dataTable != null)
            {
                for (int i = 0; i < dataTable.Columns.Count - 1; i++)
                {
                    if (!dataTable.Columns[i].ColumnName.StartsWith("XA"))
                    {
                        continue;
                    }
                    SchemaList.Add(dataTable.Columns[i].ColumnName + " " + dataTable.Columns[i].Caption);
                }
            }
            SelectKeyMain = "XA001";
            SelectKeyBody = "XB001";
            XA002C.Text   = "";
            base.InitUIVar();
        }
Esempio n. 5
0
        public override void InitUIVar()
        {
            f2 = new F2Window(this);
            TabControlMainHeight = 230;
            GC_Main.DataSource   = pOSXNBindingSource;
            GC_Body.DataSource   = pOSXOBindingSource;
            MainControls.Add(XN001);
            MainControls.Add(XN002);
            MainControls.Add(XN003);

            KeyFieldMain        = "XN001,XN002,XN003";
            KeyFieldBody        = "XO001,XO002,XO003,XO004,XO005";
            VisibleFieldBody    = "XO001,XO002,XO003";
            OrderFieldMain      = "XN001,XN002,XN003";
            OrderFieldBody      = "XO001,XO002,XO003,XO004,XO005";
            ReadOnlyFieldBody   = "XO005C";
            LeaveCheckFieldMain = "XN001,XN003";

            ButtonFieldListMain.Add(XN001);
            ButtonFieldListMain.Add(XN003);
            ButtonFieldListBody.Add(new ButtonFieldFormat(GCNum.GCN_Body, "", "XO005", this.XO004ButtonEdit_ButtonClick));

            VisibleListMain.Add("XN001", 0);
            VisibleListMain.Add("XN001C", 1);
            VisibleListMain.Add("XN002", 2);
            VisibleListMain.Add("XN003", 3);
            VisibleListMain.Add("XN003C", 4);

            VisibleListMain.Add("XO004", 0);
            VisibleListMain.Add("XO005", 1);
            VisibleListMain.Add("XO005C", 2);

            FieldWidthMain.Add("XN001", 75);
            FieldWidthMain.Add("XN001C", 183);
            FieldWidthMain.Add("XN002", 151);
            FieldWidthMain.Add("XN003", 157);
            FieldWidthMain.Add("XN003C", 367);

            FieldWidthBody.Add("XO001", 75);
            FieldWidthBody.Add("XO002", 75);
            FieldWidthBody.Add("XO003", 75);
            FieldWidthBody.Add("XO004", 75);
            FieldWidthBody.Add("XO005", 125);
            FieldWidthBody.Add("XO005C", 279);

            DS_RESAI08.POSXNDataTable dataTable = pOSXNTableAdapter.GetDataBy("");
            if (dataTable != null)
            {
                for (int i = 0; i < dataTable.Columns.Count - 1; i++)
                {
                    if (!dataTable.Columns[i].ColumnName.StartsWith("X"))
                    {
                        continue;
                    }
                    SchemaList.Add(dataTable.Columns[i].ColumnName + " " + dataTable.Columns[i].Caption);
                }
            }

            RepositoryItemTextEdit edit = new RepositoryItemTextEdit();

            GV_Main.Columns["XN002"].ColumnEdit = edit;
            edit.DisplayFormat.FormatType       = FormatType.Custom;
            edit.DisplayFormat.FormatString     = "XN002";
            edit.DisplayFormat.Format           = new AI08Formatter();

            var items = new[] {
                new { Text = "1.菜色類別", Value = "1" },
                new { Text = "2.菜色編號", Value = "2" }
            };

            var items2 = new[] {
                new { Text = "1.口味", Value = "1" },
                new { Text = "2.加料", Value = "2" }
            };

            RepositoryItemLookUpEdit edit2 = new RepositoryItemLookUpEdit();

            GV_Body.Columns["XO004"].ColumnEdit = edit2;
            edit2.DisplayMember = "Text";
            edit2.ValueMember   = "Value";
            edit2.DataSource    = items2;

            SelectKeyMain = "XN001,XN002,XN003";
            SelectKeyBody = "XO001,XO002,XO003";

            XN001C.Text = "";
            XN003C.Text = "";
            XN002.Properties.DisplayMember = "Text";
            XN002.Properties.ValueMember   = "Value";
            XN002.Properties.DataSource    = items;

            base.InitUIVar();
        }