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)); }
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(); }
public override void InitUIVar() { TabControlMainHeight = 230; IsCanNew = false; IsCanDel = false; GC_Main.DataSource = pOSXCBindingSource; GC_Body.DataSource = pOSXGBindingSource; MainControls.Add(XC001); /*MainControls.Add(XF008); * MainControls.Add(XF002); * MainControls.Add(XF003); * MainControls.Add(XF004); * MainControls.Add(XF008);*/ KeyFieldMain = "XC001"; KeyFieldBody = "XG001,XG002"; VisibleFieldMain = "XC005"; VisibleFieldBody = "XG001,XB006,XB007,XB007C,XG006,XG010"; OrderFieldMain = "XC001"; OrderFieldBody = "XG006,XG002"; ReadOnlyFieldBody = "XG002,XG002C,XB004,XG003,XG004,XG006,XG006C,XG005"; DateFieldMain.Fields = "XC002,XC008"; TimeFieldMain.Fields = "XC003,XC007"; NumberFieldBody.Fields = "XG004"; NumberFieldBody.NumFields.Add("XB004", "n1"); CheckFieldBody.Fields = "XG007"; ButtonFieldListBody.Add(new ButtonFieldFormat(GCNum.GCN_Body, "", "XG008", this.XG008ButtonEdit_ButtonClick)); VisibleListMain.Add("XC001", 0); VisibleListMain.Add("XC009", 1); VisibleListMain.Add("XC004", 2); VisibleListMain.Add("XC004C", 3); VisibleListMain.Add("XC002", 4); VisibleListMain.Add("XC003", 5); VisibleListMain.Add("XC006", 6); VisibleListMain.Add("XC006C", 7); VisibleListMain.Add("XC008", 8); VisibleListBody.Add("XG007", 0); VisibleListBody.Add("XG008", 1); VisibleListBody.Add("XG002", 2); VisibleListBody.Add("XG002C", 3); VisibleListBody.Add("XB004", 4); VisibleListBody.Add("XG003", 5); VisibleListBody.Add("XG004", 6); VisibleListBody.Add("XG006", 7); VisibleListBody.Add("XG006C", 8); VisibleListBody.Add("XG009", 9); VisibleListBody.Add("XG005", 10); FieldWidthMain.Add("XC001", 117); 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", 605); FieldWidthMain.Add("XC004C", 171); FieldWidthMain.Add("XC006C", 102); FieldWidthBody.Add("XG001", 75); FieldWidthBody.Add("XG002", 86); FieldWidthBody.Add("XG003", 75); FieldWidthBody.Add("XG004", 75); FieldWidthBody.Add("XG005", 437); FieldWidthBody.Add("XG006", 81); FieldWidthBody.Add("XG007", 75); FieldWidthBody.Add("XG008", 75); FieldWidthBody.Add("XG002C", 202); FieldWidthBody.Add("XB004", 75); FieldWidthBody.Add("XB006", 75); FieldWidthBody.Add("XB007", 75); FieldWidthBody.Add("XB007C", 75); FieldWidthBody.Add("XG006C", 75); FieldWidthBody.Add("XG009", 426); FieldWidthBody.Add("XG010", 75); SetGroupSum("XG003", "XG004"); DS_RESAI06.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); } } SelectKeyMain = "XC001"; SelectKeyBody = "XF008"; 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; GV_Body.OptionsView.ShowFilterPanelMode = ShowFilterPanelMode.Never; base.InitUIVar(); }