private void LoadData() { isInLoad = true; this.Title = Caption; lkup.Focus(); CTable t = new CTable(""); vw = new MAuxilaryDocItem(t); vw.CreateDefaultValue(); DataContext = vw; CUtil.EnableForm(false, this); if (Mode.Equals("E")) { CTable newDB = actualView.GetDbObject().Clone(); vw.SetDbObject(newDB); lkup.Lookup = selectionTypeToLookup(vw.SelectType); vw.NotifyAllPropertiesChanged(); } else { vw.SelectType = CGlobalVariable.GetGlobalVariableValue("DEFAULT_SELECTION_TYPE_PERCHASE"); lkup.Lookup = selectionTypeToLookup(vw.SelectType); } vw.IsModified = false; CUtil.EnableForm(true, this); isInLoad = false; }
private void cmdAction_Click(object sender, RoutedEventArgs e) { Button btn = sender as Button; currentViewObj = (MAuxilaryDocItem)btn.Tag; btn.ContextMenu.IsOpen = true; }
private void lsvAccoutItem_MouseDoubleClick(object sender, MouseButtonEventArgs e) { if (lsvPoItem.SelectedItems.Count == 1) { currentViewObj = (MAuxilaryDocItem)lsvPoItem.SelectedItems[0]; ShowEditWindow(); } }
private void addPoDocServiceItems(ArrayList items) { foreach (MService ai in items) { MAuxilaryDocItem di = new MAuxilaryDocItem(new CTable("")); di.ExtFlag = "A"; di.SelectType = "1"; di.ServiceCode = ai.ServiceCode; di.ServiceName = ai.ServiceName; di.ServiceID = ai.ServiceID; di.Quantity = "1"; di.DiscountPct = "0.00"; di.Discount = "0.00"; vw.AddAuxilaryDocItem(di); } }
private void addPoDocStockItems(ArrayList items) { foreach (MInventoryItem ai in items) { MAuxilaryDocItem di = new MAuxilaryDocItem(new CTable("")); di.ExtFlag = "A"; di.SelectType = "2"; di.ItemCode = ai.ItemCode; di.ItemNameThai = ai.ItemNameThai; di.ItemId = ai.ItemID; di.Quantity = "1"; di.DiscountPct = "0.00"; di.Discount = "0.00"; vw.AddAuxilaryDocItem(di); } }
private void createInfoEntries() { AddInfoControl(new CCriteriaEntry(CriteriaEntryType.ENTRY_LABEL, "", "supplier_code")); AddInfoControl(new CCriteriaEntry(CriteriaEntryType.ENTRY_TEXT_BOX, "EntityCode", "")); AddInfoControl(new CCriteriaEntry(CriteriaEntryType.ENTRY_LABEL, "", "supplier_name")); AddInfoControl(new CCriteriaEntry(CriteriaEntryType.ENTRY_TEXT_BOX, "EntityName", "")); MAuxilaryDocItem m = (MAuxilaryDocItem)model; MAccountDoc d = (MAccountDoc)GetDefaultData(); if (d != null) { m.IsIncludable = false; m.EntityCode = d.EntityCode; m.EntityName = d.EntityName; m.EntityID = d.EntityId; m.DocumentType = eType; m.PoInvoiceRefType = "1"; } }
public override Tuple <CTable, ObservableCollection <MBaseModel> > QueryData() { CTable tb = model.GetDbObject(); items = OnixWebServiceAPI.GetAuxilaryDocItemList(tb); lastObjectReturned = OnixWebServiceAPI.GetLastObjectReturned(); itemSources.Clear(); int idx = 0; foreach (CTable o in items) { MAuxilaryDocItem v = new MAuxilaryDocItem(o); v.RowIndex = idx; itemSources.Add(v); idx++; } Tuple <CTable, ObservableCollection <MBaseModel> > tuple = new Tuple <CTable, ObservableCollection <MBaseModel> >(lastObjectReturned, itemSources); return(tuple); }
private void LoadData() { //isInLoad = true; this.Title = Caption; CTable t = new CTable(""); vw = new MAuxilaryDocItem(t); vw.CreateDefaultValue(); DataContext = vw; vw.SelectType = "3"; CUtil.EnableForm(false, this); if (Mode.Equals("E")) { CTable newDB = actualView.GetDbObject().Clone(); vw.SetDbObject(newDB); vw.InitItemDetails(); } else { for (int i = 1; i <= 1; i++) { MAuxilaryDocSubItem mi = new MAuxilaryDocSubItem(new CTable("")); vw.AddItemDetail(mi); } } vw.NotifyAllPropertiesChanged(); vw.IsModified = false; CUtil.EnableForm(true, this); //isInLoad = false; }
public CAuxDocItem(MAuxilaryDocItem di, String lang, MReportConfig cfg) { rptConfig = cfg; mi = di; Lang = lang; }