public AccountListEntityDC GetAccountByID(Guid AccountID) { AccountListEntityDC MemberListEntityDC = new AccountListEntityDC(); AccountsServiceSoapClient membersrv = new AccountsServiceSoapClient(); return(membersrv.GetAccountByID(AccountID)); }
public AccountListEntityDC GetAllAccountMemberCount(string Search, int PageIndex, int PageSize) { AccountListEntityDC MemberListEntityDC = new AccountListEntityDC(); AccountsServiceSoapClient membersrv = new AccountsServiceSoapClient(); return(membersrv.GetAllAccountMemberCount(Search, PageIndex, PageSize)); }
public AccountListEntityDC GetAllAccount(string search, int pageindex, int pagesize, out int count) { AccountListEntityDC MemberListEntityDC = new AccountListEntityDC(); AccountsServiceSoapClient membersrv = new AccountsServiceSoapClient(); return(membersrv.GetAllAccount(search, pageindex, pagesize, out count)); }
public AccountListEntityDC GetAllAccount(string Search, int PageIndex, int PageSize, out int Count) { AccountManager member = new AccountManager(); AccountListEntityDC ListAccount = new AccountListEntityDC(); ListAccount = member.GetAllAccount(Search, PageIndex, PageSize, out Count); return(ListAccount); }
public AccountListEntityDC GetAccountByID(Guid AccountID) { AccountListEntityDC member = new AccountListEntityDC(); AccountManager Manager = new AccountManager(); member = Manager.GetAccountByID(AccountID); return(member); }
public AccountListEntityDC GetAccountByID(Guid AccountID) { AccountListEntityDC Accounts = new AccountListEntityDC(); List <AccountEntityDC> AccountList = new List <AccountEntityDC>(); using (DbConnection conn = Jaqen.CreateConnection()) { conn.Open(); try { using (DbCommand sprocCmd = conn.CreateCommand()) { sprocCmd.CommandType = CommandType.StoredProcedure; sprocCmd.CommandText = GET_ACCOUNT_BY_ID; sprocCmd.Parameters.Add(new SqlParameter("@AccountID", AccountID.ToGuid()) { SqlDbType = SqlDbType.UniqueIdentifier }); using (IDataReader sprocReader = Jaqen.ExecuteReader(sprocCmd)) { while (sprocReader.Read()) { AccountEntityDC Account = new AccountEntityDC(); Account.AccountID = sprocReader["AccountID"].ToGuid(); Account.AccountName = sprocReader["AccountName"].ToStringDefault(); Account.Branch = sprocReader["Branch"].ToStringDefault(); Account.EmailAddress = sprocReader["EmailAddress"].ToStringDefault(); Account.TelephoneNumber = sprocReader["TelephoneNumber"].ToStringDefault(); Account.Address = sprocReader["Address"].ToStringDefault(); Account.MobileNumber = sprocReader["MobileNumber"].ToString(); Account.CreatedBy = sprocReader["CreatedBy"].ToStringDefault(); Account.CreatedDate = sprocReader["CreatedDate"].ToStringDefault(); Account.UpdatedBy = sprocReader["UpdatedBy"].ToStringDefault(); Account.UpdatedDate = sprocReader["UpdatedDate"].ToStringDefault(); AccountList.Add(Account); } } Accounts.AccountList = AccountList; } } catch (Exception ex) { throw ex; } finally { if (conn != null) { conn.Close(); } } } return(Accounts); }
public AccountListEntityDC GetAllAccountMemberCount(string Search, int PageIndex, int PageSize, out int Count) { AccountListEntityDC productResponse = new AccountListEntityDC(); AccountEntityDC member = new AccountEntityDC(); AccountDAL memberDAL = new AccountDAL(); productResponse = memberDAL.GetAllAccountMemberCount(Search, PageIndex, PageSize, out Count); return(productResponse); }
public AccountListEntityDC GetAccountByID(Guid AccountID) { AccountListEntityDC productResponse = new AccountListEntityDC(); AccountEntityDC member = new AccountEntityDC(); AccountDAL memberDAL = new AccountDAL(); productResponse = memberDAL.GetAccountByID(AccountID); return(productResponse); }
public AccountListEntityDC GetAllAccountMemberCount(string Search, int PageIndex, int PageSize) { int Count = 0; AccountListEntityDC member = new AccountListEntityDC(); AccountManager Manager = new AccountManager(); member = Manager.GetAllAccountMemberCount(Search, PageIndex, PageSize, out Count); return(member); }
public ActionResult List(string Search, int PageIndex, int PageSize) { string Count = ""; AccountBLL AccountBLL = new AccountBLL(); AccountListEntityDC data = new AccountListEntityDC(); GlobalModel global = new GlobalModel(); string companyid = null; if (global.SelectUserRoleID != "1") { companyid = global.Company; } data = AccountBLL.GetAllAccount(Search, PageIndex, PageSize); Dictionary <string, object> retData = new Dictionary <string, object>(); // FOR RESPONSE retData.Add("data", data); retData.Add("total", Count); return(Json(retData, JsonRequestBehavior.AllowGet)); }
public AccountListEntityDC GetAllAccount(string Search, int PageIndex, int PageSize, out int Count) { AccountListEntityDC Accounts = new AccountListEntityDC(); List <AccountEntityDC> AccountList = new List <AccountEntityDC>(); using (DbConnection conn = Jaqen.CreateConnection()) { conn.Open(); try { using (DbCommand sprocCmd = conn.CreateCommand()) { sprocCmd.CommandType = CommandType.StoredProcedure; sprocCmd.CommandText = GET_ALL_ACCOUNT; sprocCmd.Parameters.Add(new SqlParameter("@Search", Search.ToStringDefault()) { SqlDbType = SqlDbType.NVarChar }); sprocCmd.Parameters.Add(new SqlParameter("@PageIndex", PageIndex.ToInt()) { SqlDbType = SqlDbType.Int }); sprocCmd.Parameters.Add(new SqlParameter("@PageSize", PageSize.ToInt()) { SqlDbType = SqlDbType.Int }); var CountResult = sprocCmd.CreateParameter(); CountResult.ParameterName = "@Count"; CountResult.Direction = ParameterDirection.Output; CountResult.DbType = DbType.Int32; sprocCmd.Parameters.Add(CountResult); using (IDataReader sprocReader = Jaqen.ExecuteReader(sprocCmd)) { while (sprocReader.Read()) { AccountEntityDC Account = new AccountEntityDC(); Account.AccountID = sprocReader["AccountID"].ToGuid(); Account.AccountName = sprocReader["AccountName"].ToStringDefault(); Account.Branch = sprocReader["Branch"].ToStringDefault(); Account.EmailAddress = sprocReader["EmailAddress"].ToStringDefault(); Account.TelephoneNumber = sprocReader["TelephoneNumber"].ToStringDefault(); Account.Address = sprocReader["Address"].ToStringDefault(); Account.Counts = sprocReader["Counts"].ToStringDefault(); Account.MobileNumber = sprocReader["MobileNumber"].ToString(); Account.CreatedBy = sprocReader["CreatedBy"].ToStringDefault(); Account.CreatedDate = sprocReader["CreatedDate"].ToStringDefault(); Account.UpdatedBy = sprocReader["UpdatedBy"].ToStringDefault(); Account.UpdatedDate = sprocReader["UpdatedDate"].ToStringDefault(); AccountList.Add(Account); } } Accounts.AccountList = AccountList; Count = CountResult.Value.ToInt(); } } catch (Exception ex) { throw ex; } finally { if (conn != null) { conn.Close(); } } } return(Accounts); }