public ActionResult Create(BONDAPPLICATION bONDAPPLICATION)

        {
            var appScripts = Session["appScript"] as List <APPSCRIPT>;

            db.APPSCRIPTs.AddRange(appScripts);
            db.BONDAPPLICATIONs.Add(bONDAPPLICATION);

            db.SaveChanges();
            Session["appScript"] = null;
            return(RedirectToAction("Succesfull"));
        }
        public ActionResult Create(RATEINFO rateinfo)
        {
            try
            {
                // TODO: Add insert logic here
                if (rateinfo != null)
                {
                    RATEINFO _rateinfo = new RATEINFO {
                        RDATE = (DateTime)rateinfo.ENTRYDATE
                    };
                    _rateinfo.CURRCODE  = rateinfo.CURRCODE;
                    _rateinfo.ENTRYDATE = rateinfo.ENTRYDATE;
                    _rateinfo.RATEAMT   = rateinfo.RATEAMT;

                    _context.RATEINFOes.Add(_rateinfo);
                    _context.SaveChanges();
                }

                return(RedirectToAction("CurrencyRateList"));
            }
            catch
            {
                return(View());
            }
        }
        public ActionResult Create(BONDINFO bondinfo)
        {
            try
            {
                // TODO: Add insert logic here

                _context.BONDINFOes.Add(bondinfo);
                _context.SaveChanges();
                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }
Esempio n. 4
0
        public ActionResult Create(FcAccountInfoViewModel add)
        {
            try
            {
                FCACCOUNT_INFO info = new FCACCOUNT_INFO
                {
                    FCACADD     = add.FCACADD,
                    FCACNAME    = add.FCACNAME,
                    FCACCOUNTNO = add.AccountType + " " + add.FCACCOUNTNO,
                    FCACPHONE   = add.FCACPHONE
                };

                // TODO: Add insert logic here
                _context.FCACCOUNT_INFO.Add(info);
                _context.SaveChanges();

                return(RedirectToAction("Create"));
            }
            catch
            {
                return(View());
            }
        }
        public ActionResult Create(FormCollection application)
        {
            BENEFICIARY _beneficiary = new BENEFICIARY()
            {
                //BONDSCN = application[2],//bond applicaiton no
                BENNAME  = application[38],              //beneficiary name
                BENFNAME = application[39],              //beneficiary fathers name
                BENMNAME = application[40],              //beneficiary mothers name
                BENDOB   = application[42].AsDateTime(), //beneficiary dateofbirth
                BENADDR  = application[41],              //beneficiary address
            };

            BONDAPPLICATION _bondapplication = new BONDAPPLICATION()
            {
                BONDCODE      = application[1],
                BONDSCN       = application[2],//bond applicaiton no===SHOULD BE USED IN MULTIPLE PLACE
                FILENO        = application[3].AsInt(),
                SCNDATE       = application[4].AsDateTime(),
                REINVDATE     = application[5].AsDateTime(),
                RESPONDDATE   = application[6].AsDateTime(),
                FBRCODE       = application[7],                 //issueing branch
                TOTALSCRIPT   = (short?)application[8].AsInt(), //total script
                BUYFNAME      = application[9],                 //buyer first name
                BUYMNAME      = application[10],                //buyier middle name
                BUYLNAME      = application[11],                //buyer lastname
                DOB           = application[12].AsDateTime(),   //buyer date of birth
                SEX           = application[13],                //sex
                DESIG         = application[14],                //designation
                COMNAME       = application[15],                //organisation
                COMADDR       = application[16],                //company address
                ABOARDADDR    = application[17],                //foreign address
                CNTYCODE      = application[18],                //country code
                LOCALADDR     = application[19],                //local address
                LOCALDIST     = application[20],                //district code
                LOCALTHANA    = application[21],                //thana
                PASSPORTNO    = application[22],                //passport no
                ISSUEPLACE    = application[23],                //passport issue place
                PASSISSUEDATE = application[24].AsDateTime(),   //passport issue date
                PAYMODE       = application[25],                //payment mode
                FCACNO        = application[26],                //fc account no
                FCBRCODE      = application[27],                //fc ac branch
                CURRCODE      = application[28],                //currency code
                VALUEDATE     = application[29].AsDateTime(),   //value date
                EXRATE        = application[30].AsDecimal(),    //currency rate
                AMOUNTFC      = application[31].AsDecimal(),    //amount in fc
                AMOUNTCR      = application[32].AsDecimal(),    // amount for credit
                FDDNO         = application[33],                //demand draft
                EXBANKCODE    = application[34],                //exbankcode or bank
                REMARKS       = application[35],                // remarks
                                                                //===================================BENEFICIARY======================================
                                                                //===================================OTHERS INFO======================================
                FNAME = application[36],                        //others fathersname
                MNAME = application[37],                        //others mothersname
                //APPSCRIPTs = Session["appScript"] as List<APPSCRIPT>,
                //BENEFICIARY = _beneficiary
            };

            //===============================BOND HOLDERS INFO========================================

            //==========================BOND SCRIPT======================================================
            //read the session
            //var appScript = Session["appScript"] as List<APPSCRIPT>;


            //add and save
            _context.BONDAPPLICATIONs.Add(_bondapplication);
            _context.SaveChanges();
            //_context.BENEFICIARies.Add(_beneficiary);
            //_context.SaveChanges();
            //_context.APPSCRIPTs.AddRange(appScript);
            //_context.SaveChanges();

            //clear the session appScript
            Session["appScript"] = null;

            return(RedirectToAction("NewApplication"));
        }