static internal string GetMediaFormat(this StepDataObject _stepDataObject)
        {
            string template = _stepDataObject.DataItem.Template;
            string namedKey = _stepDataObject.DataItem.NamedKey;

            if (template.EndsWith("pdf") || namedKey.Contains("PDF"))
            {
                return("PDF");
            }
            else if (template.EndsWith("xlsx") || namedKey.Contains("Excel"))
            {
                return("Excel");
            }
            else if (namedKey.Contains("WebForm"))
            {
                return("WebForm");
            }
            else if (namedKey.Contains("WebGrid"))
            {
                return("WebGrid");
            }
            else if (namedKey.Contains("DataFile"))
            {
                return("DataFile");
            }
            else if (namedKey.Contains("Folder"))
            {
                return("Folder");
            }
            else if (namedKey.Contains("Database"))
            {
                return("Database");
            }
            return("Unknown");
        }
示例#2
0
 public Autofill(StepDataObject stepDataObject,
                 ProjectItem activity)
 {
     this.StepDataObject = stepDataObject;
     this.Activity       = activity;
     this.Posting        = this.LoadOrCreatePosting();
 }
        static internal string GetActionName(this StepDataObject _stepDataObject)
        {
            string namedKey = _stepDataObject.DataItem.NamedKey;

            if (_stepDataObject.DataItem.IsEmptyInstance)
            {
                return("None");
            }
            else if (namedKey.Contains("WebForm"))
            {
                return("Edit form");
            }
            else if (namedKey.Contains("WebGrid"))
            {
                return("Edit data");
            }
            else if (namedKey.Contains("FillOut") && namedKey.Contains("Excel"))
            {
                return("Upload Excel file");
            }
            else if (namedKey.Contains("FillOut") && namedKey.Contains("PDF"))
            {
                return("Upload PDF file");
            }
            else if (namedKey.Contains("FillOut"))
            {
                return("Upload file");
            }
            else if (namedKey.Contains("Autogenerated"))
            {
                return("Generate file");
            }
            else if (namedKey.Contains("GenerateFilesFolder"))
            {
                return("Generate folder");
            }
            else if (namedKey.Contains("Attach"))
            {
                return("Attach file");
            }
            else if (namedKey.Contains("Database"))
            {
                return("Connect");
            }
            return("Unknown");
        }