コード例 #1
0
 public async void OnWhatsappCommand(StudentParentDetail guestModel)
 {
     try
     {
         Device.OpenUri(new Uri("whatsapp://send?phone=+91" + guestModel.parentPhoneNo));
     }
     catch (Exception ex)
     {
         await App.Current.MainPage.DisplayAlert("Not Installed", "Whatsapp Not Installed", "ok");
     }
 }
コード例 #2
0
 public async void OnMessageCommand(StudentParentDetail guestModel)
 {
     try
     {
         var message = new SmsMessage("You Have to come to collect refund money", guestModel.parentPhoneNo);
         await Sms.ComposeAsync(message);
     }
     catch (FeatureNotSupportedException ex)
     {
         await App.Current.MainPage.DisplayAlert("Failed", "Sms is not supported on this device.", "OK");
     }
     catch (Exception ex)
     {
         await App.Current.MainPage.DisplayAlert("Failed", ex.Message, "OK");
     }
 }
コード例 #3
0
 public async void OnCallCommand(StudentParentDetail guestModel)
 {
     try
     {
         PhoneDialer.Open(guestModel.parentPhoneNo);
     }
     catch (ArgumentNullException anEx)
     {
         // Number was null or white space
     }
     catch (FeatureNotSupportedException ex)
     {
         // Phone Dialer is not supported on this device.
     }
     catch (Exception ex)
     {
         // Other error has occurred.
     }
 }
コード例 #4
0
        public string FeesPayment(FeesPaymentDetail ObjFeesPaymentDetail)
        {
            PayUResponse ObjPayUResponse = null;
            string       TxnUid          = null;

            ObjPayUResponse = new PayUResponse();
            string PaymentForMonths = ObjFeesPaymentDetail.feesDetail.Select(x => x.ForMonth.ToString()).Aggregate((a, b) => a + "," + b);

            TxnUid = this.accountService.TransactionIdExists(ObjFeesPaymentDetail.ExistingClientUid, PaymentForMonths, 1);
            if (TxnUid != null)
            {
                ObjFeesPaymentDetail.TxnUid      = TxnUid;
                ObjFeesPaymentDetail.TxnIdExists = 1;
            }
            else
            {
                ObjFeesPaymentDetail.TxnIdExists = 0;
                TxnUid = accountService.Generatetxnid();
                if (ObjFeesPaymentDetail != null && ObjFeesPaymentDetail.feesDetail.Count > 0)
                {
                    StudentParentDetail ObjStudentParentDetail = accountService.GetStudentDetailByUid(ObjFeesPaymentDetail.ExistingClientUid);
                    if (ObjStudentParentDetail != null)
                    {
                        ObjFeesPaymentDetail   = accountService.FeesPaymentDataService(ObjFeesPaymentDetail, ObjStudentParentDetail);
                        ObjPayUResponse.txnid  = TxnUid;
                        ObjPayUResponse.amount = ObjFeesPaymentDetail.TotalAmount.ToString();
                        int    FineCode      = ObjFeesPaymentDetail.feesDetail.FirstOrDefault().FineCode;
                        int    FeeCode       = ObjFeesPaymentDetail.feesDetail.FirstOrDefault().FeeCode;
                        string PaymentStatus = accountService.InsertPaymentInformation(ObjPayUResponse, PaymentForMonths, ObjStudentParentDetail.AccedemicStartYear,
                                                                                       ObjFeesPaymentDetail.ExistingClientUid, ObjFeesPaymentDetail.PayeeCode, FeeCode, FineCode);
                    }
                    else
                    {
                        // unable to get parent detail
                    }
                }
            }

            return(JsonConvert.SerializeObject(ObjFeesPaymentDetail));
        }
コード例 #5
0
        public StudentParentDetail GetStudentDetailByUid(string StudentUid)
        {
            StudentParentDetail ObjStudentParentDetail = new StudentParentDetail();
            String ResultSet = null;

            DbParam[] param = new DbParam[]
            {
                new DbParam(StudentUid, typeof(System.String), "_StudentUid"),
                new DbParam(userDetail.schooltenentId, typeof(System.String), "_TenentId")
            };
            DataSet ds = db.GetDataset("sp_ParentDetail_ByStudentUid", param);

            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                ObjStudentParentDetail = userDefineMapping.ConvertToObject(ds.Tables[0], ObjStudentParentDetail.GetType(), out ResultSet) as StudentParentDetail;
                if (ResultSet != "100")
                {
                    return(null);
                }
            }
            return(ObjStudentParentDetail);
        }
コード例 #6
0
        public FeesPaymentDetail FeesPaymentDataService(FeesPaymentDetail ObjFeesPaymentDetail, StudentParentDetail ObjStudentParentDetail)
        {
            Double TotalAmount = 0.0;

            if (!string.IsNullOrEmpty(ObjFeesPaymentDetail.ExistingClientUid))
            {
                if (ObjStudentParentDetail != null)
                {
                    Schoolfeedetails ObjSchoolfeedetails = GetFeeDetailByClassDetailUid(ObjStudentParentDetail.ClassDetailUid);
                    if (ObjSchoolfeedetails != null)
                    {
                        foreach (var Fees in ObjFeesPaymentDetail.feesDetail)
                        {
                            if (ObjSchoolfeedetails.IsFeeChanged)
                            {
                                if (Fees.ForMonth == Convert.ToDateTime(ObjSchoolfeedetails.AffectedDate).Month - 1)
                                {
                                    TotalAmount += ObjSchoolfeedetails.NewAmount;
                                }
                                else
                                {
                                    TotalAmount += ObjSchoolfeedetails.Amount;
                                }
                            }
                            else
                            {
                                TotalAmount += ObjSchoolfeedetails.Amount;
                            }
                        }
                        ObjFeesPaymentDetail.Mobile      = ObjStudentParentDetail.FatherMobileno;
                        ObjFeesPaymentDetail.Email       = ObjStudentParentDetail.Fatheremailid;
                        ObjFeesPaymentDetail.PersonName  = ObjStudentParentDetail.FatherFirstName + " " + ObjStudentParentDetail.FatherLastName;
                        ObjFeesPaymentDetail.TotalAmount = TotalAmount;
                        ObjFeesPaymentDetail.PayeeCode   = 1;
                    }
                }
            }
            return(ObjFeesPaymentDetail);
        }