public static Tuple<IControlValue, int, int> CreateFromXQueryArg(IUcPage page, XElement xArg) { string name = xArg.GetFirstElementValue("Name"); string cname = xArg.GetFirstElementValue("CName"); string Class = xArg.GetFirstElementValue("Class").ToUpper(); string classInfo = xArg.GetFirstElementValue("ClassInfo"); string classParams = xArg.GetFirstElementValue("ClassParams"); bool allowEmpty = xArg.GetFirstElementValue("AllowEmpty", "1") == "0" ? false : true; string defaultValue = xArg.GetFirstElementValue("Default"); int order = int.Parse(xArg.GetFirstElementValue("Order", "0")); int sqlOrder = int.Parse(xArg.GetFirstElementValue("SqlOrder", "0")); IControlValue control = null; switch (xArg.Element("Class").Value.ToUpper()) { case ControlType.TextInput: control = new UcTextInput(); control.ControlValue = defaultValue; break; case ControlType.TextArea: case "AREA": control = new UcTextArea(); control.ControlValue = defaultValue; break; case ControlType.NumInput: case "NUMBER": case "NUMBERINPUT": control = new UcNumInput(); control.ControlValue = defaultValue; break; case ControlType.CheckBox: case "CHECK": control = new UcCheckedInput(classInfo, defaultValue, true); break; case ControlType.RadioBox: case "RADIO": control = new UcCheckedInput(classInfo, defaultValue, false); break; case ControlType.AutoComplete: case "AUTO": case "AUTOCOMPLETETEXT": case "AUTOCOMPLETEINPUT": control = new UcAutoCompleteInput(classInfo, classParams, false); break; case ControlType.DateInput: control = new UcDateInput(); ((UcDateInput)control).Flag = classInfo; break; } control.CName = cname; control.AllowEmpty = allowEmpty; return new Tuple<IControlValue, int, int>(control, order, sqlOrder); }
protected override void onCreateMainItems() { this._ucXm = new UcAutoCompleteInput(SdrdDjlx.RDKH); this._ucXm.CName = "项目信息"; this._ucXm.AllowEmpty = true; this.controls.Add(this._ucXm); this._ucKh = new UcAutoCompleteInput(SdrdDjlx.RDKH); this._ucKh.CName = "客户信息"; this._ucKh.AllowEmpty = true; this.controls.Add(this._ucKh); this._ucHtbh = new UcTextInput(); this._ucHtbh.CName = "合同编号"; this._ucHtbh.AllowEmpty = false; this.controls.Add(this._ucHtbh); this._ucHtmc = new UcTextInput(); this._ucHtmc.CName = "合同名称"; this._ucHtmc.AllowEmpty = false; this.controls.Add(this._ucHtmc); this._ucHtrq = new UcDateInput() { Flag = UcDateInput.NOW }; this._ucHtrq.CName = "合同日期"; this._ucHtrq.AllowEmpty = false; this.controls.Add(this._ucHtrq); this._ucHtje = new UcNumInput() { CanFushu = false }; this._ucHtje.CName = "合同金额"; this._ucHtje.AllowEmpty = false; this.controls.Add(this._ucHtje); this._ucFkfs = new UcTextInput(); this._ucFkfs.CName = "付款方式"; this.controls.Add(this._ucFkfs); this._ucHtqx = new UcTextInput(); this._ucHtqx.CName = "合同期限"; this.controls.Add(this._ucHtqx); this._ucZytk = new UcTextInput(); this._ucZytk.CName = "主要条款"; this.controls.Add(this._ucZytk); this._ucBz = new UcTextInput(); this._ucBz.CName = "备注"; this.controls.Add(this._ucBz); }
protected override void onCreateMainItems() { this._ucDjrq = new UcDateInput(); this._ucDjrq.CName = "单据日期"; this._ucDjrq.AllowEmpty = false; this.controls.Add(this._ucDjrq); this._ucXmmc = new UcTextInput(); this._ucXmmc.CName = "项目名称"; this._ucXmmc.AllowEmpty = false; this.controls.Add(this._ucXmmc); this._ucWjbh = new UcTextInput(); this._ucWjbh.CName = "文件编号"; this._ucWjbh.AllowEmpty = false; this.controls.Add(this._ucWjbh); this._ucJtsp = new UcCheckedInput("0,否;1,行管委;2,审监委", "-1"); this._ucJtsp.CName = "集团审批"; this._ucJtsp.AllowEmpty = false; this.controls.Add(this._ucJtsp); this._ucYsje = new UcNumInput(); this._ucYsje.CName = "预算金额"; this._ucYsje.AllowEmpty = false; this.controls.Add(this._ucYsje); this._ucFjxm = new UcCheckedInput("1,招标文件草稿;2,图纸;100,其他", "1"); this._ucFjxm.CName = "附件项目"; this._ucFjxm.AllowEmpty = false; this.controls.Add(this._ucFjxm); this._ucSfjg = new UcCheckedInput(); this._ucSfjg.CName = "是否有技改计划"; this._ucSfjg.AllowEmpty = false; this.controls.Add(this._ucSfjg); this._ucJgsm = new UcTextInput(); this._ucJgsm.CName = "技改说明"; this._ucJgsm.AllowEmpty = true; this.controls.Add(this._ucJgsm); this._ucQtsm = new UcTextArea(); this._ucQtsm.CName = "其他说明"; this._ucQtsm.AllowEmpty = true; this.controls.Add(this._ucQtsm); this._ucBz = new UcTextInput(); this._ucBz.CName = "备注"; this._ucBz.AllowEmpty = true; this.controls.Add(this._ucBz); }
protected override void onCreateMainItems() { this._ucJgqrd = new UcAutoCompleteInput("JBJGQRD"); this._ucJgqrd.CName = "价格确认信息"; this._ucJgqrd.AllowEmpty = true; this.controls.Add(this._ucJgqrd); this._ucDjrq = new UcDateInput(); this._ucDjrq.CName = "单据日期"; this._ucDjrq.AllowEmpty = false; this.controls.Add(this._ucDjrq); this._ucHtdw = new UcTextInput(); this._ucHtdw.CName = "合同单位"; this._ucHtdw.AllowEmpty = false; this.controls.Add(this._ucHtdw); this._ucHtmc = new UcTextInput(); this._ucHtmc.CName = "合同名称"; this._ucHtmc.AllowEmpty = false; this.controls.Add(this._ucHtmc); this._ucHtbh = new UcTextInput(); this._ucHtbh.CName = "合同编号"; this._ucHtbh.AllowEmpty = false; this.controls.Add(this._ucHtbh); this._ucJgly = new UcCheckedInput("0,招标;1,比价或定向;2,参照招标价议价", "0"); this._ucJgly.CName = "价格来源"; this._ucJgly.AllowEmpty = false; this.controls.Add(this._ucJgly); this._ucJtsp = new UcCheckedInput("0,否;1,行管委;2,审监委", ""); this._ucJtsp.CName = "集团审批"; this._ucJtsp.AllowEmpty = false; this.controls.Add(this._ucJtsp); this._ucFjxm = new UcCheckedInput("1,合同文本草稿;2,合同价明细;3,图纸;4,中标通知书;5,中标单位确认单;6,投标文件;8,比价审批单;7,其他", "1"); this._ucFjxm.CName = "附件项目"; this._ucFjxm.AllowEmpty = false; this.controls.Add(this._ucFjxm); this._ucHtje = new UcNumInput(); this._ucHtje.CName = "合同金额"; this._ucHtje.AllowEmpty = false; this.controls.Add(this._ucHtje); this._ucFkfs = new UcTextInput(); this._ucFkfs.CName = "付款方式"; this._ucFkfs.AllowEmpty = false; this.controls.Add(this._ucFkfs); this._ucHtqx = new UcTextInput(); this._ucHtqx.CName = "合同期限"; this._ucHtqx.AllowEmpty = false; this.controls.Add(this._ucHtqx); this._ucZytk = new UcTextArea(); this._ucZytk.CName = "主要条款"; this._ucZytk.AllowEmpty = true; this.controls.Add(this._ucZytk); this._ucBz = new UcTextInput(); this._ucBz.CName = "备注"; this._ucBz.AllowEmpty = true; this.controls.Add(this._ucBz); }