/// <summary> /// 获取方法依据信息 /// </summary> /// <returns></returns> private string getMethodInfo() { string strSortname = Request.Params["sortname"]; string strSortorder = Request.Params["sortorder"]; //当前页面 int intPageIndex = Convert.ToInt32(Request.Params["page"]); //每页记录数 int intPageSize = Convert.ToInt32(Request.Params["pagesize"]); TBaseMethodInfoVo TBaseMethodInfoVo = new TBaseMethodInfoVo(); TBaseMethodInfoVo.IS_DEL = "0"; TBaseMethodInfoVo.SORT_FIELD = strSortname; TBaseMethodInfoVo.SORT_TYPE = strSortorder; DataTable dt = new DataTable(); int intTotalCount = 0; if (!String.IsNullOrEmpty(srhCode) || !String.IsNullOrEmpty(srhName) || !String.IsNullOrEmpty(srhMonitorId)) { TBaseMethodInfoVo.METHOD_CODE = srhCode; TBaseMethodInfoVo.METHOD_NAME = srhName; TBaseMethodInfoVo.MONITOR_ID = srhMonitorId; dt = new TBaseMethodInfoLogic().SelectDefinedTadble(TBaseMethodInfoVo, intPageIndex, intPageSize); intTotalCount = new TBaseMethodInfoLogic().GetSelecDefinedtResultCount(TBaseMethodInfoVo); } else { dt = new TBaseMethodInfoLogic().SelectByTable(TBaseMethodInfoVo, intPageIndex, intPageSize); intTotalCount = new TBaseMethodInfoLogic().GetSelectResultCount(TBaseMethodInfoVo); } string strJson = CreateToJson(dt, intTotalCount); return(strJson); }
/// <summary> /// 加载数据 /// </summary> /// <returns></returns> public string frmLoadData() { TBaseMethodInfoVo TBaseMethodInfoVo = new TBaseMethodInfoVo(); TBaseMethodInfoVo.ID = Request["id"].ToString(); TBaseMethodInfoVo.IS_DEL = "0"; TBaseMethodInfoVo TBaseMethodInfoVoTemp = new TBaseMethodInfoLogic().Details(TBaseMethodInfoVo); return(ToJson(TBaseMethodInfoVoTemp)); }
public static string deleteMethodInfo(string strValue) { TBaseMethodInfoVo TBaseMethodInfoVo = new TBaseMethodInfoVo(); TBaseMethodInfoVo.ID = strValue; TBaseMethodInfoVo.IS_DEL = "1"; bool isSuccess = new TBaseMethodInfoLogic().Edit(TBaseMethodInfoVo); if (isSuccess) { new PageBase().WriteLog("删除方法依据", "", new PageBase().LogInfo.UserInfo.USER_NAME + "删除方法依据" + TBaseMethodInfoVo.ID + "成功"); } return(isSuccess == true ? "1" : "0"); }
/// <summary> /// 修改数据 /// </summary> /// <returns></returns> public string frmUpdate() { TBaseMethodInfoVo TBaseMethodInfoVo = autoBindRequest(Request, new TBaseMethodInfoVo()); TBaseMethodInfoVo.ID = Request["id"].ToString(); TBaseMethodInfoVo.IS_DEL = "0"; bool isSuccess = new TBaseMethodInfoLogic().Edit(TBaseMethodInfoVo); if (isSuccess) { new PageBase().WriteLog("修改方法依据", "", new PageBase().LogInfo.UserInfo.USER_NAME + "修改方法依据" + TBaseMethodInfoVo.ID + "成功"); } return(isSuccess == true ? "1" : "0"); }
/// <summary> /// 增加数据 /// </summary> /// <returns></returns> public string frmAdd() { TBaseMethodInfoVo TBaseMethodInfoVo = autoBindRequest(Request, new TBaseMethodInfoVo()); TBaseMethodInfoVo.ID = GetSerialNumber("method_id"); TBaseMethodInfoVo.IS_DEL = "0"; bool isSuccess = new TBaseMethodInfoLogic().Create(TBaseMethodInfoVo); if (isSuccess) { new PageBase().WriteLog("新增方法依据", "", new PageBase().LogInfo.UserInfo.USER_NAME + "新增方法依据" + TBaseMethodInfoVo.ID + "成功"); } return(isSuccess == true ? "1" : "0"); }