protected void FillFeild() { if (_id != "0") { model = bll.GetModel(this._id); model.templateId = this._id; } else { model.templateId = IdCreator.CreateId("T_ShortMessage_Template", "templateId"); model.isUse = 1; } model.flag = this.ddlParentCategory.SelectedValue; //标识 model.supplierId = this.ddlSupplierCategory.SelectedValue; //供应商 if (!string.IsNullOrEmpty(model.supplierId)) { ShortMsgSupModel modelSup = new ShortMsgSupBll().GetModel(model.supplierId); if (modelSup != null) { model.supplierFlag = modelSup.flag; } } model.templateCode = KillSqlIn.Form_ReplaceByString(Request.Form["txtCode"], 200); model.templateParam = KillSqlIn.Form_ReplaceByString(Request.Form["txtParam"], 200); }
protected void BindSupplierCateoryDrp() { ShortMsgSupBll supBll = new ShortMsgSupBll(); List <ShortMsgSupModel> lists = supBll.GetModelList("isUse=1"); ddlSupplierCategory.DataSource = lists; ddlSupplierCategory.DataValueField = "supplierId"; ddlSupplierCategory.DataTextField = "supplierName"; ddlSupplierCategory.DataBind(); }