protected void btnSubmit_Click(object sender, EventArgs e)
        {
            try
            {
                ClsLotteryClaimDetails objClsLotteryClaimDetails = new ClsLotteryClaimDetails();
                if (IsValidEntry() == false)
                {
                    return;
                }                                       //Check for valid data entry
                objClsLotteryClaimDetails.UserId               = "Anonymous";
                objClsLotteryClaimDetails.IpAdd                = Request.UserHostAddress;
                objClsLotteryClaimDetails.LotteryId            = Convert.ToInt64(ddlLotteryName.SelectedValue);
                objClsLotteryClaimDetails.LotteryTypeId        = Convert.ToInt64(ddlLotteryType.SelectedValue);
                objClsLotteryClaimDetails.DataUniqueId         = hdUniqueId.Value;
                objClsLotteryClaimDetails.MobileNo             = txtMobileNo.Text.Trim();
                objClsLotteryClaimDetails.EmailId              = txtEmailId.Text.Trim();
                objClsLotteryClaimDetails.LotteryNo            = txtLotteryNo.Text.Trim();
                objClsLotteryClaimDetails.ClaimType            = ((ClsLotteryClaimDetails)Session["LotteryClaimDetails"]).ClaimType;
                objClsLotteryClaimDetails.Name                 = txtName.Text.Trim();
                objClsLotteryClaimDetails.ProprietorOf         = (txtProprietorOf.Text.Trim() == ""?"":txtProprietorOf.Text.Trim());
                objClsLotteryClaimDetails.SoDoWo               = (txtSoDoWo.Text.Trim() == "" ? "" : txtSoDoWo.Text.Trim());
                objClsLotteryClaimDetails.Surety               = (txtSurety.Text.Trim() == "" ? "" : txtSurety.Text.Trim());
                objClsLotteryClaimDetails.FatherOrGuardianName = txtFatherOrGuardianName.Text.Trim();
                objClsLotteryClaimDetails.Address              = txtAddress.Text.Trim();
                objClsLotteryClaimDetails.AadharNo             = txtAadharNo.Text.Trim();
                objClsLotteryClaimDetails.PanNo                = txtPanCard.Text.Trim();
                objClsLotteryClaimDetails.BankName             = txtBankName.Text.Trim();
                objClsLotteryClaimDetails.BankAccountNo        = txtBankAccountNo.Text.Trim();
                objClsLotteryClaimDetails.IFSCCode             = txtIFSCCode.Text.Trim();
                objClsLotteryClaimDetails.Pan       = new byte[0];
                objClsLotteryClaimDetails.Aadhar    = new byte[0];
                objClsLotteryClaimDetails.BankDtl   = new byte[0];
                objClsLotteryClaimDetails.PwtTicket = new byte[0];

                objClsLotteryClaimDetails.Captcha = ((ClsLotteryClaimDetails)Session["LotteryClaimDetails"]).Captcha;
                objClsLotteryClaimDetails.OTP     = ((ClsLotteryClaimDetails)Session["LotteryClaimDetails"]).OTP;
                objClsLotteryClaimDetails.Pan     = ((ClsLotteryClaimDetails)Session["LotteryClaimDetails"]).Pan;
                objClsLotteryClaimDetails.Aadhar  = ((ClsLotteryClaimDetails)Session["LotteryClaimDetails"]).Aadhar;
                objClsLotteryClaimDetails.BankDtl = ((ClsLotteryClaimDetails)Session["LotteryClaimDetails"]).BankDtl;
                objClsLotteryClaimDetails.Photo   = ((ClsLotteryClaimDetails)Session["LotteryClaimDetails"]).Photo;
                if (((ClsLotteryClaimDetails)Session["LotteryClaimDetails"]).ClaimType.ToString() == "1")
                {
                    objClsLotteryClaimDetails.PwtTicket = ((ClsLotteryClaimDetails)Session["LotteryClaimDetails"]).PwtTicket;
                }
                string TransactionNo = "";
                bool   IsAdded       = objLtmsService.InserInLotteryClaimEntry(objClsLotteryClaimDetails, out TransactionNo);
                if (IsAdded == true)
                {
                    btnConfirm.Visible             = false;
                    btnClose.Visible               = true;
                    Session["LotteryClaimDetails"] = null;
                    Session["ApplicationId"]       = TransactionNo;
                    Response.Redirect("TrxLotteryClaimEntryPrint.aspx", false);
                }
            }
            catch (Exception Ex)
            {
                objValidateData.SaveSystemErrorLog(Ex, Request.UserHostAddress);
                var message = new JavaScriptSerializer().Serialize("Some Error has occurred while performing your activity. Please contact the System Administrator for further assistance.");
                var script  = string.Format("alert({0});", message);
                ScriptManager.RegisterClientScriptBlock(this, GetType(), "", script, true);
            }
        }
Example #2
0
 public bool InserInLotteryClaimEntry(ClsLotteryClaimDetails objClsLotteryClaimDetails, out string TransactionNo)
 {
     return(objBusinessLogicDbTrx.InserInLotteryClaimEntry(objClsLotteryClaimDetails, out TransactionNo));
 }