private Boolean ValidateData() { Boolean result = false; result = CHelper.ValidateTextBox(lblCode, txtCode, false); if (!result) { return(result); } result = CHelper.ValidateTextBox(lblDesc, txtDesc, false); if (!result) { return(result); } CTable ug = new CTable(""); MMicroService uv = new MMicroService(ug); uv.ServiceCode = txtCode.Text; if (vw != null) { uv.ServiceID = (vw as MMicroService).ServiceID; } if (OnixWebServiceAPI.IsObjectExistAPI("SassIsMicroServiceExist", uv.GetDbObject())) { CHelper.ShowKeyExist(lblCode, txtCode); return(false); } return(result); }
private void LoadData() { this.Title = Caption; txtCode.SetFocus(); CTable t = new CTable(""); vw = new MMicroService(t); vw.CreateDefaultValue(); DataContext = vw; CUtil.EnableForm(false, this); if (Mode.Equals("E")) { CTable m = OnixWebServiceAPI.SubmitObjectAPI("SassGetMicroServiceInfo", actualView.GetDbObject()); if (m != null) { vw.SetDbObject(m); vw.NotifyAllPropertiesChanged(); } } vw.IsModified = false; CUtil.EnableForm(true, this); }
public override Tuple <CTable, ObservableCollection <MBaseModel> > QueryData() { items = OnixWebServiceAPI.GetListAPI("SassGetMicroServiceList", "MICRO_SERVICE_LIST", model.GetDbObject()); lastObjectReturned = OnixWebServiceAPI.GetLastObjectReturned(); itemSources.Clear(); int idx = 0; foreach (CTable o in items) { MMicroService v = new MMicroService(o); v.RowIndex = idx; itemSources.Add(v); idx++; } Tuple <CTable, ObservableCollection <MBaseModel> > tuple = new Tuple <CTable, ObservableCollection <MBaseModel> >(lastObjectReturned, itemSources); return(tuple); }