示例#1
0
        public ActionResult ProfileInfo()
        {
            var         data = db.Get_Profile(Convert.ToInt32(Session["UserID"].ToString())).FirstOrDefault();
            ShowProfile obj  = new ShowProfile();

            if (data != null)
            {
                obj.UserID = data.UserID;
                if (data.DateOfBirth == null)
                {
                    obj.DateOfBirth = DateTime.Now;
                }
                else
                {
                    obj.DateOfBirth = data.DateOfBirth.Value;
                }
                var UserProfile = db.UserRegistrations.Where(x => x.UserID == data.UserID).FirstOrDefault();
                obj.Work         = data.IndustryName;
                obj.Gender       = data.GenderName;
                obj.MritalStatus = data.Status;
                obj.RAddress     = data.RAddress;

                obj.FirstName  = UserProfile.FirstName;
                obj.LastName   = UserProfile.LastName;
                obj.MiddleName = UserProfile.MiddleName;
                obj.City       = data.CityName;
                obj.State      = data.StateName;
                obj.Email      = data.Email;
                obj.Mobile     = data.Mobile;
                obj.BloodGroup = data.BloodG;
                obj.MyAppID    = data.MyAppID;

                obj.ImagePath = data.ImagePath;
            }
            else
            {
                int uid = Convert.ToInt32(Session["UserID"].ToString());
                obj.UserID       = Convert.ToInt32(Session["UserID"].ToString());
                obj.DateOfBirth  = DateTime.Now;
                obj.Work         = "";
                obj.Gender       = "";
                obj.MritalStatus = "";
                obj.RAddress     = "";
                var UserProfile = db.UserRegistrations.Where(x => x.UserID == data.UserID).FirstOrDefault();

                obj.FirstName  = UserProfile.FirstName;
                obj.LastName   = UserProfile.LastName;
                obj.MiddleName = UserProfile.MiddleName;
                obj.City       = db.Cities.Where(x => x.CityID == UserProfile.CityID).FirstOrDefault().CityName;
                obj.Email      = db.UserRegistrations.Where(x => x.UserID == uid).FirstOrDefault().Email;
                obj.Mobile     = db.UserRegistrations.Where(x => x.UserID == uid).FirstOrDefault().Mobile;
                obj.BloodGroup = "Not Available";
                obj.ImagePath  = "/Images/Photo.jpg";
            }



            return(PartialView("_ucProfile", obj));
        }
 public IActionResult PaymentTransfer(ShowProfile inputReq)
 {
     try
     {
         var    sessionUtility = new SessionUtility();
         string errorMessage   = string.Empty;
         var    req            = new {
             payerMobileNumber      = sessionUtility.GetLoginSession().mobileNumber,
             payeeMobileNumber      = Convert.ToInt64(sessionUtility.GetStringSession("PayeeMobileNo")),
             transferAmount         = Convert.ToInt64(sessionUtility.GetStringSession("PayeeAmount")),
             transferType           = 0,
             transactionRequestedBy = sessionUtility.GetLoginSession().customerId,
             serviceChannelId       = 1,
             transactionRemarks     = inputReq.Remarks
         };
         var response = new CallService().PostResponse <string>("PaymentTransfer", req, ref errorMessage);
         if (string.IsNullOrEmpty(errorMessage))
         {
             var ackResp = new PaymentTransferAck
             {
                 PayeeMobileNumber = sessionUtility.GetStringSession("PayeeMobileNo"),
                 PayeeWalletBal    = Convert.ToString(new WalletDetails().GetBalanceByCustomerID(sessionUtility.GetStringSession("PayeeCustomerID"))),
                 Amount            = sessionUtility.GetStringSession("PayeeAmount"),
                 PayeeName         = sessionUtility.GetStringSession("PayeeName"),
                 StatusId          = 1,
                 Status            = "Successfully Transferred."
             };
             return(PartialView("AckView", ackResp));
         }
         else
         {
             var ackResp = new PaymentTransferAck
             {
                 PayeeMobileNumber = sessionUtility.GetStringSession("PayeeMobileNo"),
                 PayeeWalletBal    = Convert.ToString(new WalletDetails().GetBalanceByCustomerID(sessionUtility.GetStringSession("PayeeCustomerID"))),
                 Amount            = sessionUtility.GetStringSession("PayeeAmount"),
                 PayeeName         = sessionUtility.GetStringSession("PayeeName"),
                 StatusId          = 0,
                 Status            = errorMessage
             };
             return(PartialView("AckView", ackResp));
         }
     }
     catch (Exception ex)
     {
         return(Json(new { success = false, errorMessage = ex.Message }));
     }
 }
示例#3
0
 public IActionResult TransferStock(ShowProfile input)
 {
     try
     {
         var    sessionUtility = new SessionUtility();
         string errorMessage   = string.Empty;
         var    req            = new {
             parentMobileNumber = sessionUtility.GetLoginSession().mobileNumber,
             childMobileNumber  = Convert.ToInt64(sessionUtility.GetStringSession("PayeeMobileNo")),
             stockTypeId        = Convert.ToInt32(sessionUtility.GetStringSession("StockTypeId")),
             stockCount         = Convert.ToInt32(sessionUtility.GetStringSession("PayeeNumberOfStock")),
             tpin = new PasswordHash().HashShA1(input.TPIN)//input.TPIN // new PasswordHash().HashShA1(input.TPIN)
         };
         var response = new CallService().PostResponse <string>("putCustomerStockTransafer", req, ref errorMessage);
         var resp     = new PaymentManagement.Models.PaymentTransferAck()
         {
             PayeeMobileNumber = sessionUtility.GetStringSession("PayeeMobileNo"),
             PayeeName         = sessionUtility.GetStringSession("PayeeName"),
             Amount            = sessionUtility.GetStringSession("PayeeNumberOfStock"),
             PayeeWalletBal    = Convert.ToString(new PayInc_Customer_web.Models.WalletDetails().GetBalanceByCustomerID(sessionUtility.GetStringSession("PayeeCustomerID"))),
         };
         if (string.IsNullOrEmpty(errorMessage))
         {
             resp.Status   = "Stock transferred.";
             resp.StatusId = 1;
         }
         else
         {
             resp.Status   = errorMessage;
             resp.StatusId = 0;
         }
         return(PartialView("AckView", resp));
     }
     catch (Exception)
     {
     }
     return(PartialView("AckView"));
 }
        public ActionResult DisplaySearch(string id)
        {
            var         data = db.SPQuickSearch(id).FirstOrDefault();
            ShowProfile obj  = new ShowProfile();

            if (data != null)
            {
                obj.UserID = data.UserID.Value;
                if (data.DateOfBirth == null)
                {
                    obj.DateOfBirth = DateTime.Now;
                }
                else
                {
                    obj.DateOfBirth = data.DateOfBirth.Value;
                }

                var UserProfile = db.UserRegistrations.Where(x => x.UserID == data.UserID).FirstOrDefault();
                obj.Work         = data.IndustryName;
                obj.Gender       = data.GenderName;
                obj.MritalStatus = data.Status;
                obj.RAddress     = data.RAddress;
                obj.FirstName    = UserProfile.FirstName;
                obj.LastName     = UserProfile.LastName;
                obj.MiddleName   = UserProfile.MiddleName;
                obj.City         = data.City;
                obj.Email        = data.Email;
                obj.Mobile       = data.Mobile;
                obj.BloodGroup   = data.BloodG;
                obj.MyAppID      = data.MyAppID;

                obj.ImagePath = data.ImagePath;
            }

            return(PartialView("ucSearch", obj));
        }
示例#5
0
 void OnGUI()
 {
     ShowProfile.OnGUI();
 }
示例#6
0
 void FixedUpdate()
 {
     ShowProfile.FixedUpdate();
 }
示例#7
0
 void Update()
 {
     ShowProfile.Update();
 }
示例#8
0
 public virtual void Visit(ShowProfile node)
 {
     VisitInternal(node.ForQuery);
     VisitInternal(node.Limit);
 }
示例#9
0
 public void Execute(object parameter)
 {
     ShowProfile?.Invoke(this, new EventArgs());
     //CurrentVM.ProfileCommand_ShowProfile();
     //this.CurrentVM.Operation(2);
 }
示例#10
0
 public void Visit(ShowProfile node)
 {
 }