Esempio n. 1
0
        //public Owner_Registration NewPassWord(Owner_Registration owner, string Password, string ownerEmail)
        //{
        //    string strcon = ConfigurationManager.ConnectionStrings["MSMSDB"].ConnectionString;
        //    using (SqlConnection con = new SqlConnection(strcon))
        //    {
        //        con.Open();
        //        SqlCommand cmd = new SqlCommand("update Owner_Registration set Password='******' where Owner_Email='" + ownerEmail + "'", con);
        //        cmd.ExecuteNonQuery();
        //        con.Close();
        //    }
        //    return owner;
        //}

        public List <Owner_Registration> OwnerData()
        {
            using (MSMSEntities db = new MSMSEntities())
            {
                return(db.Owner_Registration.ToList());
            }
        }
Esempio n. 2
0
 public Owner_Registration Owner_Login(Owner login)
 {
     using (MSMSEntities db = new MSMSEntities())
     {
         return(db.Owner_Registration.Where(m => m.Owner_Email == login.Owner_Email && m.Password == login.Password).SingleOrDefault());
     }
 }
Esempio n. 3
0
 public Admin CheckLoginUserName(LoginModel log)
 {
     using (MSMSEntities db = new MSMSEntities())
     {
         return(db.Admins.Where(m => m.Admin_ID == log.EmailAddress && m.Phone == log.password).FirstOrDefault());
     }
 }
Esempio n. 4
0
 public List <Store_Registration> StoreData()
 {
     using (MSMSEntities db = new MSMSEntities())
     {
         return(db.Store_Registration.ToList());
     }
 }
Esempio n. 5
0
 public Store_Registration storeRegister(Store_Registration storeRegister)
 {
     using (MSMSEntities db = new MSMSEntities())
     {
         db.Store_Registration.Add(storeRegister);
         db.SaveChanges();
     }
     return(storeRegister);
 }
Esempio n. 6
0
        public List <Owner_Registration> Owner_Email(string ownerEmail)
        {
            List <Owner_Registration> owner = new List <Owner_Registration>();

            using (MSMSEntities db = new MSMSEntities())
            {
                owner = db.Owner_Registration.Where(m => m.Owner_Email == ownerEmail).ToList();
            }
            return(owner);
        }
Esempio n. 7
0
 public Owner_Registration InsertOwnerReg(Owner_Registration owner)
 {
     try
     {
         using (MSMSEntities db = new MSMSEntities())
         {
             db.Owner_Registration.Add(owner);
             db.SaveChanges();
         }
     }
     catch (Exception Ex)
     {
     }
     return(owner);
 }
Esempio n. 8
0
        public List <Owner_Registration> EmailList(string EId)
        {
            List <Owner_Registration> listdepno = new List <Owner_Registration>();

            try
            {
                using (MSMSEntities db = new MSMSEntities())
                {
                    listdepno = db.Owner_Registration.Where(m => m.Owner_Email == EId).ToList();
                }
            }
            catch (Exception Ex)
            {
            }
            return(listdepno);
        }
Esempio n. 9
0
        public List <Store_Registration> Store_List(string value)
        {
            List <Store_Registration> owner = new List <Store_Registration>();

            try
            {
                using (MSMSEntities db = new MSMSEntities())
                {
                    owner = db.Store_Registration.Where(m => m.Owner_Email == value).ToList();
                }
            }
            catch (Exception Ex)
            {
            }
            return(owner);
        }
Esempio n. 10
0
        public List <Owner_Registration> OwnerList()
        {
            List <Owner_Registration> Ownlist = new List <Owner_Registration>();

            try
            {
                using (MSMSEntities db = new MSMSEntities())
                {
                    Ownlist = db.Owner_Registration.ToList();
                }
            }
            catch (Exception Ex)
            {
            }
            return(Ownlist);
        }
Esempio n. 11
0
        public Owner_Registration UpdateOwner(Owner_Registration owner)
        {
            Owner_Registration listUp = new Owner_Registration();

            try
            {
                using (MSMSEntities db = new MSMSEntities())
                {
                    //listUp= db.Entry(owner).State = System.Data.Entity.EntityState.Modified;
                    db.Entry(owner).State = System.Data.Entity.EntityState.Modified;
                    db.SaveChanges();
                }
            }
            catch (Exception Ex)
            {
            }

            return(owner);
        }
 public HttpResponseMessage Store_List(string value)
 {
     try
     {
         using (MSMSEntities db = new MSMSEntities())
         {
             var OwnerGender = ObjBal.Store_List(value);
             if (OwnerGender != null)
             {
                 return(Request.CreateResponse(HttpStatusCode.OK, OwnerGender));
             }
             else
             {
                 return(Request.CreateResponse(HttpStatusCode.NotFound, "Owner are not found in the id called:" + value));
             }
         }
     }
     catch (Exception Ex)
     {
         return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, Ex.Message.ToString()));
     }
 }
Esempio n. 13
0
 public HttpResponseMessage OwnerEmail(string EId)
 {
     try
     {
         using (MSMSEntities db = new MSMSEntities())
         {
             var Owneremail = db.Owner_Registration.ToList();
             if (Owneremail.Count > 0)
             {
                 return(Request.CreateResponse(HttpStatusCode.OK, Owneremail));
             }
             else
             {
                 return(Request.CreateResponse(HttpStatusCode.NotFound, "Record not Found"));
             }
         }
     }
     catch (Exception Ex)
     {
         return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, Ex.Message.ToString()));
     }
 }
Esempio n. 14
0
 public HttpResponseMessage EmpCount()
 {
     try
     {
         using (MSMSEntities db = new MSMSEntities())
         {
             var EmpCount = db.Owner_Registration.Count();
             if (EmpCount != 0)
             {
                 return(Request.CreateResponse(HttpStatusCode.OK, EmpCount));
             }
             else
             {
                 return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Record are not Found"));
             }
         }
     }
     catch (Exception ex)
     {
         return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex.Message.ToString()));
     }
 }