Ejemplo n.º 1
0
        public ActionResult FdDetail()
        {
            FdBusinessLayer       fdBL        = new FdBusinessLayer();
            FdDetailsModel        fdModel     = new FdDetailsModel();
            List <FdDetailsModel> fdModelList = fdBL.GetFdDetails(Convert.ToInt64(Session["Accountno"]));

            fdModel.FdDetailList = fdModelList;
            FdDataAccess.sqlCon.Close();
            return(View(fdModel));
        }
Ejemplo n.º 2
0
        public List <FdDetailsModel> GetFdDetails(long Accountno)
        {
            FdDataAccess          fdDac        = new FdDataAccess();
            FdDetailsModel        fdModel      = new FdDetailsModel();
            DataSet               ds           = fdDac.ReadDetails(Accountno);
            List <FdDetailsModel> FdDetailList = new List <FdDetailsModel>();

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                FdDetailsModel fObj = new FdDetailsModel();
                fObj.AccountNo = Convert.ToInt64(ds.Tables[0].Rows[i]["account_no"].ToString());

                fObj.DepositId = Convert.ToInt32(ds.Tables[0].Rows[i]["deposit_id"].ToString());

                fObj.FdDate = Convert.ToDateTime(ds.Tables[0].Rows[i]["fd_date"]);

                fObj.FdAmount = Convert.ToInt64(ds.Tables[0].Rows[i]["fd_amount"].ToString());

                fObj.Duration = Convert.ToInt32(ds.Tables[0].Rows[i]["Duration"].ToString());

                fObj.RateOfInterest = Convert.ToDecimal(ds.Tables[0].Rows[i]["rate_of_interest"].ToString());

                fObj.MaturityDate = Convert.ToDateTime(ds.Tables[0].Rows[i]["maturity_date"].ToString());

                fObj.MaturityAmount = Convert.ToInt32(ds.Tables[0].Rows[i]["maturity_amount"].ToString());

                fObj.Nominee = ds.Tables[0].Rows[i]["nominee"].ToString();

                fObj.NomineeRelation = ds.Tables[0].Rows[i]["nominee_relation"].ToString();

                FdDetailList.Add(fObj);
            }

            FdDataAccess.sqlCon.Close();
            return(FdDetailList);
        }