/// <summary> /// 获取属性类别信息 /// </summary> /// <returns></returns> private string getAttributeTypeInfo() { string strSortname = Request.Params["sortname"]; string strSortorder = Request.Params["sortorder"]; //当前页面 int intPageIndex = Convert.ToInt32(Request.Params["page"]); //每页记录数 int intPageSize = Convert.ToInt32(Request.Params["pagesize"]); TBaseAttributeTypeVo TBaseAttributeTypeVo = new TBaseAttributeTypeVo(); TBaseAttributeTypeVo.IS_DEL = "0"; TBaseAttributeTypeVo.SORT_FIELD = strSortname; TBaseAttributeTypeVo.SORT_TYPE = strSortorder; int intTotalCount = 0; DataTable dt = new DataTable(); if (!String.IsNullOrEmpty(srhSortName) || !String.IsNullOrEmpty(srhMonitorId)) { TBaseAttributeTypeVo.SORT_NAME = srhSortName; TBaseAttributeTypeVo.MONITOR_ID = srhMonitorId; intTotalCount = new TBaseAttributeTypeLogic().GetSelecDefinedtResultCount(TBaseAttributeTypeVo); dt = new TBaseAttributeTypeLogic().SelectDefinedTadble(TBaseAttributeTypeVo, intPageIndex, intPageSize); } else { dt = new TBaseAttributeTypeLogic().SelectByTable(TBaseAttributeTypeVo, intPageIndex, intPageSize); intTotalCount = new TBaseAttributeTypeLogic().GetSelectResultCount(TBaseAttributeTypeVo); } string strJson = CreateToJson(dt, intTotalCount); return(strJson); }
/// <summary> /// 获取属性类别信息 /// </summary> /// <returns></returns> public static string getAttributeTypeInfo() { TBaseAttributeTypeVo TBaseAttributeTypeVo = new TBaseAttributeTypeVo(); TBaseAttributeTypeVo.IS_DEL = "0"; DataTable dt = new TBaseAttributeTypeLogic().SelectByTable(TBaseAttributeTypeVo); return(DataTableToJson(dt)); }
/// <summary> /// 加载数据 /// </summary> /// <returns></returns> public string frmLoadData() { TBaseAttributeTypeVo TBaseAttributeTypeVo = new TBaseAttributeTypeVo(); TBaseAttributeTypeVo.ID = Request["id"].ToString(); TBaseAttributeTypeVo.IS_DEL = "0"; TBaseAttributeTypeVo TBaseAttributeTypeVoTemp = new TBaseAttributeTypeLogic().Details(TBaseAttributeTypeVo); return(ToJson(TBaseAttributeTypeVoTemp)); }
/// <summary> /// 增加数据 /// </summary> /// <returns></returns> public string frmAdd() { TBaseAttributeTypeVo TBaseAttributeTypeVo = autoBindRequest(Request, new TBaseAttributeTypeVo()); TBaseAttributeTypeVo.ID = GetSerialNumber("AttributeType_Id"); TBaseAttributeTypeVo.IS_DEL = "0"; bool isSuccess = new TBaseAttributeTypeLogic().Create(TBaseAttributeTypeVo); if (isSuccess) { new PageBase().WriteLog("增加属性类别", "", new PageBase().LogInfo.UserInfo.USER_NAME + "增加属性类别" + TBaseAttributeTypeVo.ID + "成功"); } return(isSuccess == true ? "1" : "0"); }
/// <summary> /// 修改数据 /// </summary> /// <returns></returns> public string frmUpdate() { TBaseAttributeTypeVo TBaseAttributeTypeVo = autoBindRequest(Request, new TBaseAttributeTypeVo()); TBaseAttributeTypeVo.ID = Request["id"].ToString(); TBaseAttributeTypeVo.IS_DEL = "0"; bool isSuccess = new TBaseAttributeTypeLogic().Edit(TBaseAttributeTypeVo); if (isSuccess) { new PageBase().WriteLog("修改属性类别", "", new PageBase().LogInfo.UserInfo.USER_NAME + "修改属性类别" + TBaseAttributeTypeVo.ID + "成功"); } return(isSuccess == true ? "1" : "0"); }
public static string deleteAttributeTypeInfo(string strValue) { TBaseAttributeTypeVo TBaseAttributeTypeVo = new TBaseAttributeTypeVo(); TBaseAttributeTypeVo.ID = strValue; TBaseAttributeTypeVo.IS_DEL = "1"; bool isSuccess = new TBaseAttributeTypeLogic().Edit(TBaseAttributeTypeVo); if (isSuccess) { new PageBase().WriteLog("删除属性类别", "", new PageBase().LogInfo.UserInfo.USER_NAME + "删除属性类别" + TBaseAttributeTypeVo.ID + "成功"); } return(isSuccess == true ? "1" : "0"); }