private void Del() { string code = HttpContext.Current.Request["id"].ToString(); TypeListFactory bll = new TypeListFactory(); HttpContext.Current.Response.Write(bll.Del(code)); }
private void GetMagList() { string sql = "and IsDeleted = 0 "; int iStart = 0; try { iStart = int.Parse(HttpContext.Current.Request["pageIndex"].ToString()) * int.Parse(HttpContext.Current.Request["pageSize"].ToString()); } catch { } int iLimit = 20; try { iLimit = int.Parse(HttpContext.Current.Request["pageSize"].ToString()); } catch { } string TypeCode = string.Empty; try { TypeCode = HttpUtility.UrlDecode(HttpContext.Current.Request["TypeCode"].ToString()); } catch { } if (!string.IsNullOrEmpty(TypeCode)) { sql += "and TypeCode like '%" + TypeCode + "%' "; } string TypeName = string.Empty; try { TypeName = HttpUtility.UrlDecode(HttpContext.Current.Request["TypeName"].ToString()); } catch { } if (!string.IsNullOrEmpty(TypeName)) { sql += "and TypeName like '%" + TypeName + "%' "; } TypeListFactory bll = new TypeListFactory(); HttpContext.Current.Response.Write(bll.GetMagList(sql, iStart, iLimit)); }
private void Save() { string json = string.Empty; try { json = HttpContext.Current.Request["json"].ToString(); } catch { } if (string.IsNullOrEmpty(json)) { HttpContext.Current.Response.Write(JsonMessage.FailString("参数丢失!")); return; } Prod_Type table = JsonHelper.DeserializeData<Prod_Type>(json); TypeListFactory bll = new TypeListFactory(); HttpContext.Current.Response.Write(bll.Save(table)); }