/// <summary> /// 检查是否含有该收款方式 /// </summary> /// <param name="modeName"></param> /// <returns></returns> public static bool CheckHave(string modeName) { sql = string.Format(@" select * from MakeCollectionsMode where MakeCollectionsMode='{0}'", modeName); return(SqlHelper.GetTable(sql, ref error).Rows.Count >= 1 ? true : false); }
/// <summary> /// 查询收款方式 /// </summary> /// <returns></returns> public static DataTable CheckHave() { sql = " select * from MakeCollectionsMode "; return(SqlHelper.GetTableToSqlserver(sql, ref error)); }
/// <summary> /// 删除收款方式 /// </summary> /// <param name="ids"></param> /// <returns></returns> public static string DeleteData(string ids) { sql = string.Format(@" delete MakeCollectionsMode where Id in ('{0}') ", ids); return(SqlHelper.ExecuteSql(sql, ref error) == true ? "1" : error); }
/// <summary> /// 编辑收款方式 /// </summary> /// <param name="user"></param> /// <param name="error"></param> /// <returns></returns> public static bool EditMakeCollectionsMode(MakeCollectionsModes makecollectionsmode, ref string error) { sql = string.Format(@" update MakeCollectionsMode set MakeCollectionsMode='{0}' where Id='{1}'", makecollectionsmode.MakeCollectionsMode, makecollectionsmode.Id); return(SqlHelper.ExecuteSql(sql, ref error)); }