Ejemplo n.º 1
0
        public void designUIForSBLUI(int column, StringBuilder sb)
        {
            //int lleftSpace = 20, lwidth = 100, iwidth = 120, readOnly = 0, maxLength = 16, verticalGap = 30, horizontalGap = 300;
            string iName = "", displayFormat = "";

            for (int i = 0; i < column; i++)
            {
                if (counter < idList.Count)
                {
                    if (!string.IsNullOrEmpty(idList[counter].Id))
                    {
                        string elementData     = string.Empty;
                        string elementDataHtml = string.Empty;

                        if (idList[counter].ControlType.ToString() == "TEXTBOX")
                        {
                            iName         = idList[counter].Id;
                            displayFormat = idList[counter].DisplayFormat;
                            if (IsAuto)
                            {
                                iwidth    = UtilityOperations.GetInputLength(displayFormat);
                                maxLength = iwidth;
                                iwidth    = maxLength * 7;
                                if (iwidth < 20)
                                {
                                    iwidth = 20;
                                }
                                if (iwidth > 250)
                                {
                                    iwidth = 250;
                                }
                            }

                            if (readOnlyStatus == "true")
                            {
                                readOnly = "readonly=\"0\"";
                            }
                            else
                            {
                                readOnly = string.Empty;
                            }

                            elementData = string.Format("<FIELDSET class=\"field\" style=\"LEFT: {0}px; WIDTH: {1}px; POSITION: absolute; TOP: {2}px; POSITION: absolute\" FNSType=\"field\"><INPUT class=\"fieldinput\" style=\"LEFT:{3}px; WIDTH: {4}px; POSITION: absolute; POSITION: absolute\" tabindex=\"{5}\" {6} maxlength=\"{7}\" name=\"{8}\" FNSType=\"fieldinput\" RXField=\"{9}\" TXField=\"{10}\" DisplayFormat=\"{11}\" Value=\"{12}\"></INPUT>{13}</FIELDSET>",
                                                        lleftSpace, lwidth, ltopSpace, lwidth + 10, iwidth, tabindex, readOnly, maxLength, iName, idList[counter].Id, idList[counter].Id, displayFormat, idList[counter].Value, idList[counter].Label);
                        }
                        else if (idList[counter].ControlType.ToString() == "COMBOBOX")
                        {
                            iName         = idList[counter].Id;
                            displayFormat = idList[counter].DisplayFormat;
                            //ileftSpace = lleftSpace + lwidth + 20;

                            if (readOnlyStatus == "true")
                            {
                                readOnly = "readonly=\"0\"";
                            }
                            else
                            {
                                readOnly = string.Empty;
                            }

                            elementData = string.Format("<FIELDSET class=\"combobox\" style=\"LEFT: {0}px; WIDTH: {1}px; POSITION: absolute; TOP: {2}px; POSITION: absolute\" FNSType=\"combobox\"><SELECT class=\"comboboxselect\" style=\"LEFT:{3}px; WIDTH: {4}px; POSITION: absolute; POSITION: absolute\" tabindex=\"{5}\" readonly=\"{6}\" maxlength=\"{7}\" name=\"{8}\" FNSType=\"comboboxselect\" RXField=\"{9}\" TXField=\"{10}\" DisplayFormat=\"{11}\" SelectionSet=\"default.htm\"><OPTION value=\"\" selected=\"-1\"></OPTION></SELECT>{12}</FIELDSET>",
                                                        lleftSpace, lwidth, ltopSpace, lwidth + 10, iwidth, tabindex, readOnly, maxLength, iName, idList[counter].Id, idList[counter].Id, displayFormat, idList[counter].Label);
                        }

                        sb.Append(elementData);
                        counter++;
                        tabindex++;
                    }
                }
                lleftSpace = lleftSpace + horizontalGap;
            }
            ltopSpace  = ltopSpace + verticalGap;
            lleftSpace = leftSpaceMaster;
        }