private void GetLinesEnabledData(int localid, EbMobileForm form, WebformData formData) { try { Dictionary <string, EbMobileControl> controls = form.ChildControls.ToControlDictionary(); foreach (var ctrl in controls.Values) { if (ctrl is ILinesEnabled Ilines) { SingleTable st = new SingleTable(); formData.MultipleTables.Add(Ilines.TableName, st); EbDataTable data = Ilines.GetLocalData(form.TableName, localid); foreach (var dr in data.Rows) { SingleRow row = new SingleRow { LocId = Convert.ToInt32(dr["eb_loc_id"]) }; row.Columns.AddRange(Ilines.GetColumnValues(data.Columns, dr)); st.Add(row); } } } } catch (Exception ex) { EbLog.Error(ex.Message); } }
private async Task <PushResponse> SendRecord(WebformData webdata, EbMobileForm Form, EbDataTable Dt, EbDataRow DataRow, int RowIndex) { PushResponse response = null; try { ClearWebFormData(webdata); SingleTable SingleTable = new SingleTable(); int localid = Convert.ToInt32(DataRow["id"]); SingleRow row = this.GetRow(Form, Dt, DataRow, RowIndex); SingleTable.Add(row); webdata.MultipleTables.Add(Form.TableName, SingleTable); await Form.UploadFiles(localid, webdata); this.GetLinesEnabledData(localid, Form, webdata); if (FormService.Instance == null) { new FormService(); } response = await FormService.Instance.SendFormDataAsync(null, webdata, 0, Form.WebFormRefId, row.LocId); response.LocalRowId = localid; } catch (Exception ex) { EbLog.Error("SyncServices.PushRow---" + ex.Message); } return(response); }