public static FG_Root GetCSharpFormGlobals_NEW(EbWebForm _this, WebformData _formdata, WebformData _formdataBkUp, IDatabase DataDB, DbConnection DbCon, bool isSrcForm) { FG_User fG_User = new FG_User(_this.UserObj.UserId, _this.UserObj.FullName, _this.UserObj.Email, _this.UserObj.Roles); FG_System fG_System = new FG_System(); FG_DataDB fG_DataDB = null; if (DataDB != null) { DelegateTest OutDelObj = new DelegateTest(DataDB, DbCon); fG_DataDB = new FG_DataDB(OutDelObj.ExecuteScalar); } WebformData _formdataEmpty = _this.GetEmptyModel(); if (_formdata == null) { _formdata = _formdataEmpty; } else { _formdata.DGsRowDataModel = _formdataEmpty.DGsRowDataModel; } FG_Locations fG_Locations = Get_FG_Locations(_this.SolutionObj.Locations); int createdBy = _this.TableRowId <= 0 ? _this.UserObj.UserId : _formdata.CreatedBy; string createdAt = _this.TableRowId <= 0 ? DateTime.UtcNow.ConvertFromUtc(_this.UserObj.Preference.TimeZone).ToString(FormConstants.yyyyMMdd_HHmmss, CultureInfo.InvariantCulture) : _formdata.CreatedAt; FG_WebForm fG_WebForm = new FG_WebForm(_this.TableName, _this.TableRowId, _this.LocationId, _this.RefId, createdBy, createdAt); GetCSharpFormGlobalsRec_NEW(fG_WebForm, _this, _formdata, _formdataBkUp); return(new FG_Root(fG_WebForm, fG_User, fG_System, isSrcForm, fG_DataDB, fG_Locations)); }
public static List <FG_WebForm> GetEmptyDestinationModelGlobals(List <EbWebForm> DestForms) { List <FG_WebForm> fG_WebFormsList = new List <FG_WebForm>(); for (int i = 0; i < DestForms.Count; i++) { EbWebForm Form = DestForms[i]; WebformData _formdata = Form.GetEmptyModel(); int createdBy = Form.TableRowId <= 0 ? Form.UserObj.UserId : _formdata.CreatedBy; string createdAt = Form.TableRowId <= 0 ? DateTime.UtcNow.ConvertFromUtc(Form.UserObj.Preference.TimeZone).ToString(FormConstants.yyyyMMdd_HHmmss, CultureInfo.InvariantCulture) : _formdata.CreatedAt; FG_WebForm fG_WebForm = new FG_WebForm(Form.TableName, Form.TableRowId, Form.LocationId, Form.RefId, createdBy, createdAt); GetCSharpFormGlobalsRec_NEW(fG_WebForm, Form, _formdata, null); fG_WebFormsList.Add(fG_WebForm); } return(fG_WebFormsList); }