public Models.MemberResultDo GetMemberList(Models.MemberCriteriaDo criteria) { Models.MemberResultDo result = new Models.MemberResultDo(); db.CreateCommand(new Utils.SQL.SQLCommandHandler((Utils.SQL.ASQLDbCommand command) => { command.CommandText = "[dbo].[sp_Get_MemberList]"; command.CommandType = System.Data.CommandType.StoredProcedure; command.AddParameter(typeof(string), "MemberCode", criteria.MemberCode); command.AddParameter(typeof(int), "MemberTypeID", criteria.MemberTypeID); command.AddParameter(typeof(string), "FirstName", criteria.FirstName); command.AddParameter(typeof(string), "LastName", criteria.LastName); command.AddParameter(typeof(string), "Email", criteria.Email); command.AddParameter(typeof(string), "TelNo", criteria.TelNo); command.AddParameter(typeof(DateTime), "RegisterDateFrom", criteria.RegisterDateFrom); command.AddParameter(typeof(DateTime), "RegisterDateTo", criteria.RegisterDateTo); command.AddParameter(typeof(DateTime), "BirthDateFrom", criteria.BirthDateFrom); command.AddParameter(typeof(DateTime), "BirthDateTo", criteria.BirthDateTo); command.AddParameter(typeof(bool), "FlagActive", criteria.FlagActive); command.AddParameter(typeof(int), "RenewTime", criteria.RenewTime); command.AddParameter(typeof(int), "ExpireStatus", criteria.ExpireStatus); command.AddParameter(typeof(DateTime), "ExpireDateFrom", criteria.ExpireDateFrom); command.AddParameter(typeof(DateTime), "ExpireDateTo", criteria.ExpireDateTo); command.AddParameter(typeof(DateTime), "CurrentDate", criteria.CurrentDate); Utils.SQL.ISQLDbParameter output = command.AddSearchParameter(criteria); result.Rows = command.ToList <Models.MemberFSDo>(); result.TotalRecordParameter(output); })); return(result); }
public Models.MemberDo GetMember(Models.MemberCriteriaDo criteria) { Models.MemberDo result = null; db.CreateCommand(new Utils.SQL.SQLCommandHandler((Utils.SQL.ASQLDbCommand command) => { command.CommandText = "[dbo].[sp_Get_Member]"; command.CommandType = System.Data.CommandType.StoredProcedure; command.AddParameter(typeof(int), "MemberID", criteria.MemberID); command.AddParameter(typeof(DateTime), "CurrentDate", criteria.CurrentDate); List <Models.MemberDo> list = command.ToList <Models.MemberDo>(); if (list != null) { if (list.Count > 0) { result = list[0]; } } })); return(result); }