Beispiel #1
0
 public void AddLeadDetails(Lead_Master Lead)
 {
     _context.Entry(Lead).State = EntityState.Modified;
     //  Role.ModeifiedDate = DateTime.Now;
     int x = _context.SaveChanges();
     // return x == 0 ? false : true;
 }
Beispiel #2
0
        public void AddSubscrption(Lead_Master lead)
        {
            var param = new List <SqlParameter>();

            param.Add(new SqlParameter("@p0", lead.Id));
            param.Add(new SqlParameter("@p1", lead.Status));
            param.Add(new SqlParameter("@p2", lead.AssignTo));
            _context.Database.ExecuteSqlCommand("sp_AddDetailsSubscription @p0, @p1,@p2", parameters: param.ToArray());
        }
        public async Task <bool> AddFreeTrial(Lead_Master lead)
        {
            int x = 0;

            try
            {
                _context.Lead_Master.Add(lead);
                x = await _context.SaveChangesAsync();
            }
            catch (Exception ex)
            {
            }
            return(x == 0 ? false : true);
        }
 private void UpdateLeadStatus(int leadId)
 {
     try
     {
         LeadDAL     db = new LeadDAL();
         Lead_Master lm = new Lead_Master();
         lm        = db.GetLeadList().Where(x => x.Id == leadId).FirstOrDefault();
         lm.Status = "Won";
         db.AddLeadDetails(lm);
     }
     catch (Exception ex)
     {
         throw;
     }
 }
        public async Task <ActionResult> SaveFreeTrialAsync(Lead_Master lead)
        {
            bool result = false;

            try
            {
                lead.IPAddress   = GetIPAddress();
                lead.CreatedDate = DateTime.Now;
                lead.Status      = "New";
                FreeTrialDal Obj = new FreeTrialDal();
                if (ModelState.IsValid) //checking model is valid or not
                {
                    result = await Obj.AddFreeTrial(lead);
                }
            }
            catch (Exception ex)
            {
            }

            return(Json(new { result = result, JsonRequestBehavior.AllowGet }));
        }