private async Task SendAndFillFupPersisant(EbMobileControl ctrl, MobileTableRow row)
        {
            List <FileWrapper> Files = ctrl.GetValue <List <FileWrapper> >();

            if (!Files.Any())
            {
                return;
            }

            try
            {
                List <ApiFileData> resp = await FormService.Instance.SendFilesAsync(Files);

                if (resp.Any())
                {
                    MobileTableColumn column = ctrl.GetMobileTableColumn();
                    List <int>        refIds = (from item in resp where item.FileRefId > 0 select item.FileRefId).ToList();
                    if (refIds.Count > 0)
                    {
                        string uploadedRefs = string.Join <int>(",", refIds);

                        if (ctrl is EbMobileAudioInput audio && audio.MultiSelect)
                        {
                            if (audio.OldValue != null)
                            {
                                uploadedRefs = audio.OldValue.ToString() + CharConstants.COMMA + uploadedRefs;
                            }
                        }
                        column.Value = uploadedRefs;
                        row.Columns.Add(column);
                    }
                }
            }
            catch (Exception ex)
            {
                EbLog.Error("error occured when sending persistant fup controls values");
                EbLog.Error(ex.Message + ", STACKTRACE:" + ex.StackTrace);
            }
        }
        private async Task <MobileFormData> GetFormData(int RowId)
        {
            MobileFormData formData = new MobileFormData(this.TableName);

            MobileTable table = formData.CreateTable();

            MobileTableRow row = table.CreateRow(RowId);

            foreach (KeyValuePair <string, EbMobileControl> pair in this.ControlDictionary)
            {
                EbMobileControl ctrl = pair.Value;

                if (ctrl is IFileUploadControl)
                {
                    await this.GetFileData(ctrl, table, row);
                }
                else if (ctrl is EbMobileDataGrid dataGrid)
                {
                    formData.Tables.Add(dataGrid.GetValue <MobileTable>());
                }
                else
                {
                    MobileTableColumn Column = ctrl.GetMobileTableColumn();

                    if (Column != null)
                    {
                        row.Columns.Add(Column);
                    }
                }
            }

            if (RowId <= 0)
            {
                row.AppendEbColValues(NetworkType == NetworkMode.Offline, true);
            }
            ;
            return(formData);
        }