コード例 #1
0
ファイル: AccountBLL.cs プロジェクト: jaeangelopb/basedCode
        public AccountListEntityDC GetAccountByID(Guid AccountID)
        {
            AccountListEntityDC       MemberListEntityDC = new AccountListEntityDC();
            AccountsServiceSoapClient membersrv          = new AccountsServiceSoapClient();

            return(membersrv.GetAccountByID(AccountID));
        }
コード例 #2
0
ファイル: AccountBLL.cs プロジェクト: jaeangelopb/basedCode
        public AccountListEntityDC GetAllAccountMemberCount(string Search, int PageIndex, int PageSize)
        {
            AccountListEntityDC       MemberListEntityDC = new AccountListEntityDC();
            AccountsServiceSoapClient membersrv          = new AccountsServiceSoapClient();

            return(membersrv.GetAllAccountMemberCount(Search, PageIndex, PageSize));
        }
コード例 #3
0
ファイル: AccountBLL.cs プロジェクト: jaeangelopb/basedCode
        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));
        }
コード例 #4
0
        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);
        }
コード例 #5
0
        public AccountListEntityDC GetAccountByID(Guid AccountID)
        {
            AccountListEntityDC member  = new AccountListEntityDC();
            AccountManager      Manager = new AccountManager();

            member = Manager.GetAccountByID(AccountID);
            return(member);
        }
コード例 #6
0
        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);
        }
コード例 #7
0
        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);
        }
コード例 #8
0
        public AccountListEntityDC GetAccountByID(Guid AccountID)
        {
            AccountListEntityDC productResponse = new AccountListEntityDC();
            AccountEntityDC     member          = new AccountEntityDC();
            AccountDAL          memberDAL       = new AccountDAL();

            productResponse = memberDAL.GetAccountByID(AccountID);
            return(productResponse);
        }
コード例 #9
0
        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);
        }
コード例 #10
0
        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));
        }
コード例 #11
0
        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);
        }