예제 #1
0
        //[ValidateAntiForgeryToken]
        public ActionResult Fee_Std(int RegNo)
        {
            FeeForm feeForm = new FeeForm();

            if (RegNo != 0)
            {
                try
                {
                    using (HttpClient client = new HttpClient())
                    {
                        client.BaseAddress = new Uri(GloVar.iBaseURI);
                        MediaTypeWithQualityHeaderValue contentType = new MediaTypeWithQualityHeaderValue("application/json");
                        client.DefaultRequestHeaders.Accept.Add(contentType);
                        string stringData            = JsonConvert.SerializeObject(RegNo);
                        var    contentData           = new StringContent(stringData, System.Text.Encoding.UTF8, "application/json");
                        HttpResponseMessage response = client.GetAsync("/api/FeeForms/" + RegNo + "?dSess=" + dSess + "&mdBID=" + mdBId).Result;
                        stringData = response.Content.ReadAsStringAsync().Result;
                        feeForm    = JsonConvert.DeserializeObject <FeeForm>(stringData);
                    }
                }
                catch (HttpRequestException)
                {
                }
            }
            return(View(feeForm));
        }
예제 #2
0
        public ActionResult Trans_Fee_Summ(FeeForm feeForm)
        {
            try
            {
                // TODO: Add insert logic here

                return(RedirectToAction("..//FeeSumm/Details", feeForm));
            }
            catch
            {
                return(View());
            }
        }
예제 #3
0
        public async Task <IActionResult> GetReceipt(int fRegNo, int feeNo, string dSess, int mdBId)//, int feeNo
        {
            //if (!ModelState.IsValid)
            //{
            //    return BadRequest(ModelState);
            //}
            FeeForm feeForm = await getStdDetails(_context, fRegNo, dSess, mdBId);

            List <ReceiptDetails> recDets = new List <ReceiptDetails>();

            Receipt receipt = new Receipt
            {
                RegNo       = fRegNo,
                UniReg      = feeForm.UniReg,
                StdName     = feeForm.StdName,
                Clss        = feeForm.Clss,
                RollNo      = feeForm.RollNo,
                ReceiptDate = DateTime.Now,
                StdCat      = feeForm.StdCat,
                ForPeriod   = feeNo,
                AcaSession  = dSess,
                DBid        = mdBId,
                RecDetails  = recDets
            };

            //Receipt receiptX = new Receipt();
            receipt = await getFeeDetail(_context, receipt, dSess, mdBId);

            //var receipt = await _context.Receipt.SingleOrDefaultAsync(m => m.AutoId == feeNo );

            if (receipt == null)
            {
                return(NotFound());
            }

            return(Ok(receipt));
        }
예제 #4
0
 // GET: FeeSumm/Details/5
 public ActionResult Details(FeeForm feeForm)
 {
     return(View(feeForm));
 }
예제 #5
0
 // GET: FeeSumm
 public ActionResult Index(FeeForm feeForm)
 {
     return(View());
 }
예제 #6
0
        public async Task <FeeForm> GetAsync([FromRoute] int regNum, string dSess, int mdBId)
        {
            FeeForm feeForm = await getStdDetails(_context, regNum, dSess, mdBId);

            return(feeForm);
        }