public static List<ReplyEntity> GetReplys(string guid, int pageSize, int pageIndex, ref int totalCount, ref int pageCount) { List<ReplyEntity> list = new List<ReplyEntity>(); string whereSql = " Status<>9 and GUID='" + guid + "' "; DataTable dt = CommonBusiness.GetPagerData("OrderReply", "*", whereSql, "AutoID", "CreateTime desc ", pageSize, pageIndex, out totalCount, out pageCount, false); foreach (DataRow dr in dt.Rows) { ReplyEntity model = new ReplyEntity(); model.FillData(dr); model.CreateUser = OrganizationBusiness.GetUserByUserID(model.CreateUserID, model.AgentID); if (!string.IsNullOrEmpty(model.FromReplyID)) { model.FromReplyUser = OrganizationBusiness.GetUserByUserID(model.FromReplyUserID, model.FromReplyAgentID); } list.Add(model); } return list; }
public static List<ReplyEntity> GetReplys(string guid, EnumLogObjectType type, int pageSize, int pageIndex, ref int totalCount, ref int pageCount, string agentid) { string tablename = ""; switch (type) { case EnumLogObjectType.Activity: tablename = "ActivityReply"; break; case EnumLogObjectType.Customer: tablename = "CustomerReply"; break; case EnumLogObjectType.Opportunity: tablename = "OpportunityReply"; break; case EnumLogObjectType.Orders: tablename = "OrderReply"; break; } List<ReplyEntity> list = new List<ReplyEntity>(); string whereSql = " Status<>9 and GUID='" + guid + "' "; DataTable dt = CommonBusiness.GetPagerData(tablename, "*", whereSql, "AutoID", "CreateTime desc ", pageSize, pageIndex, out totalCount, out pageCount, false); foreach (DataRow dr in dt.Rows) { ReplyEntity model = new ReplyEntity(); model.FillData(dr); model.CreateUser = OrganizationBusiness.GetUserByUserID(model.CreateUserID, model.AgentID); if (!string.IsNullOrEmpty(model.FromReplyID)) { model.FromReplyUser = OrganizationBusiness.GetUserByUserID(model.FromReplyUserID, model.FromReplyAgentID); } list.Add(model); } return list; }