public bool UpdateSellerAccount(BidderEL objBidderEL, out string Responcetxt) { ProcedureExecute proc; bool Res = false; string strError = string.Empty; try { using (proc = new ProcedureExecute("prcBidder")) { proc.AddVarcharPara("@Action", 100, "UpdateSellerAccount"); proc.AddVarcharPara("@PreferredName", 200, objBidderEL.PreferredName); proc.AddVarcharPara("@Telephone", 50, objBidderEL.Telephone); proc.AddVarcharPara("@Country", 50, objBidderEL.Country); proc.AddVarcharPara("@TimeZone", 50, objBidderEL.TimeZone); proc.AddIntegerPara("@SellerId", objBidderEL.BidderId); proc.AddNVarcharPara("@ReturnValue", 500, objBidderEL.ReturnValue, QueryParameterDirection.Output); int i = proc.RunActionQuery(); if (i > 0) { Res = true; //objBidderEL.BidderId = Convert.ToInt32(proc.GetParaValue("@ReturnValue")); strError = "Successfully Updated."; } else { strError = Convert.ToString(proc.GetParaValue("@ReturnValue")); } Responcetxt = strError; return(Res); } } catch (Exception ex) { throw ex; } finally { proc = null; } }
protected void btnCreateAcc_Click(object sender, EventArgs e) { BidderEL objBidderEL = new BidderEL(); BidderBL objBidderBL = new BidderBL(); //BidderCardDetailEL objBidderCardEL = new BidderCardDetailEL(); string Responsetxt = string.Empty; objBidderEL.Email = txtEmail.Text; objBidderEL.Password = txtPassword.Text; objBidderEL.FirstName = firstName.Text; objBidderEL.LastName = lastName.Text; objBidderEL.Address = address1.Text; objBidderEL.City = town.Text; objBidderEL.PinCode = postcode.Text; objBidderEL.Telephone = telephone.Text; objBidderEL.CardExpiryMonth = Convert.ToInt32(ExpMonth.Text); objBidderEL.CardExpiryYear = Convert.ToInt32(ExpYear.Text); objBidderEL.CardStartMonth = Convert.ToInt32(startingMonth.Text); objBidderEL.CardStartYear = Convert.ToInt32(startingYear.Text); objBidderEL.CardHolderName = cardHolderName.Text; objBidderEL.CardNo = cardNo.Text; objBidderEL.SecurityCode = cvv.Text; objBidderEL.CardBillingAddress1 = address1.Text;; //objBidderEL.UserType = rdbtnlistUserType.SelectedValue; objBidderEL.UserType = "1"; if (chkAgree.Checked) { if (objBidderBL.BidderSignUp(objBidderEL, out Responsetxt)) { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "ScriptRegistration", "trG('" + Responsetxt + "');", true); } else { //lblMsg.ForeColor = System.Drawing.Color.Red; //lblMsg.Text = Responsetxt; ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "ScriptRegistration", "trR('" + Responsetxt + "');", true); } } else { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "ScriptRegistration", "trR('Please check read and agree checkbox');", true); } }
public bool BidderSignUp(BidderEL objBidderEL, out string Responcetxt) { //BidderCardDetailEL BidderCardDetailEL=new BidderCardDetailEL(); ProcedureExecute proc; bool Res = false; string strError = string.Empty; try { using (proc = new ProcedureExecute("prcBidder")) { proc.AddVarcharPara("@Action", 100, "BidderSellerSignUp"); proc.AddVarcharPara("@Email", 200, objBidderEL.Email); proc.AddVarcharPara("@Password", 200, objBidderEL.Password); proc.AddVarcharPara("@FirstName", 200, objBidderEL.FirstName); proc.AddVarcharPara("@LastName", 200, objBidderEL.LastName); proc.AddVarcharPara("@Telephone", 200, objBidderEL.Telephone); proc.AddVarcharPara("@Address", 200, objBidderEL.Address); proc.AddVarcharPara("@City", 200, objBidderEL.City); proc.AddVarcharPara("@Country", 200, objBidderEL.Country); proc.AddVarcharPara("@PinCode", 200, objBidderEL.PinCode); proc.AddVarcharPara("@UserType", 200, objBidderEL.UserType); proc.AddNVarcharPara("@ReturnValue", 500, objBidderEL.ReturnValue, QueryParameterDirection.Output); proc.AddVarcharPara("@CardType", 200, objBidderEL.CardType); proc.AddVarcharPara("@CardNo", 200, objBidderEL.CardNo); proc.AddIntegerPara("@CardStartMonth", objBidderEL.CardStartMonth); proc.AddIntegerPara("@CardStartYear", objBidderEL.CardStartYear); proc.AddIntegerPara("@CardExpiryMonth", objBidderEL.CardExpiryMonth); proc.AddIntegerPara("@CardExpiryYear", objBidderEL.CardExpiryYear); proc.AddVarcharPara("@SecurityCode", 200, objBidderEL.SecurityCode); proc.AddVarcharPara("@CardNickName", 200, objBidderEL.CardNickName); proc.AddVarcharPara("@CardHolderName", 200, objBidderEL.CardHolderName); proc.AddVarcharPara("@CardBillingAddress1", 200, objBidderEL.CardBillingAddress1); proc.AddVarcharPara("@CardBillingAddress2", 200, objBidderEL.CardBillingAddress2); proc.AddVarcharPara("@CardBillingCity", 200, objBidderEL.City); proc.AddVarcharPara("@CardBillingCountry", 200, objBidderEL.Country); proc.AddVarcharPara("@CardBillingState", 200, objBidderEL.CardBillingState); proc.AddVarcharPara("@CardBillingZipCode", 200, objBidderEL.CardBillingZipCode); proc.AddVarcharPara("@CreatedBy", 200, objBidderEL.CreatedBy); proc.AddIntegerPara("@UpdatedBy", objBidderEL.UpdatedBy); proc.AddVarcharPara("@IpAddress", 200, objBidderEL.IpAddress); int i = proc.RunActionQuery(); if (i > 0) { Res = true; objBidderEL.BidderId = Convert.ToInt32(proc.GetParaValue("@ReturnValue")); strError = "Successfully Registered."; } else { strError = Convert.ToString(proc.GetParaValue("@ReturnValue")); } Responcetxt = strError; return(Res); } } catch (Exception ex) { throw ex; } finally { proc = null; } }