public int CompareTo(object obj) { CategoryAttributeOptionInfo b = obj as CategoryAttributeOptionInfo; if (this._ordernum > b._ordernum) { return(1); } else { return(-1); } }
//old for attribute opiton public int GetCatetoryAttributeOptionNewOrderNum(CategoryAttributeOptionInfo oParam) { string sql = "select isnull(max(OrderNum),0)+1 as newOrderNum from Category_Attribute_Option where AttributeSysNo=" + oParam.AttributeSysNo; DataSet ds = SqlHelper.ExecuteDataSet(sql); if(Util.HasMoreRow(ds)) { return Int32.Parse(ds.Tables[0].Rows[0][0].ToString()); } else { return 1; } }