Example #1
0
        static void Main(string[] args)
        {
            BidderBL objbidderbl = new BidderBL(log);

            try
            {
                ConnectionHelper     crmConnection       = new ConnectionHelper();
                IOrganizationService organizationService = crmConnection.CRMConnect();
                Console.WriteLine("Connected to Organization URI - " + System.Configuration.ConfigurationManager.AppSettings["OrgServiceUri"]);
                Console.WriteLine("Enter 'y' to continue");
                string confirm = Console.ReadLine();
                if (confirm.Equals("y", StringComparison.CurrentCultureIgnoreCase))
                {
                    EntityCollection ec_bidders = objbidderbl.GetActiveRecords(organizationService);
                    log.Information("Total Active Bidder Records = " + ec_bidders.Entities.Count() + "\n");
                    Bidder bidder = objbidderbl.ProcessDuplicates(organizationService, ec_bidders);
                    Console.WriteLine("Process completed");
                }
                //else
                //{
                //    Console.WriteLine("");
                //}
                Console.ReadLine();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #2
0
        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);
            }
        }