Ejemplo n.º 1
0
        public static SmartFormView GetForm(Guid FormGuid)
        {
            FormsManager frm = formmanager();

            SmartFormView sf = new SmartFormView();

            try
            {
                FormInfo forminfo = frm.GetForm(FormGuid);
                sf = BuildFormListItem(forminfo);
            }
            catch (Exception ex)
            {
                sf.description = ex.Message;
                sf.displayname = ex.Source;
                sf.name        = ex.Source;
            }
            finally
            {
                frm.Connection.Close();
            }
            return(sf);
        }
Ejemplo n.º 2
0
        private static SmartFormView BuildFormListItem(FormInfo forminfo)
        {
            SmartFormView sf         = new SmartFormView();
            FormInfo      form       = forminfo;
            Validation    validation = new Validation();

            sf.guid        = form.Guid;
            sf.description = form.Description;

            sf.displayname = form.DisplayName;
            sf.name        = form.Name;
            sf.guid        = form.Guid;

            sf.CheckedOutBy = form.CheckedOutBy;
            sf.CheckedOut   = form.IsCheckedOut;
            sf.ModifiedBy   = form.ModifiedBy;
            sf.ModifiedDate = form.ModifiedDate;
            sf.CreatedBy    = form.CreatedBy;
            sf.CreatedDate  = form.CreatedDate;
            sf.Result       = validation.ValidateControl("Smartform", form.Name);

            return(sf);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Gets the details for a particular view
        /// </summary>
        /// <param name="ViewName"></param>
        /// <returns></returns>
        public static SmartFormView GetView(string ViewName)
        {
            FormsManager frm = formmanager();

            SmartFormView sf = new SmartFormView();

            try
            {
                ViewInfo viewinfo = frm.GetView(ViewName);
                sf = BuildViewListItem(viewinfo);
            }
            catch (Exception ex)
            {
                sf.description = ex.Message;
                sf.displayname = ex.Source;
                sf.name        = ex.Source;
            }
            finally
            {
                frm.Connection.Close();
            }
            return(sf);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Adds view details to the object
        /// </summary>
        /// <param name="viewinfo"></param>
        /// <returns></returns>
        private static SmartFormView BuildViewListItem(ViewInfo viewinfo)
        {
            SmartFormView sf         = new SmartFormView();
            ViewInfo      view       = viewinfo;
            Validation    validation = new Validation();

            sf.guid        = viewinfo.Guid;
            sf.description = viewinfo.Description;

            sf.displayname = viewinfo.DisplayName;
            sf.name        = viewinfo.Name;
            sf.guid        = viewinfo.Guid;

            sf.CheckedOutBy = viewinfo.CheckedOutBy;
            sf.CheckedOut   = viewinfo.IsCheckedOut;
            sf.ModifiedBy   = viewinfo.ModifiedBy;
            sf.ModifiedDate = viewinfo.ModifiedDate;
            sf.CreatedBy    = viewinfo.CreatedBy;
            sf.CreatedDate  = viewinfo.CreatedDate;
            sf.Result       = validation.ValidateControl("View", viewinfo.Name);


            return(sf);
        }