コード例 #1
0
        public async Task <List <ChitBranchDetails> > GetFDReceiptBranchDetails(string Connectionstring)
        {
            List <ChitBranchDetails> _ChitBranchDetailsList = new List <ChitBranchDetails>();
            await Task.Run(() =>
            {
                try
                {
                    using (NpgsqlDataReader dr = NPGSqlHelper.ExecuteReader(Connectionstring, CommandType.Text, "select * from (select distinct chitbranchid,chitbranchname,count(case when contacttype='Business Entity' then '1' else tn.vchapplicationid end)count from vwfdtransaction_details fd left join tabapplicationpersonalnomineedetails tn on tn.vchapplicationid=fd.fdaccountno where   balanceamount >0  group by chitbranchid,chitbranchname order by chitbranchname)tbl where count>0"))
                    {
                        while (dr.Read())
                        {
                            var _ChitBranchDetails = new ChitBranchDetails
                            {
                                pBranchId   = Convert.ToInt64(dr["chitbranchid"]),
                                pBranchname = dr["chitbranchname"],
                            };
                            _ChitBranchDetailsList.Add(_ChitBranchDetails);
                        }
                    }
                }
                catch (Exception)
                {
                    throw;
                }
            });

            return(_ChitBranchDetailsList);
        }
コード例 #2
0
        public async Task <List <ChitBranchDetails> > GetFDBranchDetails(string Connectionstring)
        {
            List <ChitBranchDetails> _ChitBranchDetailsList = new List <ChitBranchDetails>();
            await Task.Run(() =>
            {
                try
                {
                    using (NpgsqlDataReader dr = NPGSqlHelper.ExecuteReader(Connectionstring, CommandType.Text, "select distinct chitbranchid,chitbranchname from vwfdtransaction_details where  balanceamount<=0 and fdaccountid not in(select trans_type_id from maturity_bonds) order by chitbranchname;"))
                    {
                        while (dr.Read())
                        {
                            var _ChitBranchDetails = new ChitBranchDetails
                            {
                                pBranchId   = Convert.ToInt64(dr["chitbranchid"]),
                                pBranchname = dr["chitbranchname"]
                            };
                            _ChitBranchDetailsList.Add(_ChitBranchDetails);
                        }
                    }
                }
                catch (Exception)
                {
                    throw;
                }
            });

            return(_ChitBranchDetailsList);
        }
コード例 #3
0
        public async Task <List <ChitBranchDetails> > GetFDBranchDetails(string Connectionstring)
        {
            List <ChitBranchDetails> _ChitBranchDetailsList = new List <ChitBranchDetails>();
            await Task.Run(() =>
            {
                try
                {
                    using (NpgsqlDataReader dr = NPGSqlHelper.ExecuteReader(Connectionstring, CommandType.Text, "select distinct tc.code, tc.branchname, tc.vchregion, tc.vchzone from tabbranchcodes tc join tbltransfdcreation tf on tc.code=tf.chitbranchid::numeric(9,0) where tf.statusid=" + Convert.ToInt32(Status.Active) + " order by tc.branchname;"))
                    {
                        while (dr.Read())
                        {
                            var _ChitBranchDetails = new ChitBranchDetails
                            {
                                pBranchId   = Convert.ToInt64(dr["code"]),
                                pBranchname = dr["branchname"],
                                pVchRegion  = dr["vchregion"],
                                pVchZone    = dr["vchzone"]
                            };
                            _ChitBranchDetailsList.Add(_ChitBranchDetails);
                        }
                    }
                }
                catch (Exception)
                {
                    throw;
                }
            });

            return(_ChitBranchDetailsList);
        }