Exemplo n.º 1
0
 private void LoadRemitance()
 {
     remittance = svc.GetRemitanceByTransID(transID);
     if (remittance.RemittanceID == 0)
     {
         ChallanAmount.Text = challanAmt.ToString();
         ChallanDate.Text   = DateTime.Now.Date.ToString();
         //  upload.Visibility = Visibility.Hidden;
     }
     else
     {
         // upload.Visibility = Visibility.Visible;
         ChallanDate.Text      = remittance.ChallanDate.ToString();
         ChallanNo.Text        = remittance.ChallanID;
         AknowledgementNo.Text = remittance.ChallanAckNo;
         ChallanAmount.Text    = remittance.ChallanAmount.ToString();
         // CustomerPropertyFileDto customerPropertyFileDto= svc.GetFile(remittance.ChallanFileID.ToString());
         CustomerPropertyFileDto customerPropertyFileDto = svc.GetFile(remittance.ChallanBlobID.ToString());
         if (customerPropertyFileDto != null)
         {
             FileNameLabel.Content = customerPropertyFileDto.FileName;
             upload.IsEnabled      = false;
         }
     }
 }
Exemplo n.º 2
0
        public int SaveRemittance(RemittanceDto remittanceDto)
        {
            HttpResponseMessage response = new HttpResponseMessage();
            bool isNew = remittanceDto.RemittanceID == 0;

            //var json = JsonConvert.SerializeObject(remittanceDto);
            //var data = new StringContent(json, Encoding.UTF8, "application/json");

            CreateRemittaneCommand createRemittaneCommand = new CreateRemittaneCommand();

            createRemittaneCommand.remittanceDto = remittanceDto;

            if (isNew)
            {
                response = client.PostAsJsonAsync("TdsRemittance", createRemittaneCommand).Result;
            }
            else
            {
                response = client.PutAsJsonAsync("TdsRemittance", createRemittaneCommand).Result;
            }

            if (response.IsSuccessStatusCode)
            {
                if (isNew)
                {
                    return(response.Content.ReadAsAsync <int>().Result);
                }

                return(remittanceDto.RemittanceID);
            }
            return(0);
        }
Exemplo n.º 3
0
        private void LoadRemitance()
        {
            remittance = svc.GetRemitanceByTransID(tdsRemittanceDto.ClientPaymentTransactionID);

            if (remittance.F16BDateOfReq == null)
            {
                RequestDate.Text = DateTime.Now.Date.ToString();
            }
            else
            {
                RequestDate.Text = remittance.F16BDateOfReq.ToString();
            }

            //  upload.Visibility = Visibility.Visible;

            customerPan.Text = remittance.CustomerPAN;
            dateOfBirth.Text = remittance.DateOfBirth.ToString("ddMMyyyy");
            if (remittance.F16BRequestNo != "")
            {
                RequestNo.Text = remittance.F16BRequestNo;
            }
            else
            {
                RequestNo.Text = requestNo;
            }

            CertificateNo.Text = remittance.F16BCertificateNo;

            if (remittance.F16CreditedAmount != null)
            {
                PaidAmount.Text = remittance.F16CreditedAmount.ToString();
            }
            if (remittance.F16CustName != null)
            {
                CustomerName.Text = remittance.F16CustName;
            }
            if (remittance.F16UpdateDate != null)
            {
                UpdatedDate.Text = remittance.F16UpdateDate.Value.ToString("dd-MMM-yyyy");
            }

            customerPropertyFileDto = svc.GetFile(remittance.Form16BlobID.ToString());
            if (customerPropertyFileDto != null)
            {
                FileNameLabel.Content = customerPropertyFileDto.FileName;
                //  upload.IsEnabled = false;
            }
            else
            {
                download.Visibility = Visibility.Hidden;
            }
        }
Exemplo n.º 4
0
        public RemittanceDto GetRemitanceByTransID(int clientPaymentTransactionID)
        {
            RemittanceDto       remittanceDto = null;
            HttpResponseMessage response      = new HttpResponseMessage();

            response = client.GetAsync("TdsRemittance/getRemittance/" + clientPaymentTransactionID).Result;

            if (response.IsSuccessStatusCode)
            {
                remittanceDto = response.Content.ReadAsAsync <RemittanceDto>().Result;
            }
            return(remittanceDto);
        }