/// <summary> /// 获取属性配置信息 /// </summary> /// <returns></returns> private string getAttributeConfigInfo() { string strSortname = Request.Params["sortname"]; string strSortorder = Request.Params["sortorder"]; //当前页面 int intPageIndex = Convert.ToInt32(Request.Params["page"]); //每页记录数 int intPageSize = Convert.ToInt32(Request.Params["pagesize"]); DataTable dt = new DataTable(); int intTotalCount = 0; TBaseAttributeTypeValueVo TBaseAttributeTypeValueVo = new TBaseAttributeTypeValueVo(); TBaseAttributeTypeValueVo.IS_DEL = "0"; TBaseAttributeTypeValueVo.SORT_FIELD = strSortname; TBaseAttributeTypeValueVo.SORT_TYPE = strSortorder; if (!String.IsNullOrEmpty(srh_ItemId) || !String.IsNullOrEmpty(srh_AttTypeId) || !String.IsNullOrEmpty(srh_AttId)) { TBaseAttributeTypeValueVo.ITEM_TYPE = srh_ItemId; TBaseAttributeTypeValueVo.ATTRIBUTE_TYPE_ID = srh_AttTypeId; TBaseAttributeTypeValueVo.ATTRIBUTE_ID = srh_AttId; dt = new TBaseAttributeTypeValueLogic().SelectDefinedTadble(TBaseAttributeTypeValueVo, intPageIndex, intPageSize); intTotalCount = new TBaseAttributeTypeValueLogic().GetSelecDefinedtResultCount(TBaseAttributeTypeValueVo); } else { dt = new TBaseAttributeTypeValueLogic().SelectByTable(TBaseAttributeTypeValueVo, intPageIndex, intPageSize); intTotalCount = new TBaseAttributeTypeValueLogic().GetSelectResultCount(TBaseAttributeTypeValueVo); } string strJson = CreateToJson(dt, intTotalCount); return(strJson); }
/// <summary> /// 加载数据 /// </summary> /// <returns></returns> public string frmLoadData() { TBaseAttributeTypeValueVo TBaseAttributeTypeValueVo = new TBaseAttributeTypeValueVo(); TBaseAttributeTypeValueVo.ID = Request["id"].ToString(); TBaseAttributeTypeValueVo.IS_DEL = "0"; TBaseAttributeTypeValueVo TBaseAttributeTypeValueVoTemp = new TBaseAttributeTypeValueLogic().Details(TBaseAttributeTypeValueVo); return(ToJson(TBaseAttributeTypeValueVoTemp)); }
/// <summary> /// 修改数据 /// </summary> /// <returns></returns> public string frmUpdate() { TBaseAttributeTypeValueVo TBaseAttributeTypeValueVo = autoBindRequest(Request, new TBaseAttributeTypeValueVo()); TBaseAttributeTypeValueVo.ID = Request["id"].ToString(); TBaseAttributeTypeValueVo.IS_DEL = "0"; bool isSuccess = new TBaseAttributeTypeValueLogic().Edit(TBaseAttributeTypeValueVo); if (isSuccess) { new PageBase().WriteLog("修改属性配置", "", new PageBase().LogInfo.UserInfo.USER_NAME + "修改属性配置" + TBaseAttributeTypeValueVo.ID + "成功"); } return(isSuccess == true ? "1" : "0"); }
/// <summary> /// 增加数据 /// </summary> /// <returns></returns> public string frmAdd() { TBaseAttributeTypeValueVo TBaseAttributeTypeValueVo = autoBindRequest(Request, new TBaseAttributeTypeValueVo()); TBaseAttributeTypeValueVo.ID = GetSerialNumber("AttributeConfig_Id"); TBaseAttributeTypeValueVo.IS_DEL = "0"; bool isSuccess = new TBaseAttributeTypeValueLogic().Create(TBaseAttributeTypeValueVo); if (isSuccess) { new PageBase().WriteLog("增加属性配置", "", new PageBase().LogInfo.UserInfo.USER_NAME + "增加属性配置" + TBaseAttributeTypeValueVo.ID + "成功"); } return(isSuccess == true ? "1" : "0"); }
public static string deleteAttributeConfigInfo(string strValue) { TBaseAttributeTypeValueVo TBaseAttributeTypeValueVo = new TBaseAttributeTypeValueVo(); TBaseAttributeTypeValueVo.ID = strValue; TBaseAttributeTypeValueVo.IS_DEL = "1"; bool isSuccess = new TBaseAttributeTypeValueLogic().Edit(TBaseAttributeTypeValueVo); if (isSuccess) { new PageBase().WriteLog("删除属性配置", "", new PageBase().LogInfo.UserInfo.USER_NAME + "删除属性配置" + strValue + "成功"); } return(isSuccess == true ? "1" : "0"); }