Beispiel #1
0
 /// <summary>
 /// Executes when the Document is first loaded for the task by the Extraction
 /// module, after all of the runtime setup is complete.
 ///</summary>
 /// <param name="dataContext">The context object for the document.</param>
 public void FormLoad(IUimDataEntryFormContext form)
 {
     try
     {
         IUimDataContext      dataContext = form.UimDataContext;
         IUimFieldDataContext hidden      = dataContext.FindFieldDataContext("hiddenCOMMONS");
         ScriptMain           m           = new ScriptMain();
         m.hiddenSection(form, hidden.ValueAsString);
         prelist = m.getLabelField(form);
     }
     catch (Exception e)
     {
         string error = e.StackTrace;
     }
 }
Beispiel #2
0
        /// <summary>
        /// Executes when the Document is first loaded for the task by the Extraction
        /// module, after all of the runtime setup is complete.
        ///</summary>
        /// <param name="dataContext">The context object for the document.</param>
        public void FormLoad(IUimDataEntryFormContext form)
        {
            try
            {
                IUimDataContext      dataContext = form.UimDataContext;
                IUimFieldDataContext hidden      = dataContext.FindFieldDataContext("hiddenCOMMONS");
                ScriptMain           m           = new ScriptMain();
                m.hiddenSection(form, hidden.ValueAsString);
                prelist = m.getLabelField(form);
                //Lookup parameter

                List <ScriptMain.LookupDropDownsBankName> list = m.restDropDownBankName(dataContext, "BANKMASTER");
                m.setDropdownBankName(form, list, "ddl_bankName");
                //ddl_bankName
            }
            catch (Exception e)
            {
                string error = e.StackTrace;
            }
        }
        /// <summary>
        /// Executes when the Document is first loaded for the task by the Extraction
        /// module, after all of the runtime setup is complete.
        ///</summary>
        /// <param name="dataContext">The context object for the document.</param>
        public void FormLoad(IUimDataEntryFormContext form)
        {
            try
            {
                IUimDataContext      dataContext = form.UimDataContext;
                IUimFieldDataContext hidden      = dataContext.FindFieldDataContext("hiddenCOMMONS");
                ScriptMain           m           = new ScriptMain();
                m.hiddenSection(form, hidden.ValueAsString);
                prelist = m.getLabelField(form);

                List <ScriptMain.LookupDropDownsBankName> list = m.restDropDownBankName(dataContext, "BANKMASTER");
                m.setDropdownBankName(form, list, "ddl_bankName");
                //ddl_bankName
                List <ScriptMain.LookupDropDownsProvince> listProvince = m.restDropDownProvince(dataContext, "PROVINCEMASTER");
                //
                m.setDropdownProvince(form, listProvince, "ddl_assignee_address_province");  //ddl_Province ??
            }
            catch (Exception e)
            {
                string error = e.StackTrace;
            }
        }
Beispiel #4
0
        public void jsonFormat(IUimDataContext dataContext, ArrayList prelist)
        {
            ArrayList list = new ArrayList();

            IUimFieldDataContext[] checkbox = dataContext.GetFieldDataContextArray();

            foreach (IUimFieldDataContext cb in checkbox)
            {
                foreach (object s in prelist)
                {
                    if (cb.Name.StartsWith(s.ToString()))
                    {
                        list.Add(cb.Name);
                    }
                }
            }

            ArrayList list2     = new ArrayList();
            string    fieldname = null;

            foreach (object fname in list)
            {
                IUimFieldDataContext field;
                string[]             value = fname.ToString().Split(new string[] { "_S_", "_M_" }, StringSplitOptions.None);
                string select_value        = value[1];
                field = dataContext.FindFieldDataContext(fname.ToString());
                string hname = value[0];
                hiddenfield = dataContext.FindFieldDataContext(hname);

                if (fieldname != hname)
                {
                    list2.Clear();
                }

                if (field.Value.ToString() == "1")
                {
                    if (hname == "bankTransferSelected")
                    {
                        list2.Add(select_value);
                        string jsonresult = JsonConvert.SerializeObject(list2);
                        hiddenfield.SetValue(jsonresult);
                        fieldname = hname;
                    }
                    else
                    {
                        list2.Add(select_value);
                        string jsonresult = JsonConvert.SerializeObject(list2);
                        hiddenfield.SetValue(jsonresult);
                        fieldname = hname;
                    }
                }
                else
                {
                    if (hname == "bankTransferSelected")
                    {
                        list2.Add("N");
                        string jsonresult = JsonConvert.SerializeObject(list2);
                        hiddenfield.SetValue(jsonresult);
                        fieldname = hname;
                    }
                }
            }
        }