public static NGCheckbox GetCheckBox(PbBaseControlInfo pbCtl) { PbCheckboxInfo pbChk = (PbCheckboxInfo)pbCtl; NGCheckbox ngChk = new NGCheckbox(); ngChk.ID = pbChk.Id; ngChk.Name = pbChk.Name; ngChk.FieldLabel = pbChk.LeftText; ngChk.XType = "ngCheckbox"; ngChk.Visible = pbChk.Visible; ngChk.MustInput = pbChk.IsMustInput; ngChk.Protect = pbChk.IsProtect; return(ngChk); }
public string GetngCheckbox(ExtControlBase controlBase) { NGCheckbox ngcheckbox = new NGCheckbox(); ngcheckbox = controlBase as NGCheckbox; sb = string.Format(@" xtype: '{0}', boxLabel: Lang.{2}||'{1}', name: '{3}', id: '{3}', itemId: '{3}', mustInput: {4}, colspan: {5}, readOnly: {6}, x:{7}, y:{8}, width:{9}, inputValue:1 ", ngcheckbox.XType, ngcheckbox.FieldLabel, FormTableName + "_" + ngcheckbox.Name, ngcheckbox.Name, controlBase.MustInput.Equals(true) && controlBase.Visible.Equals(true) ? "true" : "false", controlBase.ColSpan, controlBase.Protect.Equals(true) ? "true" : "false", controlBase.XPos, controlBase.YPos, controlBase.Width); return(sb); }
public static ExtControlInfoBase GetControlInfo(string xtype, string name, string label, string fieldtype, int length, int declen) { ExtControlInfoBase control = null; switch (xtype) { case "ngText": NGText text = new NGText(); text.maxLength = length; control = text; break; case "ngTextArea": NGTextArea ctl = new NGTextArea(); ctl.maxLength = length; control = ctl; break; case "ngDate": control = new NGDate(); break; case "ngDateTime": control = new NGDateTime(); break; case "ngNumber": control = GetNumberCtl(fieldtype, length, declen, false); break; case "ngPercent": control = GetNumberCtl(fieldtype, length, declen, true); break; case "ngComboBox": control = new NGComboBox(); break; case "ngCommonHelp": control = new NGCommonHelp(); break; case "ngRichHelp": control = new NGRichHelp(); break; case "ngRadio": control = new NGComboBox(); break; case "ngCheckbox": control = new NGCheckbox(); break; default: control = new NGText(); break; } if (xtype == "ngPercent") { control.xtype = "ngNumber"; } else { control.xtype = xtype; } control.name = name; if (name.IndexOf("*") > 0) { control.itemId = name.Split('*')[0]; } else { control.itemId = name; } control.fieldLabel = label; return(control); }