Пример #1
0
        //public List<clsRole> GetRoles()
        //{
        //    using (var maincontext = new Entity.ShoppingEntities())
        //    {
        //        var objgetRoles = maincontext.Web_Roles().ToList();
        //        List<clsRole> lstRoles = new List<clsRole>();

        //        if (objgetRoles.Count() > 0)
        //        {
        //            foreach (var Roles in objgetRoles)
        //            {
        //                clsRole objRolesDetails = new clsRole();
        //                objRolesDetails.RoleId = Roles.id;
        //                objRolesDetails.Role = Roles.Role;
        //                lstRoles.Add(objRolesDetails);
        //            }

        //            return lstRoles;
        //        }

        //        return lstRoles;
        //    }
        //}
        public int ApproveRefuse(clsFoundedPeople objFoundedPeople)
        {
            using (var maincontext = new Entity.LostAndFindEntities())
            {
                var obj = new Entity.tblUplodedFindPeople();
                //var obj = maincontext.tblPractices.FirstOrDefault();
                if (obj != null)
                {
                    if (objFoundedPeople.Id > 0)
                    {
                        var id       = objFoundedPeople.Id;
                        var objspeci = new Entity.tblUplodedFindPeople();
                        objspeci            = maincontext.tblUplodedFindPeoples.Single(a => a.id == id);
                        objspeci.IsApproved = objFoundedPeople.IsApproved;
                        maincontext.SaveChanges();
                        return(1);
                    }
                    else
                    {
                        return(1);
                    }
                }
                else
                {
                    return(0);
                }
            }
        }
Пример #2
0
        public List <clsQuestionAnswer> GetQuestionAnswer()
        {
            using (var maincontext = new Entity.LostAndFindEntities())
            {
                List <clsQuestionAnswer> lstQuestionsAns = new List <clsQuestionAnswer>();
                var objgetobjQuestionsAnsDetail          = maincontext.Web_GetAllQuestions().ToList();
                if (objgetobjQuestionsAnsDetail.Count() > 0)
                {
                    foreach (var QuestionsAnsDetail in objgetobjQuestionsAnsDetail)
                    {
                        clsQuestionAnswer objQuestionsAns = new clsQuestionAnswer();
                        objQuestionsAns.Question      = QuestionsAnsDetail.Question;
                        objQuestionsAns.OptionA       = QuestionsAnsDetail.OptionA;
                        objQuestionsAns.OptionB       = QuestionsAnsDetail.OptionB;
                        objQuestionsAns.OptionC       = QuestionsAnsDetail.OptionC;
                        objQuestionsAns.OptionD       = QuestionsAnsDetail.OptionD;
                        objQuestionsAns.Answer        = QuestionsAnsDetail.Answer;
                        objQuestionsAns.CorrectOption = QuestionsAnsDetail.CorrectOption;
                        objQuestionsAns.IsActive      = QuestionsAnsDetail.IsActive;
                        objQuestionsAns.Id            = QuestionsAnsDetail.id;
                        //  objQuestionsAns.
                        lstQuestionsAns.Add(objQuestionsAns);
                    }

                    return(lstQuestionsAns);
                }

                return(lstQuestionsAns);
            }
        }
Пример #3
0
 public int SaveFoundPeolpeDetail(clsFoundedPeople objfoundedppl)
 {
     using (var maincontext = new Entity.LostAndFindEntities())
     {
         var db_Result = maincontext.Web_SaveFindpeopleDetail(0, objfoundedppl.FirstName, objfoundedppl.LastName,
                                                              objfoundedppl.FindPeopleImage, objfoundedppl.Latitude, objfoundedppl.Longitude, objfoundedppl.EmailId, objfoundedppl.Phone, objfoundedppl.IsActive, objfoundedppl.IsApproved, objfoundedppl.UserId.ToString(), objfoundedppl.Address, objfoundedppl.FullAddress, objfoundedppl.City, objfoundedppl.State, objfoundedppl.Country, objfoundedppl.Pincode, objfoundedppl.LostOrFound).FirstOrDefault();
         return(1);
         //return db_Result.UserResult;
     }
 }
Пример #4
0
        public List <clsFoundedPeople> GetFoundedPeople(int Id)
        {
            using (var maincontext = new Entity.LostAndFindEntities())
            {
                List <clsFoundedPeople> lstFoundedPeople = new List <clsFoundedPeople>();
                var objgetFindpeopleDetail = maincontext.Web_GetFindpeopleDetail(Id).ToList();
                if (objgetFindpeopleDetail.Count() > 0)
                {
                    foreach (var FindpeopleDetail in objgetFindpeopleDetail)
                    {
                        clsFoundedPeople objpeopleDetail = new clsFoundedPeople();
                        objpeopleDetail.FirstName       = FindpeopleDetail.FirstName;
                        objpeopleDetail.LastName        = FindpeopleDetail.LastName;
                        objpeopleDetail.EmailId         = FindpeopleDetail.EmailId;
                        objpeopleDetail.FindPeopleImage = FindpeopleDetail.FindPeopleImage;
                        objpeopleDetail.Phone           = FindpeopleDetail.Phone;
                        objpeopleDetail.Latitude        = FindpeopleDetail.Latitude;
                        objpeopleDetail.Longitude       = FindpeopleDetail.Longitude;
                        objpeopleDetail.IsActive        = FindpeopleDetail.IsActive;
                        objpeopleDetail.IsApproved      = FindpeopleDetail.IsApproved;
                        objpeopleDetail.Address         = FindpeopleDetail.Address;
                        objpeopleDetail.Id          = FindpeopleDetail.id;
                        objpeopleDetail.FullAddress = FindpeopleDetail.FullAddress;
                        objpeopleDetail.City        = FindpeopleDetail.City;
                        objpeopleDetail.State       = FindpeopleDetail.State;
                        objpeopleDetail.Country     = FindpeopleDetail.Country;
                        objpeopleDetail.Pincode     = FindpeopleDetail.PinCode;
                        objpeopleDetail.LostOrFound = FindpeopleDetail.LostOrFound;
                        lstFoundedPeople.Add(objpeopleDetail);
                    }

                    return(lstFoundedPeople);
                }

                return(lstFoundedPeople);
            }
        }
Пример #5
0
        public bool VerifyLoginDal(ref clsSignin objSignIn)
        {
            using (var maincontext = new Entity.LostAndFindEntities())
            {
                try
                {
                    string emailId  = objSignIn.Username;
                    string password = objSignIn.password;
                    var    objUsers = maincontext.VerifyLogin(objSignIn.Username, objSignIn.password).FirstOrDefault();

                    if (objUsers != null)
                    {
                        objSignIn.Email     = objUsers.EmailId;
                        objSignIn.FirstName = objUsers.FirstName;
                        objSignIn.LastName  = objUsers.LastName;
                        objSignIn.Role      = objUsers.Role;
                        objSignIn.Username  = objUsers.Username;
                        objSignIn.Phone     = objUsers.Phone;
                        objSignIn.UserId    = objUsers.id;

                        return(true);
                    }
                    else
                    {
                        return(false);
                    }
                }


                catch (Exception ex)
                {
                    var text = ex.Message;
                }
                objSignIn = null;
                return(false);
            }
        }