/// <summary>
 /// Get Master list of categories in the system.
 /// </summary>
 /// <returns>string</returns>
 public string GetCategoryListJSON()
 {
     string response = "";
     ResponseObjectForAnything category = new ResponseObjectForAnything();
     category = GetCategories();
     response = Serializer.ObjectToJSON(category);
     return response;
 }
 /// <summary>
 /// Get Header Notification List for Login User
 /// </summary>
 /// <returns></returns>
 public ActionResult GetNotificationList()
 {
     NotificationObject notifications = new NotificationObject();
     ResponseObjectForAnything responseObject = new ResponseObjectForAnything();
     NotificationEngine notificationEngine = new NotificationEngine();
     string response = notificationEngine.GetNotificationsJSON(Request.Cookies["sessionkey"].Value);
     responseObject = (ResponseObjectForAnything)Serializer.JSONStringToObject<ResponseObjectForAnything>(response);
     notifications = (NotificationObject)Serializer.JSONStringToObject<NotificationObject>(responseObject.ResultObjectJSON);
     return PartialView("_HeaderNotificationList", notifications.Notifications);
 }
 public ActionResult GetNotificationDetail(int pNotificationID, int pProblemID)
 {
     NotificationObject notificationobj = new NotificationObject();
     ResponseObjectForAnything responseObject = new ResponseObjectForAnything();
     NotificationEngine notificationEngine = new NotificationEngine();
     string response = notificationEngine.GetNotificationDetailsJSON(Request.Cookies["sessionkey"].Value, pNotificationID.ToString(), pProblemID.ToString());
     responseObject = (ResponseObjectForAnything)Serializer.JSONStringToObject<ResponseObjectForAnything>(response);
     notificationobj = (NotificationObject)Serializer.JSONStringToObject<NotificationObject>(responseObject.ResultObjectJSON);
     return PartialView("_NotificationDetail", notificationobj);
 }
 /// <summary>
 /// Action for Bind SubCategory From CategoryID
 /// </summary>
 /// <param name="pCategoryID">Id of a category for which sub category needs to be searched</param>
 /// <returns></returns>
 public JsonResult BindSubCategory(int pCategoryID)
 {
     ResponseObjectForAnything responseObject = new ResponseObjectForAnything();
     MasterlistEngine masterEngine = new MasterlistEngine();
     string response = masterEngine.GetSubCategoryListJSON(pCategoryID.ToString());
     responseObject = (ResponseObjectForAnything)Serializer.JSONStringToObject<ResponseObjectForAnything>(response);
     List<Common.DTO.SubCategory> subcategories = new List<Common.DTO.SubCategory>();
     subcategories = (List<Common.DTO.SubCategory>)Serializer.JSONStringToObject<List<Common.DTO.SubCategory>>(responseObject.ResultObjectJSON);
     return Json(subcategories, JsonRequestBehavior.AllowGet);
 }
 public ActionResult GetUpcomingAppointment()
 {
     List<Appointment> appointments = new List<Appointment>();
     BidEngine bidEngine = new BidEngine();
     ResponseObjectForAnything responseObject = new ResponseObjectForAnything();
     string response = bidEngine.GetAppointmentsJSON(Request.Cookies["sessionkey"].Value, null);
     responseObject = (ResponseObjectForAnything)Serializer.JSONStringToObject<ResponseObjectForAnything>(response);
     appointments = (List<Appointment>)Serializer.JSONStringToObject<List<Appointment>>(responseObject.ResultObjectJSON);
     return PartialView("_UpcomingAppointments", appointments);
 }
 public JsonResult BindSubCategoryFromCategoryIDs(string pCategoryIDs)
 {
     ResponseObjectForAnything responseObject = new ResponseObjectForAnything();
     MasterlistEngine masterEngine = new MasterlistEngine();
     string response = masterEngine.GetSubCatsbyCategoriesJSON(Request.Cookies["sessionkey"].Value, pCategoryIDs);
     responseObject = (ResponseObjectForAnything)Serializer.JSONStringToObject<ResponseObjectForAnything>(response);
     List<Common.DTO.Product> products = new List<Common.DTO.Product>();
     products = (List<Common.DTO.Product>)Serializer.JSONStringToObject<List<Common.DTO.Product>>(responseObject.ResultObjectJSON);
     return Json(products, JsonRequestBehavior.AllowGet);
 }
        public ActionResult SignUp()
        {
            ResponseObjectForAnything responseObject = new ResponseObjectForAnything();
            MasterlistEngine masterEngine = new MasterlistEngine();
            string response = masterEngine.GetCategoryListJSON();
            responseObject = (ResponseObjectForAnything)Serializer.JSONStringToObject<ResponseObjectForAnything>(response);
            List<Common.DTO.Category> categories = new List<Common.DTO.Category>();
            categories = (List<Common.DTO.Category>)Serializer.JSONStringToObject<List<Common.DTO.Category>>(responseObject.ResultObjectJSON);
            ViewBag.CategoryId = new SelectList(categories, "ID", "Name");

            return View();
        }
 /// <summary>
 /// Get All appointment of user
 /// </summary>
 /// <param name="id">the parameter is just for mainting the menu with static data other wise it is not needed</param>
 /// <returns></returns>
 public ActionResult Index()
 {
     List<Appointment> appointments = new List<Appointment>();
     BidEngine bidEngine = new BidEngine();
     ResponseObjectForAnything responseObject = new ResponseObjectForAnything();
     string response = bidEngine.GetAppointmentsJSON(Request.Cookies["sessionkey"].Value, null);
     responseObject = (ResponseObjectForAnything)Serializer.JSONStringToObject<ResponseObjectForAnything>(response);
     appointments = (List<Appointment>)Serializer.JSONStringToObject<List<Appointment>>(responseObject.ResultObjectJSON);
     //string jsonModel = new System.Web.Script.Serialization.JavaScriptSerializer().Serialize(responseObject.ResultObjectJSON);
     // ViewBag.JsonModelList = "[{\"Id\": 173,\"StartDate\": \"2015/09/21 17:45:00\",\"MeetingWith\": \"Charles Brown\"},{\"Id\": 175,\"StartDate\": \"2015/09/22 18:00:00\",\"MeetingWith\": \"Brendon Taylor\"}]";
     ViewBag.JsonModelList = responseObject.ResultObjectJSON;
     return View(appointments);
 }
        public JsonResult FilterAppointment(string pDate = "", string pFilterString = "")
        {
            ViewBag.ActiveMenu = "LiAppointments";

            List<Appointment> appointments = new List<Appointment>();
            BidEngine bidEngine = new BidEngine();
            ResponseObjectForAnything responseObject = new ResponseObjectForAnything();
            string response = bidEngine.GetAppointmentsJSON(Request.Cookies["sessionkey"].Value, null);
            responseObject = (ResponseObjectForAnything)Serializer.JSONStringToObject<ResponseObjectForAnything>(response);
            appointments = (List<Appointment>)Serializer.JSONStringToObject<List<Appointment>>(responseObject.ResultObjectJSON);

            appointments.ForEach(m => m.ProposedTimeOfDay = m.ProposedTime.ToString("HH-mm"));

            return Json(appointments, JsonRequestBehavior.AllowGet);
        }
        public ActionResult GetNotificationByPaging(int pageIndex)
        {
            List<Notification> notifications = new List<Notification>();
            ResponseObjectForAnything responseObject = new ResponseObjectForAnything();
            NotificationEngine notificationEngine = new NotificationEngine();
            string response = notificationEngine.GetNotificationsJSON(Request.Cookies["sessionkey"].Value);
            responseObject = (ResponseObjectForAnything)Serializer.JSONStringToObject<ResponseObjectForAnything>(response);
            notifications = (List<Notification>)Serializer.JSONStringToObject<List<Notification>>(responseObject.ResultObjectJSON);

            int totalRecords = notifications.Count > 0 ? notifications[0].TotalNotificationCount : 0;
            int totalPagesCount = 0;
            totalPagesCount = (int)Math.Ceiling((float)totalRecords / (float)_pageSize);
            ViewBag.PageNumber = pageIndex;
            ViewBag.PageSize = _pageSize;
            ViewBag.TotalPagesCount = totalPagesCount;
            ViewBag.TotalRecords = totalRecords;
            return PartialView("_NotificationList", notifications);
        }
        /// <summary>
        /// This method gets categories based on selected company.
        /// </summary>
        /// <param name="sessionKey">string</param>
        /// <param name="companyID">int</param>
        /// <returns>ResponseObjectForAnything</returns>
        public ResponseObjectForAnything GetCategories()
        {
            List<Category> categorylist = new List<Category>();
            AuthenticationEngine authEngine = new AuthenticationEngine();
            ResponseObjectForAnything responseObject = new ResponseObjectForAnything();
            int count = 0;

            try
            {
                Database db = DatabaseFactory.CreateDatabase();
                DbCommand dbCommand = db.GetStoredProcCommand("usp_GetCategories");

                using (IDataReader dr = db.ExecuteReader(dbCommand))
                {
                    while (dr.Read())
                    {
                        Category category = new Category();
                        if (dr["ID"] != DBNull.Value) { category.ID = Int32.Parse(dr["ID"].ToString()); }
                        if (dr["Name"] != DBNull.Value) { category.Name = dr["Name"].ToString(); }
                        count++;
                        categorylist.Add(category);
                    }
                }
                responseObject.ResultCode = "SUCCESS";
                responseObject.ResultObjectJSON = Serializer.ObjectToJSON(categorylist);
                responseObject.ResultObjectRecordCount = count;
                if (responseObject.ResultObjectRecordCount == 0) { responseObject.ResultMessage = "No categories configured."; }
            }
            catch (Exception ex)
            {
                responseObject.ResultCode = "ERROR";
                responseObject.ResultMessage = ex.Message;
                CustomException exc = new CustomException(ex.ToString(), this.ToString(), "GetCompanies", System.DateTime.Now);
                ExceptionManager.PublishException(exc);
            }
            return (responseObject);
        }
 public ActionResult GetProblemMarker(int pProblemID)
 {
     ProblemObject problemobj = new ProblemObject();
     ResponseObjectForAnything responseObject = new ResponseObjectForAnything();
     ProblemEngine probEngine = new ProblemEngine();
     string response = probEngine.GetProblemDetailsByIdJSON(Request.Cookies["sessionkey"].Value, pProblemID.ToString(), false);
     responseObject = (ResponseObjectForAnything)Serializer.JSONStringToObject<ResponseObjectForAnything>(response);
     problemobj = (ProblemObject)Serializer.JSONStringToObject<ProblemObject>(responseObject.ResultObjectJSON);
     return PartialView("_ProblemMarkerDetail", problemobj.individualproblem);
     //ProblemListViewModel model = new ProblemListViewModel();
     //model.ProblemID = 1;
     //model.Address1 = "15-c/shubham flats";
     //model.Address2 = "citylight";
     //model.City = "Ahmedabad";
     //model.State = "Gujarat";
     //model.Country = "India";
     //model.Pincode = "666-0444-02";
     //model.ProblemImageCount = 4;
     //model.ProblemVideoCount = 2;
     //model.ProblemTitle = "Washing Machine";
     //model.ProblemImageName = "~/upload/problem-image/1.JPG";
     //model.Description = "To troubleshoot your product, enter the model number in the search box below. After entering your model number, we’ll list the most common symptoms for your product. Once you select a symptom, we’ll identify the model-specific parts and/or conditions that are associated with that symptom.";
     //return PartialView("_ProblemMarkerDetail",model);
 }
        public ActionResult GetSuggestedExpert(string pPinCode, double pRadius, int pCategoryId, int pSubCategoryId, int pPageIndex = 1)
        {
            List<User> lstUser = new List<Common.DTO.User>();
            ResponseObjectForAnything responseObject = new ResponseObjectForAnything();
            UserEngine userEngine = new UserEngine();
            string response = userEngine.GetExpertsByCatSubCatJSON(Request.Cookies["sessionkey"].Value, pPinCode, pRadius.ToString(), pCategoryId.ToString(), pSubCategoryId.ToString());
            responseObject = (ResponseObjectForAnything)Serializer.JSONStringToObject<ResponseObjectForAnything>(response);
            lstUser = (List<User>)Serializer.JSONStringToObject<List<User>>(responseObject.ResultObjectJSON);
            int totalRecords = responseObject.ResultObjectRecordCount;
            int totalPagesCount = 0;
            totalPagesCount = (int)Math.Ceiling((float)totalRecords / (float)_PageSize);
            ViewBag.TotalPagesCount = totalPagesCount;
            ViewBag.TotalRecords = totalRecords;
            ViewBag.PageNumber = pPageIndex;
            return PartialView("_ExpertSuggestionList", lstUser);
            //List<UserViewModel> modelList = new List<UserViewModel>();

            //UserViewModel model = new UserViewModel();
            //model.UserID = 1;
            //model.FirstName = "Charles";
            //model.LastName = "Brown";
            //model.EmailID = "*****@*****.**";
            //model.ProfilePicPath = ServerSettings.WebApplicationURL + "/upload/profilepic/profile.jpg";
            //model.Distance = "25.45 miles";
            //modelList.Add(model);

            //model = new UserViewModel();
            //model.UserID = 2;
            //model.FirstName = "Brendon";
            //model.LastName = "Taylor";
            //model.EmailID = "*****@*****.**";
            //model.ProfilePicPath = ServerSettings.WebApplicationURL + "/upload/profilepic/images.jpg";
            //model.Distance = "189.75 miles";
            //modelList.Add(model);

            //model = new UserViewModel();
            //model.UserID = 3;
            //model.FirstName = "Nathen";
            //model.LastName = "Astle";
            //model.EmailID = "*****@*****.**";
            //model.ProfilePicPath = ServerSettings.WebApplicationURL + "/upload/profilepic/chris_palmer_profile_11.jpg";
            //model.Distance = "356.79 miles";
            //modelList.Add(model);

            //int totalRecords = modelList.Count;
            //int totalPagesCount = 0;
            //totalPagesCount = (int)Math.Ceiling((float)totalRecords / (float)_PageSize);

            //ViewBag.TotalPagesCount = totalPagesCount;
            //ViewBag.TotalRecords = totalRecords;
            //ViewBag.PageNumber = pPageIndex;

            //return PartialView("_ExpertSuggestionList", modelList);
        }
 /// <summary>
 /// Get payment page
 /// </summary>
 /// <param name="pPageIndex">Index of a page that needs to be fetched</param>
 /// <returns></returns>
 public ActionResult GetPaymentPage(int pPageIndex)
 {
     PaymentObject paymentobj = new PaymentObject();
     ResponseObjectForAnything responseObject = new ResponseObjectForAnything();
     PaymentEngine paymentEngine = new PaymentEngine();
     string response = paymentEngine.GetPaymentHistoryJSON(Request.Cookies["sessionkey"].Value);
     responseObject = (ResponseObjectForAnything)Serializer.JSONStringToObject<ResponseObjectForAnything>(response);
     paymentobj = (PaymentObject)Serializer.JSONStringToObject<PaymentObject>(responseObject.ResultObjectJSON);
     return PartialView("_PaymentList", paymentobj.PaymentMade);
     //int totalRecords = 0;
     //PaymentListViewModel model = null;
     //List<PaymentListViewModel> modelList = new List<PaymentListViewModel>();
     //model = new PaymentListViewModel();
     //model.ProblemID = 10522;
     //model.ProblemTitle = "DVD Player";
     //model.OppositeUserFirstName = "Alex";
     //model.OppositeUserLastName = "D'Souza";
     //model.OppositeUserImagepath = ServerSettings.WebApplicationURL + "/upload/profilepic/Sean-McPheat-Profile-Pic.jpg";
     //model.PaymentDate = DateTime.Now;
     //model.Amount = Convert.ToDecimal(3000.99);
     //modelList.Add(model);
     //if (modelList.Count > 0)
     //{
     //    totalRecords = 2;
     //}
     //int totalPagesCount = (int)Math.Ceiling((float)totalRecords / (float)_PageSize);
     //ViewBag.TotalPagesCount = totalPagesCount;
     //ViewBag.PageNumber = pPageIndex;
     //return PartialView("_PaymentList", payment);
 }
        public ActionResult GetProblemByPaging(int pPageIndex, string pFilterBy = "")
        {
            //ViewBag.ActiveMenu = pActiveMenu;
            int startindex = 0;
            if (pPageIndex == 1)
                startindex = 1;
            else
                startindex = pPageIndex + 9;
            DashboardObject dashboardObject = new DashboardObject();
            ResponseObjectForAnything responseObject = new ResponseObjectForAnything();
            ProblemEngine probEngine = new ProblemEngine();
            string response = probEngine.GetProblemsByUserIDJSON(Request.Cookies["sessionkey"].Value, startindex.ToString(), pPageIndex.ToString(), true, pFilterBy);
            responseObject = (ResponseObjectForAnything)Serializer.JSONStringToObject<ResponseObjectForAnything>(response);
            dashboardObject = (DashboardObject)Serializer.JSONStringToObject<DashboardObject>(responseObject.ResultObjectJSON);
            if (Request.Url.AbsolutePath.ToLower().Contains("myresolution"))
                ViewBag.ActiveMenu = "LiMyResolution";
            int totalPagesCount = (int)Math.Ceiling((float)responseObject.ResultObjectRecordCount / (float)_PageSize);
            ViewBag.TotalPagesCount = totalPagesCount;
            ViewBag.PageNumber = pPageIndex;
            ViewBag.ProblemStatusId = new SelectList(dashboardObject.ProblemStatus, "ProblemStatusID", "ProblemStatusName");
            ViewBag.TotalRecordCount = responseObject.ResultObjectRecordCount;
            ViewBag.NextPageIndex = pPageIndex + 1;
            return PartialView("_ProblemList", dashboardObject.ProblemList);
            //int totalRecords = 0;
            //UserDashboardComlexViewModel model = new UserDashboardComlexViewModel();
            //ViewBag.NextPageIndex = 2;
            //ViewBag.CategoryPageSize = CategoryPageSize;
            //ViewBag.NextPageIndex = 2;
            //ViewBag.CategoryPageSize = CategoryPageSize;
            //ProblemListViewModel problemModel = new ProblemListViewModel();
            //model.ProblemListViewModel = new List<ProblemListViewModel>();
            //problemModel.ProblemID = 1;
            //problemModel.Address1 = "15-c/shubham flats";
            //problemModel.Address2 = "citylight";
            //problemModel.Address3 = "Near JodhpurChar rasta";
            //problemModel.City = "Ahmedabad";
            //problemModel.State = "Gujarat";
            //problemModel.Country = "India";
            //problemModel.Pincode = "666-0444-02";
            //problemModel.ProblemImageCount = 4;
            //problemModel.ProblemVideoCount = 2;
            //problemModel.ProblemTitle = "Washing Machine";
            //problemModel.ProblemImageName = "~/assets/img/images%20(7).jpg";
            //problemModel.Description = "To troubleshoot your product, enter the model number in the search box below. After entering your model number, we’ll list the most common symptoms for your product. Once you select a symptom, we’ll identify the model-specific parts and/or conditions that are associated with that symptom.";
            //model.ProblemListViewModel.Add(problemModel);

            //problemModel = new ProblemListViewModel();
            //problemModel.ProblemID = 2;
            //problemModel.Address1 = "15-c/shubham flats";
            //problemModel.Address2 = "citylight";
            //problemModel.Address3 = "Near JodhpurChar rasta";
            //problemModel.City = "Ahmedabad";
            //problemModel.State = "Gujarat";
            //problemModel.Country = "India";
            //problemModel.Pincode = "666-0444-02";
            //problemModel.ProblemImageCount = 5;
            //problemModel.ProblemVideoCount = 7;
            //problemModel.ProblemTitle = "Washing Machine";
            //problemModel.ProblemImageName = "~/assets/img/images%20(7).jpg";
            //problemModel.Description = "To troubleshoot your product, enter the model number in the search box below. After entering your model number, we’ll list the most common symptoms for your product. Once you select a symptom, we’ll identify the model-specific parts and/or conditions that are associated with that symptom.";
            //model.ProblemListViewModel.Add(problemModel);

            ////if (Request.Url.AbsolutePath.ToLower().Contains("myproblems"))
            ////{
            ////    ViewBag.ActiveMenu = "LiMyProblems";
            ////}

            //if (model.ProblemListViewModel.Count > 0)
            //{
            //    totalRecords = 2;
            //}
            //int totalPagesCount = (int)Math.Ceiling((float)totalRecords / (float)_PageSize);
            //ViewBag.TotalPagesCount = totalPagesCount;
            //ViewBag.PageNumber = pPageIndex;
            //ViewBag.TotalRecordCount = 4;
            //return PartialView("_ProblemList", model.ProblemListViewModel);
        }
        public void GetInitialDropDowns(CreateProblemObject createproblemobj)
        {
            ResponseObjectForAnything responseObject = new ResponseObjectForAnything();
            MasterlistEngine masterEngine = new MasterlistEngine();
            string response = masterEngine.GetDropDownItemsJSON(Request.Cookies["sessionkey"].Value);
            responseObject = (ResponseObjectForAnything)Serializer.JSONStringToObject<ResponseObjectForAnything>(response);
            createproblemobj = (CreateProblemObject)Serializer.JSONStringToObject<CreateProblemObject>(responseObject.ResultObjectJSON);
            ViewBag.Country = new SelectList(createproblemobj.countries, "CountryID", "CountryName");
            ViewBag.CompanyID = new SelectList(createproblemobj.companies, "CompanyID", "CompanyName");
            ViewBag.CategoryID = new SelectList(createproblemobj.categories, "ID", "Name");
            ViewBag.ProductStatusID = new SelectList(createproblemobj.productstatuses, "ProductStatusID", "ProductStatusName");
            ViewBag.PinCode = createproblemobj.PinCode;
            //List<DropDownViewModel> categoryList = new List<DropDownViewModel>();
            //categoryList.Add(new DropDownViewModel { Name = "Electronics", ID = 1 });
            //categoryList.Add(new DropDownViewModel { Name = "Furniture", ID = 2 });
            //model.CategoryList = categoryList;
            ////ViewBag.CategoryId = new SelectList(model.CategoryList, "ID", "Name"); ;

            //List<DropDownViewModel> companyList = new List<DropDownViewModel>();
            //companyList.Add(new DropDownViewModel { Name = "Google", ID = 1 });
            //companyList.Add(new DropDownViewModel { Name = "Yahoo", ID = 2 });
            //companyList.Add(new DropDownViewModel { Name = "Facebook", ID = 3 });
            //companyList.Add(new DropDownViewModel { Name = "Microsoft", ID = 4 });
            //companyList.Add(new DropDownViewModel { Name = "Intel", ID = 5 });
            //model.CompanyList = companyList;

            //List<DropDownViewModel> statusList = new List<DropDownViewModel>();
            //statusList.Add(new DropDownViewModel { Name = "In Warranty", ID = 1 });
            //statusList.Add(new DropDownViewModel { Name = "In Guaranty", ID = 2 });
            //model.ProductStatusList = statusList;

            //List<DropDownViewModel> countryList = new List<DropDownViewModel>();
            //countryList.Add(new DropDownViewModel { Name = "India", ID = 1 });
            //countryList.Add(new DropDownViewModel { Name = "Australia", ID = 2 });
            //countryList.Add(new DropDownViewModel { Name = "New Zealand", ID = 3 });
            //countryList.Add(new DropDownViewModel { Name = "Canada", ID = 4 });
            //model.CountryList = countryList;
        }
        public ActionResult GetMediaByProblemId(int pProblemId)
        {
            List<ProblemMedia> lstproblemmedia = new List<ProblemMedia>();
            ResponseObjectForAnything responseObject = new ResponseObjectForAnything();
            ProblemEngine probEngine = new ProblemEngine();
            string response = probEngine.GetProblemMediaForProblemIDJSON(Request.Cookies["sessionkey"].Value, pProblemId.ToString());
            responseObject = (ResponseObjectForAnything)Serializer.JSONStringToObject<ResponseObjectForAnything>(response);
            lstproblemmedia = (List<ProblemMedia>)Serializer.JSONStringToObject<List<ProblemMedia>>(responseObject.ResultObjectJSON);
            return PartialView("_ProblemMediaList", lstproblemmedia);
            //List<ProblemMediaViewModel> modelList = new List<ProblemMediaViewModel>();

            //ProblemMediaViewModel problemMediaViewModel = null;
            //for (int i = 1; i < 5; i++)
            //{
            //    problemMediaViewModel = new ProblemMediaViewModel();
            //    problemMediaViewModel.ID = i;
            //    problemMediaViewModel.ProblemID = 1;
            //    problemMediaViewModel.IsImage = true;
            //    problemMediaViewModel.MediaPath = ServerSettings.WebApplicationURL + "/upload/problem-image/" + i.ToString() + ".JPG";
            //    modelList.Add(problemMediaViewModel);
            //}

            //for (int i = 5; i < 7; i++)
            //{
            //    problemMediaViewModel = new ProblemMediaViewModel();
            //    problemMediaViewModel.ID = i;
            //    problemMediaViewModel.ProblemID = 1;
            //    problemMediaViewModel.IsImage = false;
            //    problemMediaViewModel.MediaPath = ServerSettings.WebApplicationURL + "/upload/video/robotic.mp4";
            //    modelList.Add(problemMediaViewModel);
            //}

            //return PartialView("_ProblemMediaList", modelList);
        }
        /// <summary>
        /// Initial Listing of a user problem
        /// </summary>
        /// <returns></returns>
        public ActionResult Problem()
        {
            ViewBag.ActiveMenu = "LiDashboard";
            ResponseObjectForAnything responseObject = new ResponseObjectForAnything();
            DashboardObject dashboardobj = new DashboardObject();
            ProblemEngine probEngine = new ProblemEngine();
            string response = probEngine.GetProblemsByUserIDJSON(Request.Cookies["sessionkey"].Value, "1", _PageSize.ToString(), false, "1");
            responseObject = (ResponseObjectForAnything)Serializer.JSONStringToObject<ResponseObjectForAnything>(response);
            if(responseObject.ResultMessage == "ERROR")
            {

            }
            dashboardobj = (DashboardObject)Serializer.JSONStringToObject<DashboardObject>(responseObject.ResultObjectJSON);
            ViewBag.NextPageIndex = 2;
            ViewBag.ProblemStatusId = new SelectList(dashboardobj.ProblemStatus, "ProblemStatusID", "ProblemStatusName");
            ViewBag.CompanyID = new SelectList(dashboardobj.Companies, "CompanyID", "CompanyName");
            ViewBag.CategoryID = new SelectList(dashboardobj.Categories, "ID", "Name");
            ViewBag.CategoryPageSize = CategoryPageSize;
            if (Request.Url.AbsolutePath.ToLower().Contains("myresolution"))
                ViewBag.ActiveMenu = "LiMyResolution";
            int totalPagesCount = (int)Math.Ceiling((float)responseObject.ResultObjectRecordCount / (float)_PageSize);
            ViewBag.TotalPagesCount = totalPagesCount;
            ViewBag.PageNumber = 1;
            ViewBag.TotalRecordCount = responseObject.ResultObjectRecordCount;
            return View(dashboardobj);
            //int totalRecords = 0;
            //ViewBag.ActiveMenu = "LiDashboard";
            //UserDashboardComlexViewModel model = new UserDashboardComlexViewModel();

            //ProblemListViewModel problemModel = new ProblemListViewModel();
            //model.ProblemListViewModel = new List<ProblemListViewModel>();
            //problemModel.ProblemID = 1;
            //problemModel.Address1 = "15-c/shubham flats";
            //problemModel.Address2 = "citylight";
            //problemModel.Address3 = "Near JodhpurChar rasta";
            //problemModel.City = "Ahmedabad";
            //problemModel.State = "Gujarat";
            //problemModel.Country = "India";
            //problemModel.Pincode = "666-0444-02";
            //problemModel.ProblemImageCount = 4;
            //problemModel.ProblemVideoCount = 2;
            //problemModel.ProblemTitle = "Washing Machine";
            //problemModel.ProblemImageName = "~/upload/problem-image/1.JPG";
            //problemModel.Description = "To troubleshoot your product, enter the model number in the search box below. After entering your model number, we’ll list the most common symptoms for your product. Once you select a symptom, we’ll identify the model-specific parts and/or conditions that are associated with that symptom.";
            //problemModel.Latitude = "27.140717";
            //problemModel.Logitude = "78.030954";
            //model.ProblemListViewModel.Add(problemModel);

            //problemModel = new ProblemListViewModel();
            //problemModel.ProblemID = 2;
            //problemModel.Address1 = "15-c/shubham flats";
            //problemModel.Address2 = "citylight";
            //problemModel.Address3 = "Near JodhpurChar rasta";
            //problemModel.City = "Ahmedabad";
            //problemModel.State = "Gujarat";
            //problemModel.Country = "India";
            //problemModel.Pincode = "666-0444-02";
            //problemModel.ProblemImageCount = 5;
            //problemModel.ProblemVideoCount = 7;
            //problemModel.ProblemTitle = "Washing Machine";
            //problemModel.ProblemImageName = "~/assets/img/images%20(7).jpg";
            //problemModel.Description = "To troubleshoot your product, enter the model number in the search box below. After entering your model number, we’ll list the most common symptoms for your product. Once you select a symptom, we’ll identify the model-specific parts and/or conditions that are associated with that symptom.";
            //problemModel.Latitude = "26.604125";
            //problemModel.Logitude = "76.108800";

            //model.ProblemListViewModel.Add(problemModel);

            //problemModel = new ProblemListViewModel();
            //problemModel.ProblemID = 3;
            //problemModel.Address1 = "15-c/shubham flats";
            //problemModel.Address2 = "citylight";
            //problemModel.Address3 = "Near JodhpurChar rasta";
            //problemModel.City = "Ahmedabad";
            //problemModel.State = "Gujarat";
            //problemModel.Country = "India";
            //problemModel.Pincode = "666-0444-02";
            //problemModel.ProblemImageCount = 5;
            //problemModel.ProblemVideoCount = 7;
            //problemModel.ProblemTitle = "Washing Machine";
            //problemModel.ProblemImageName = "~/upload/problem-image/5.JPG";
            //problemModel.Description = "To troubleshoot your product, enter the model number in the search box below. After entering your model number, we’ll list the most common symptoms for your product. Once you select a symptom, we’ll identify the model-specific parts and/or conditions that are associated with that symptom.";
            //problemModel.Latitude = "23.383021";
            //problemModel.Logitude = "69.621456";
            //model.ProblemListViewModel.Add(problemModel);

            //problemModel = new ProblemListViewModel();
            //problemModel.ProblemID = 4;
            //problemModel.Address1 = "15-c/shubham flats";
            //problemModel.Address2 = "citylight";
            //problemModel.Address3 = "Near JodhpurChar rasta";
            //problemModel.City = "Ahmedabad";
            //problemModel.State = "Gujarat";
            //problemModel.Country = "India";
            //problemModel.Pincode = "666-0444-02";
            //problemModel.ProblemImageCount = 5;
            //problemModel.ProblemVideoCount = 7;
            //problemModel.ProblemTitle = "Washing Machine";
            //problemModel.ProblemImageName = "~/upload/problem-image/8.JPG";
            //problemModel.Description = "To troubleshoot your product, enter the model number in the search box below. After entering your model number, we’ll list the most common symptoms for your product. Once you select a symptom, we’ll identify the model-specific parts and/or conditions that are associated with that symptom.";
            //problemModel.Latitude = "24.359854";
            //problemModel.Logitude = "87.420752";
            //model.ProblemListViewModel.Add(problemModel);
            //if (Request.Url.AbsolutePath.ToLower().Contains("myproblems"))
            //{
            //    ViewBag.ActiveMenu = "LiMyProblems";
            //}
            //if (model.ProblemListViewModel.Count > 0)
            //{
            //    totalRecords = 2;
            //}
            //int totalPagesCount = (int)Math.Ceiling((float)totalRecords / (float)_PageSize);
            //ViewBag.TotalPagesCount = totalPagesCount;
            //ViewBag.PageNumber = 1;
            //ViewBag.TotalRecordCount = 4;

            //RecentProblemResolutionViewModel recentProblemModel = null;

            //recentProblemModel = new RecentProblemResolutionViewModel();
            //recentProblemModel.ProblemID = 1;
            //recentProblemModel.ProblemImagePath = ServerSettings.WebApplicationURL + "/upload/problem-image/1.jpg";
            //recentProblemModel.ProblemTitle = "Washing Machine";
            //recentProblemModel.Description = "To troubleshoot your product, enter the model number in the search box below. After entering your model number, we’ll list the most common symptoms for your product. Once you select a symptom, we’ll identify the model-specific parts and/or conditions that are associated with that symptom.";
            //model.RecentProblemResolutionList.Add(recentProblemModel);

            //recentProblemModel = new RecentProblemResolutionViewModel();
            //recentProblemModel.ProblemID = 2;
            //recentProblemModel.ProblemImagePath = ServerSettings.WebApplicationURL + "/upload/problem-image/2.jpg";
            //recentProblemModel.ProblemTitle = "Freezer Cooling";
            //recentProblemModel.Description = "To troubleshoot your product, enter the model number in the search box below. After entering your model number, we’ll list the most common symptoms for your product. Once you select a symptom, we’ll identify the model-specific parts and/or conditions that are associated with that symptom.";
            //model.RecentProblemResolutionList.Add(recentProblemModel);

            //recentProblemModel = new RecentProblemResolutionViewModel();
            //recentProblemModel.ProblemID = 3;
            //recentProblemModel.ProblemImagePath = ServerSettings.WebApplicationURL + "/upload/problem-image/3.jpg";
            //recentProblemModel.ProblemTitle = "Ac power supply";
            //recentProblemModel.Description = "To troubleshoot your product, enter the model number in the search box below. After entering your model number, we’ll list the most common symptoms for your product. Once you select a symptom, we’ll identify the model-specific parts and/or conditions that are associated with that symptom.";
            //model.RecentProblemResolutionList.Add(recentProblemModel);

            //recentProblemModel = new RecentProblemResolutionViewModel();
            //recentProblemModel.ProblemID = 4;
            //recentProblemModel.ProblemImagePath = ServerSettings.WebApplicationURL + "/upload/problem-image/4.jpg";
            //recentProblemModel.ProblemTitle = "Washing Machine";
            //recentProblemModel.Description = "To troubleshoot your product, enter the model number in the search box below. After entering your model number, we’ll list the most common symptoms for your product. Once you select a symptom, we’ll identify the model-specific parts and/or conditions that are associated with that symptom.";
            //model.RecentProblemResolutionList.Add(recentProblemModel);

            //recentProblemModel = new RecentProblemResolutionViewModel();
            //recentProblemModel.ProblemID = 5;
            //recentProblemModel.ProblemImagePath = ServerSettings.WebApplicationURL + "/upload/problem-image/5.jpg";
            //recentProblemModel.ProblemTitle = "Acc Cooling";
            //recentProblemModel.Description = "To troubleshoot your product, enter the model number in the search box below. After entering your model number, we’ll list the most common symptoms for your product. Once you select a symptom, we’ll identify the model-specific parts and/or conditions that are associated with that symptom.";
            //model.RecentProblemResolutionList.Add(recentProblemModel);

            //List<DropDownViewModel> categoryList = new List<DropDownViewModel>();
            //categoryList.Add(new DropDownViewModel { Name = "Television", ID = 1 });
            //categoryList.Add(new DropDownViewModel { Name = "Refrigerator", ID = 2 });
            //categoryList.Add(new DropDownViewModel { Name = "Air Conditioner", ID = 3 });
            //categoryList.Add(new DropDownViewModel { Name = "Microwave oven", ID = 4 });

            //model.CategoryList = categoryList;
            //ViewBag.CategoryPageSize = CategoryPageSize;
            //ViewBag.NextPageIndex = 2;
            //return View(model);
        }
Exemple #19
0
        /// <summary>
        /// Update contact info for a user ID.
        /// </summary>
        /// <param name="sessionKey">string</param>
        /// <param name="address1">string</param>
        /// <param name="address2">string</param>
        /// <param name="address3">string</param>
        /// <param name="state">string</param>
        /// <param name="city">string</param>
        /// <param name="pincode">string</param>
        /// <returns>SessionResponseObject</returns>
        public ResponseObjectForAnything UpdateCardDetailsByUserId(string sessionKey, string cardtype, string cardnumber)
        {
            AuthenticationEngine authEngine = new AuthenticationEngine();
            User user = new User();
            bool isValid = authEngine.IsValidSession(sessionKey);
            ResponseObjectForAnything obj = new ResponseObjectForAnything();
            if (isValid)
            {
                if (!string.IsNullOrEmpty(sessionKey))
                {
                    obj = authEngine.GetUserFromSession(sessionKey);
                    user = (User)Serializer.JSONStringToObject<User>(obj.ResultObjectJSON);
                }

                if (user != null)
                {
                    try
                    {
                        Database db = DatabaseFactory.CreateDatabase();
                        DbCommand dbCommand = db.GetStoredProcCommand("usp_UpdateCardsByUserID");

                        db.AddInParameter(dbCommand, "UserID", DbType.Int32, user.UserID);
                        db.AddInParameter(dbCommand, "CardType", DbType.Xml, cardtype);
                        db.AddInParameter(dbCommand, "CardNumber", DbType.Xml, cardnumber);

                        dbCommand.ExecuteNonQuery();

                        obj.ResultCode = "SUCCESS";
                        obj.ResultMessage = "Card details information updated successfully.";
                    }
                    catch (Exception ex)
                    {
                        obj.ResultCode = "ERROR";
                        obj.ResultMessage = ex.Message;
                        CustomException exc = new CustomException(ex.ToString(), this.ToString(), "UpdateContactInfoByUserId", System.DateTime.Now);
                        ExceptionManager.PublishException(exc);
                    }
                }
            }
            return (obj);
        }
Exemple #20
0
 /// <summary>
 /// This method gets/sets the card details based on user ID.
 /// </summary>
 /// <param name="sessionKey">string</param>
 /// <param name="cardDetails"></param>
 /// <returns>string</returns>
 public string UpdateCardDetailsByUserIdJSON(string sessionKey, string cardtype, string cardnumber)
 {
     string response = "";
     ResponseObjectForAnything responseObject = new ResponseObjectForAnything();
     responseObject = UpdateCardDetailsByUserId(sessionKey, cardtype, cardnumber);
     response = Serializer.ObjectToJSON(responseObject);
     return response;
 }
        /// <summary>
        /// Action for get detail of a Problem
        /// </summary>
        /// <param name="id">id of a problem for which detail needs to be get</param>
        /// <returns></returns>
        public ActionResult ProblemDetail(int id)
        {
            ViewBag.ActiveMenu = "LiMyProblems";
            ResponseObjectForAnything responseObject = new ResponseObjectForAnything();
            ProblemEngine probEngine = new ProblemEngine();
            ProblemObject problemobj = new ProblemObject();

            string response = probEngine.GetProblemDetailsByIdJSON(Request.Cookies["sessionkey"].Value, id.ToString(), false);
            responseObject = (ResponseObjectForAnything)Serializer.JSONStringToObject<ResponseObjectForAnything>(response);
            if (responseObject.ResultCode == "SUCCESS" && !string.IsNullOrEmpty(responseObject.ResultObjectJSON))
                problemobj = (ProblemObject)Serializer.JSONStringToObject<ProblemObject>(responseObject.ResultObjectJSON);
            else
            {
                Common.DTO.Alert alert = new Common.DTO.Alert();
                alert.AlertType = Common.DTO.Alert.ALERTTYPE.Info;
                alert.Message = responseObject.ResultMessage;
                alert.MessageType = Common.DTO.Alert.ALERTMESSAGETYPE.OnlyText;
            }
            ViewBag.QuotesNextPageIndex = 2;
            ViewBag.QuotesPageSize = QuotesPageSize;
            return View(problemobj);
            //UserProblemDetailComplexViewModel model = new UserProblemDetailComplexViewModel();

            //model.ProblemViewModel.ID = 1;
            //model.ProblemViewModel.UserID = 1;
            //model.ProblemViewModel.ProblemHeading = "Washing maching balancing Problem";
            //model.ProblemViewModel.Description = "Washing machine won’t spin or agitate? Not draining, filling or leaks water? This video provides information on how a washing cloths. Washer not spinning or draining? This demonstrates how to test a three terminal switch on a washing machine. The lid switch not works.";
            //model.ProblemViewModel.CompanyRelated = true;
            //model.ProblemViewModel.CompanyID = 1;
            //model.ProblemViewModel.CompanyName = "ProbFox pvt Ltd.";
            //model.ProblemViewModel.CategoryID = 1;
            //model.ProblemViewModel.SubCategoryID = 3;
            //model.ProblemViewModel.CategoryName = "Electronics";
            //model.ProblemViewModel.SubCategoryName = "Motor";
            //model.ProblemViewModel.ProductID = 1;
            //model.ProblemViewModel.ProductName = "Washing Machine";
            //model.ProblemViewModel.ModelNo = "Prob-Ind-2106";
            //model.ProblemViewModel.ProductStatusID = 2;
            //model.ProblemViewModel.ProductStatusName = "In Warranty";
            //model.ProblemViewModel.PurchaseMonth = "November";
            //model.ProblemViewModel.PurchaseYear = "2015";
            //model.ProblemViewModel.ResolutionNeededBy = DateTime.Now;
            //model.ProblemViewModel.CreatedDate = DateTime.Now;
            //model.ProblemViewModel.UpdatedDate = DateTime.Now;

            //model.ProblemLocationViewModel.ID = 1;
            //model.ProblemLocationViewModel.ProblemID = 1;
            //model.ProblemLocationViewModel.Address1 = "Shiv Shakti Nager";
            //model.ProblemLocationViewModel.Address2 = "Adajan";
            //model.ProblemLocationViewModel.Address3 = "";
            //model.ProblemLocationViewModel.City = "Ahmedabad";
            //model.ProblemLocationViewModel.StateID = 1;
            //model.ProblemLocationViewModel.StateName = "Gujarat";
            //model.ProblemLocationViewModel.CountryID = 1;
            //model.ProblemLocationViewModel.CountryName = "India";
            //model.ProblemLocationViewModel.Pincode = "395006";
            //model.ProblemLocationViewModel.Latitude = 21.192786M;
            //model.ProblemLocationViewModel.Longitude = 72.799809M;

            //ProblemMediaViewModel problemMediaViewModel = null;
            //for (int i = 1; i < 5; i++)
            //{
            //    problemMediaViewModel = new ProblemMediaViewModel();
            //    problemMediaViewModel.ID = i;
            //    problemMediaViewModel.ProblemID = 1;
            //    problemMediaViewModel.IsImage = true;
            //    problemMediaViewModel.MediaPath = ServerSettings.WebApplicationURL + "/upload/problem-image/" + i.ToString() + ".JPG";
            //    model.ProblemMediaViewModelList.Add(problemMediaViewModel);
            //}

            //for (int i = 5; i < 7; i++)
            //{
            //    problemMediaViewModel = new ProblemMediaViewModel();
            //    problemMediaViewModel.ID = i;
            //    problemMediaViewModel.ProblemID = 1;
            //    problemMediaViewModel.IsImage = false;
            //    problemMediaViewModel.MediaPath = ServerSettings.WebApplicationURL + "/upload/video/robotic.mp4";
            //    model.ProblemMediaViewModelList.Add(problemMediaViewModel);
            //}

            //ProblemHashTagsViewModel problemHashTagsViewModel = null;

            //problemHashTagsViewModel = new ProblemHashTagsViewModel();
            //problemHashTagsViewModel.ID = 1;
            //problemHashTagsViewModel.ProblemID = 1;
            //problemHashTagsViewModel.Name = "Washing machine";
            //model.ProblemHashTagsViewModelList.Add(problemHashTagsViewModel);

            //problemHashTagsViewModel = new ProblemHashTagsViewModel();
            //problemHashTagsViewModel.ID = 2;
            //problemHashTagsViewModel.ProblemID = 1;
            //problemHashTagsViewModel.Name = "Electronic Items";
            //model.ProblemHashTagsViewModelList.Add(problemHashTagsViewModel);

            //problemHashTagsViewModel = new ProblemHashTagsViewModel();
            //problemHashTagsViewModel.ID = 3;
            //problemHashTagsViewModel.ProblemID = 1;
            //problemHashTagsViewModel.Name = "elctronic";
            //model.ProblemHashTagsViewModelList.Add(problemHashTagsViewModel);

            //problemHashTagsViewModel = new ProblemHashTagsViewModel();
            //problemHashTagsViewModel.ID = 4;
            //problemHashTagsViewModel.ProblemID = 1;
            //problemHashTagsViewModel.Name = "Motor Problem";
            //model.ProblemHashTagsViewModelList.Add(problemHashTagsViewModel);

            //problemHashTagsViewModel = new ProblemHashTagsViewModel();
            //problemHashTagsViewModel.ID = 5;
            //problemHashTagsViewModel.ProblemID = 1;
            //problemHashTagsViewModel.Name = "Expert needed";
            //model.ProblemHashTagsViewModelList.Add(problemHashTagsViewModel);

            //problemHashTagsViewModel = new ProblemHashTagsViewModel();
            //problemHashTagsViewModel.ID = 6;
            //problemHashTagsViewModel.ProblemID = 1;
            //problemHashTagsViewModel.Name = "videocon";
            //model.ProblemHashTagsViewModelList.Add(problemHashTagsViewModel);

            //problemHashTagsViewModel = new ProblemHashTagsViewModel();
            //problemHashTagsViewModel.ID = 7;
            //problemHashTagsViewModel.ProblemID = 1;
            //problemHashTagsViewModel.Name = "videocon machine";
            //model.ProblemHashTagsViewModelList.Add(problemHashTagsViewModel);

            //BidSummaryListViewModel bidSummaryListViewModel = null;
            //bidSummaryListViewModel = new BidSummaryListViewModel();
            //bidSummaryListViewModel.ID = 1;
            //bidSummaryListViewModel.ProblemID = 1;
            //bidSummaryListViewModel.UserID = 1;
            //bidSummaryListViewModel.ProfileImagePath = ServerSettings.WebApplicationURL + "/upload/profilepic/CharlesProfilePicture1.jpg";
            //bidSummaryListViewModel.FirstName = "Charles";
            //bidSummaryListViewModel.LastName = "Brown";
            //bidSummaryListViewModel.ResolutionDescription = "Having good experice of working with electronics";
            //bidSummaryListViewModel.IsSelected = true;
            //bidSummaryListViewModel.IsRated = true;
            //bidSummaryListViewModel.UserRating = 4;
            //bidSummaryListViewModel.IsInvited = true;
            //bidSummaryListViewModel.CurrencyDisplayText = "Rs";
            //bidSummaryListViewModel.Amount = 300M;
            //bidSummaryListViewModel.CreatedDate = DateTime.Now;
            //bidSummaryListViewModel.Distance = 33.36M;
            //bidSummaryListViewModel.QuickBloxUserID = "5815727";
            //bidSummaryListViewModel.Latitude = 21.213443M;
            //bidSummaryListViewModel.Longitude = 72.796905M;
            //bidSummaryListViewModel.BidID = 6542;
            //model.AllBidSummaryListViewModel.Add(bidSummaryListViewModel);
            //model.InvitedBidSummaryListViewModel.Add(bidSummaryListViewModel);
            //model.SelectedBidSummaryListViewModel.Add(bidSummaryListViewModel);

            //bidSummaryListViewModel = new BidSummaryListViewModel();
            //bidSummaryListViewModel.ID = 2;
            //bidSummaryListViewModel.ProblemID = 1;
            //bidSummaryListViewModel.UserID = 2;
            //bidSummaryListViewModel.ProfileImagePath = ServerSettings.WebApplicationURL + "/upload/profilepic/images.jpg";
            //bidSummaryListViewModel.FirstName = "Brendon";
            //bidSummaryListViewModel.LastName = "Taylor";
            //bidSummaryListViewModel.ResolutionDescription = "Gradute from IIT Kanpur and passion is about electronic";
            //bidSummaryListViewModel.IsSelected = true;
            //bidSummaryListViewModel.IsRated = true;
            //bidSummaryListViewModel.UserRating = 3;
            //bidSummaryListViewModel.IsInvited = false;
            //bidSummaryListViewModel.CurrencyDisplayText = "Rs";
            //bidSummaryListViewModel.Amount = 500M;
            //bidSummaryListViewModel.CreatedDate = DateTime.Now;
            //bidSummaryListViewModel.Distance = 89.13M;
            //bidSummaryListViewModel.QuickBloxUserID = "5815727";
            //bidSummaryListViewModel.Latitude = 12.971599M;
            //bidSummaryListViewModel.Longitude = 77.594563M;
            //bidSummaryListViewModel.BidID = 4850;
            //model.AllBidSummaryListViewModel.Add(bidSummaryListViewModel);
            //model.SelectedBidSummaryListViewModel.Add(bidSummaryListViewModel);

            //bidSummaryListViewModel = new BidSummaryListViewModel();
            //bidSummaryListViewModel.ID = 3;
            //bidSummaryListViewModel.ProblemID = 1;
            //bidSummaryListViewModel.UserID = 3;
            //bidSummaryListViewModel.ProfileImagePath = ServerSettings.WebApplicationURL + "/upload/profilepic/enlarged-facebook-profile-picture.jpg";
            //bidSummaryListViewModel.FirstName = "Jesica";
            //bidSummaryListViewModel.LastName = "Martin";
            //bidSummaryListViewModel.ResolutionDescription = "Having experience of working with Sharp Technology for 2 years";
            //bidSummaryListViewModel.IsSelected = false;
            //bidSummaryListViewModel.IsRated = false;
            //bidSummaryListViewModel.UserRating = 0;
            //bidSummaryListViewModel.IsInvited = true;
            //bidSummaryListViewModel.CurrencyDisplayText = "Rs";
            //bidSummaryListViewModel.Amount = 350M;
            //bidSummaryListViewModel.CreatedDate = DateTime.Now;
            //bidSummaryListViewModel.Distance = 63.36M;
            //bidSummaryListViewModel.QuickBloxUserID = "5815727";
            //bidSummaryListViewModel.Latitude = 18.52043M;
            //bidSummaryListViewModel.Longitude = 73.856744M;
            //bidSummaryListViewModel.BidID = 7845;
            //model.AllBidSummaryListViewModel.Add(bidSummaryListViewModel);
            //model.InvitedBidSummaryListViewModel.Add(bidSummaryListViewModel);

            //bidSummaryListViewModel = new BidSummaryListViewModel();
            //bidSummaryListViewModel.ID = 4;
            //bidSummaryListViewModel.ProblemID = 1;
            //bidSummaryListViewModel.UserID = 4;
            //bidSummaryListViewModel.ProfileImagePath = ServerSettings.WebApplicationURL + "/upload/profilepic/profile.jpg";
            //bidSummaryListViewModel.FirstName = "Nathen";
            //bidSummaryListViewModel.LastName = "Astle";
            //bidSummaryListViewModel.ResolutionDescription = "Solve more then 2500 Problems";
            //bidSummaryListViewModel.IsSelected = false;
            //bidSummaryListViewModel.IsRated = true;
            //bidSummaryListViewModel.UserRating = 4;
            //bidSummaryListViewModel.IsInvited = false;
            //bidSummaryListViewModel.CurrencyDisplayText = "Rs";
            //bidSummaryListViewModel.Amount = 300M;
            //bidSummaryListViewModel.CreatedDate = DateTime.Now;
            //bidSummaryListViewModel.Distance = 33.36M;
            //bidSummaryListViewModel.QuickBloxUserID = "5815727";
            //bidSummaryListViewModel.Latitude = 23.022505M;
            //bidSummaryListViewModel.Longitude = 72.571362M;
            //bidSummaryListViewModel.BidID = 2854;
            //model.AllBidSummaryListViewModel.Add(bidSummaryListViewModel);
            //ViewBag.QuotesNextPageIndex = 2;
            //ViewBag.QuotesPageSize = QuotesPageSize;
            //return View(model);
        }
Exemple #22
0
        /// <summary>
        /// Update personal profile from app screens.
        /// </summary>
        /// <param name="sessionKey">string</param>
        /// <param name="firstName">string</param>
        /// <param name="lastName">string</param>
        /// <param name="displayName">string</param>
        /// <param name="isUser">string</param>
        /// <param name="isExpert">string</param>
        /// <param name="catsubcat">string</param>
        /// <param name="description">string</param>
        /// <param name="countrycode">string</param>
        /// <param name="mobileNumber">string</param>
        /// <returns>SessionResponseObject</returns>
        public SessionResponseObject UpdatePersonalInfoByUserId(string sessionKey, string firstName, string lastName, string displayName, string isUser, string isExpert, string catsubcat,
                                                string description, string mobileNumber)
        {
            AuthenticationEngine authEngine = new AuthenticationEngine();
            User user = new User();
            bool isValid = authEngine.IsValidSession(sessionKey);
            SessionResponseObject responseObject = new SessionResponseObject();
            ResponseObjectForAnything obj = new ResponseObjectForAnything();
            if (isValid)
            {
                if (!string.IsNullOrEmpty(sessionKey))
                {
                    obj = authEngine.GetUserFromSession(sessionKey);
                    user = (User)Serializer.JSONStringToObject<User>(obj.ResultObjectJSON);
                }

                if(user != null)
                {
                    try
                    {
                        Database db = DatabaseFactory.CreateDatabase();
                        DbCommand dbCommand = db.GetStoredProcCommand("usp_UpdateProfileByUserID");

                        db.AddInParameter(dbCommand, "UserID", DbType.Int32, user.UserID);
                        db.AddInParameter(dbCommand, "FirstName", DbType.String, firstName);
                        db.AddInParameter(dbCommand, "LastName", DbType.String, lastName);
                        db.AddInParameter(dbCommand, "DisplayName", DbType.String, displayName);
                        db.AddInParameter(dbCommand, "IsUser", DbType.Boolean, Convert.ToBoolean(isUser));
                        db.AddInParameter(dbCommand, "IsExpert", DbType.Boolean, Convert.ToBoolean(isExpert));

                        string[] lstcatsubcat = catsubcat.Split(";".ToCharArray());
                        DataSet dataSet = new DataSet();
                        DataTable dataTable = dataSet.Tables.Add();
                        dataTable.Columns.Add("CategoryID");
                        dataTable.Columns.Add("SubCategoryID");
                        for (int count = 0; count < lstcatsubcat.Length - 1; count++)
                        {
                            string category = lstcatsubcat[count].Split(",".ToCharArray())[0];
                            string subcategory = lstcatsubcat[count].Split(",".ToCharArray())[1];
                            dataTable.Rows.Add(new object[] { category, subcategory });
                        }
                        db.AddInParameter(dbCommand, "CatSubCat", DbType.String, dataSet.GetXml());
                        db.AddInParameter(dbCommand, "BriefDescription", DbType.String, description);
                        db.AddInParameter(dbCommand, "MobileNumber", DbType.String, mobileNumber);

                        dbCommand.ExecuteNonQuery();

                        responseObject.ResultCode = "SUCCESS";
                        responseObject.ResultMessage = "Profile information updated successfully.";
                    }
                    catch(Exception ex)
                    {
                        responseObject.ResultCode = "ERROR";
                        responseObject.ResultMessage = ex.Message;
                        CustomException exc = new CustomException(ex.ToString(), this.ToString(), "UpdatePersonalInfoByUserId", System.DateTime.Now);
                        ExceptionManager.PublishException(exc);
                    }
                }
            }
            return (responseObject);
        }
Exemple #23
0
 /// <summary>
 /// This method is used to update contact information
 /// of logged in user.
 /// </summary>
 /// <param name="sessionKey">string</param>
 /// <param name="address1">string</param>
 /// <param name="address2">string</param>
 /// <param name="address3">string</param>
 /// <param name="city">string</param>
 /// <param name="stateID">string</param>
 /// <param name="countryID">string</param>
 /// <param name="pincode">string</param>
 /// <returns>string</returns>
 public string UpdateContactInfoByUserIdJSON(string sessionKey, string address1, string address2, string address3, string city, string stateID, string countryID,
                                             string pincode)
 {
     string response = "";
     ResponseObjectForAnything responseObject = new ResponseObjectForAnything();
     responseObject = UpdateContactInfoByUserId(sessionKey, address1, address2, address3, stateID, countryID, city, pincode);
     response = Serializer.ObjectToJSON(responseObject);
     return response;
 }
Exemple #24
0
        /// <summary>
        /// Update contact info for a user ID.
        /// </summary>
        /// <param name="sessionKey">string</param>
        /// <param name="address1">string</param>
        /// <param name="address2">string</param>
        /// <param name="address3">string</param>
        /// <param name="state">string</param>
        /// <param name="city">string</param>
        /// <param name="pincode">string</param>
        /// <returns>SessionResponseObject</returns>
        public ResponseObjectForAnything UpdateContactInfoByUserId(string sessionKey, string address1, string address2, string address3, string stateID, string countryID, string city, string pincode)
        {
            AuthenticationEngine authEngine = new AuthenticationEngine();
            ResponseObjectForAnything responseObject = new ResponseObjectForAnything();
            User user = new User();
            bool isValid = authEngine.IsValidSession(sessionKey);
            if (isValid)
            {
                if (!string.IsNullOrEmpty(sessionKey))
                {
                    responseObject = authEngine.GetUserFromSession(sessionKey);
                    user = (User)Serializer.JSONStringToObject<User>(responseObject.ResultObjectJSON);
                }

                if (user != null)
                {
                    try
                    {
                        Database db = DatabaseFactory.CreateDatabase();
                        DbCommand dbCommand = db.GetStoredProcCommand("usp_UpdateContactByUserID");

                        db.AddInParameter(dbCommand, "UserID", DbType.Int32, user.UserID);
                        db.AddInParameter(dbCommand, "Address1", DbType.String, address1);
                        db.AddInParameter(dbCommand, "Address2", DbType.String, address2);
                        db.AddInParameter(dbCommand, "Address3", DbType.String, address3);
                        db.AddInParameter(dbCommand, "State", DbType.String, stateID);
                        db.AddInParameter(dbCommand, "City", DbType.String, city);
                        db.AddInParameter(dbCommand, "PinCode", DbType.String, pincode);

                        dbCommand.ExecuteNonQuery();

                        responseObject.ResultCode = "SUCCESS";
                        responseObject.ResultMessage = "Contact information updated successfully.";
                    }
                    catch (Exception ex)
                    {
                        responseObject.ResultCode = "ERROR";
                        responseObject.ResultMessage = ex.Message;
                        CustomException exc = new CustomException(ex.ToString(), this.ToString(), "UpdateContactInfoByUserId", System.DateTime.Now);
                        ExceptionManager.PublishException(exc);
                    }
                }
            }
            return (responseObject);
        }
        ///// <summary>
        ///// Action for display the profile page of a current login user
        ///// </summary>
        ///// <returns></returns>
        //public ActionResult MyProfile()
        //{
        //    MyProfileComplexViewModel model = new MyProfileComplexViewModel();
        //    return View(model);
        //}
        /// <summary>
        /// Action for Display the payment Listing by user
        /// </summary>
        /// <returns></returns>
        public ActionResult MyPayments()
        {
            ViewBag.ActiveMenu = "LiMyPayments";
            ResponseObjectForAnything responseObject = new ResponseObjectForAnything();
            PaymentObject paymentobj = new PaymentObject();
            PaymentEngine paymentEngine = new PaymentEngine();

            string response = paymentEngine.GetPaymentHistoryJSON(Request.Cookies["sessionkey"].Value);
            responseObject = (ResponseObjectForAnything)Serializer.JSONStringToObject<ResponseObjectForAnything>(response);
            paymentobj = (PaymentObject)Serializer.JSONStringToObject<PaymentObject>(responseObject.ResultObjectJSON);
            int totalPagesCount = (int)Math.Ceiling((float)responseObject.ResultObjectRecordCount / (float)_PageSize);
            ViewBag.TotalPagesCount = totalPagesCount;
            ViewBag.PageNumber = 1;
            ViewBag.TotalRecordCount = responseObject.ResultObjectRecordCount;
            return View();
            //ViewBag.ActiveMenu = "LiMyPayments";
            //int totalRecords = 0;
            //PaymentListViewModel model = null;
            //List<PaymentListViewModel> modelList = new List<PaymentListViewModel>();
            //model = new PaymentListViewModel();
            //model.ProblemID = 10522;
            //model.ProblemTitle = "Washing Machine";
            //model.OppositeUserFirstName = "Chester";
            //model.OppositeUserLastName = "Benington";
            //model.OppositeUserImagepath = ServerSettings.WebApplicationURL + "/upload/profilepic/profile.jpg";
            //model.PaymentDate = DateTime.Now;
            //model.Amount = Convert.ToDecimal(15000.99);
            //modelList.Add(model);

            //model = new PaymentListViewModel();
            //model.ProblemID = 10522;
            //model.ProblemTitle = "Freeze Cooling";
            //model.OppositeUserFirstName = "Chester";
            //model.OppositeUserLastName = "Benington";
            //model.OppositeUserImagepath = ServerSettings.WebApplicationURL + "/upload/profilepic/profile.jpg";
            //model.PaymentDate = DateTime.Now;
            //model.Amount = Convert.ToDecimal(7850.75);
            //modelList.Add(model);

            //model = new PaymentListViewModel();
            //model.ProblemID = 10522;
            //model.ProblemTitle = "DVD Player";
            //model.OppositeUserFirstName = "Alex";
            //model.OppositeUserLastName = "D'Souza";
            //model.OppositeUserImagepath = ServerSettings.WebApplicationURL + "/upload/profilepic/Sean-McPheat-Profile-Pic.jpg";
            //model.PaymentDate = DateTime.Now;
            //model.Amount = Convert.ToDecimal(3000.99);
            //modelList.Add(model);
            //if (modelList.Count > 0)
            //{
            //    totalRecords = 2;
            //}
            //int totalPagesCount = (int)Math.Ceiling((float)totalRecords / (float)_PageSize);
            //ViewBag.TotalPagesCount = totalPagesCount;
            //ViewBag.PageNumber = 1;
            //return View(modelList);
        }
        public ActionResult SearchProblem(int Category, int SubCategory, int CompanyID, int Area, int Pincode, string Location, string ModelNo,
                                         string ProblemHeading, string hastag, int posteddate)
        {
            ResponseObjectForAnything responseObject = new ResponseObjectForAnything();
            List<Problem> lstproblem = new List<Common.DTO.Problem>();
            ProblemEngine probEngine = new ProblemEngine();

            string response = probEngine.GetProblemsBySearchCriteriaJSON(Request.Cookies["sessionkey"].Value, "1", "5", UserSession.LoginLatitude, UserSession.LoginLongitude,
                                                                        Location, Area.ToString(), Category.ToString(), SubCategory.ToString(), CompanyID.ToString(), ModelNo, ProblemHeading, posteddate.ToString());
            responseObject = (ResponseObjectForAnything)Serializer.JSONStringToObject<ResponseObjectForAnything>(response);
            lstproblem = (List<Problem>)Serializer.JSONStringToObject<List<Problem>>(responseObject.ResultObjectJSON);
            ViewBag.NextPageIndex = 2;
            ViewBag.CategoryPageSize = CategoryPageSize;
            if (Request.Url.AbsolutePath.ToLower().Contains("myresolution"))
                ViewBag.ActiveMenu = "LiMyResolution";
            int totalPagesCount = (int)Math.Ceiling((float)responseObject.ResultObjectRecordCount / (float)_PageSize);
            ViewBag.TotalPagesCount = totalPagesCount;
            ViewBag.PageNumber = 1;
            ViewBag.TotalRecordCount = responseObject.ResultObjectRecordCount;
              return PartialView("_ProblemList", lstproblem);
        }
        public ActionResult RecentProblemResolutionList()
        {
            List<RecentProblemObject> recentprobobj = new List<RecentProblemObject>();
            ResponseObjectForAnything responseObject = new ResponseObjectForAnything();
            ProblemEngine probEngine = new ProblemEngine();
            string response = probEngine.GetRecentProblemsJSON(Request.Cookies["sessionkey"].Value);
            responseObject = (ResponseObjectForAnything)Serializer.JSONStringToObject<ResponseObjectForAnything>(response);
            recentprobobj = (List<RecentProblemObject>)Serializer.JSONStringToObject<List<RecentProblemObject>>(responseObject.ResultObjectJSON);
            return PartialView("_RecentProblems", recentprobobj);
            //List<RecentProblemResolutionViewModel> model = new List<RecentProblemResolutionViewModel>();
            //RecentProblemResolutionViewModel recentProblemModel = null;

            //recentProblemModel = new RecentProblemResolutionViewModel();
            //recentProblemModel.ProblemID = 1;
            //recentProblemModel.ProblemImagePath = ServerSettings.WebApplicationURL + "/upload/problem-image/1.jpg";
            //recentProblemModel.ProblemTitle = "Washing Machine";
            //recentProblemModel.Description = "To troubleshoot your product, enter the model number in the search box below. After entering your model number, we’ll list the most common symptoms for your product. Once you select a symptom, we’ll identify the model-specific parts and/or conditions that are associated with that symptom.";
            //model.Add(recentProblemModel);

            //recentProblemModel = new RecentProblemResolutionViewModel();
            //recentProblemModel.ProblemID = 2;
            //recentProblemModel.ProblemImagePath = ServerSettings.WebApplicationURL + "/upload/problem-image/2.jpg";
            //recentProblemModel.ProblemTitle = "Freezer Cooling";
            //recentProblemModel.Description = "To troubleshoot your product, enter the model number in the search box below. After entering your model number, we’ll list the most common symptoms for your product. Once you select a symptom, we’ll identify the model-specific parts and/or conditions that are associated with that symptom.";
            //model.Add(recentProblemModel);

            //recentProblemModel = new RecentProblemResolutionViewModel();
            //recentProblemModel.ProblemID = 3;
            //recentProblemModel.ProblemImagePath = ServerSettings.WebApplicationURL + "/upload/problem-image/3.jpg";
            //recentProblemModel.ProblemTitle = "Ac power supply";
            //recentProblemModel.Description = "To troubleshoot your product, enter the model number in the search box below. After entering your model number, we’ll list the most common symptoms for your product. Once you select a symptom, we’ll identify the model-specific parts and/or conditions that are associated with that symptom.";
            //model.Add(recentProblemModel);

            //recentProblemModel = new RecentProblemResolutionViewModel();
            //recentProblemModel.ProblemID = 4;
            //recentProblemModel.ProblemImagePath = ServerSettings.WebApplicationURL + "/upload/problem-image/4.jpg";
            //recentProblemModel.ProblemTitle = "Washing Machine";
            //recentProblemModel.Description = "To troubleshoot your product, enter the model number in the search box below. After entering your model number, we’ll list the most common symptoms for your product. Once you select a symptom, we’ll identify the model-specific parts and/or conditions that are associated with that symptom.";
            //model.Add(recentProblemModel);

            //recentProblemModel = new RecentProblemResolutionViewModel();
            //recentProblemModel.ProblemID = 5;
            //recentProblemModel.ProblemImagePath = ServerSettings.WebApplicationURL + "/upload/problem-image/5.jpg";
            //recentProblemModel.ProblemTitle = "Acc Cooling";
            //recentProblemModel.Description = "To troubleshoot your product, enter the model number in the search box below. After entering your model number, we’ll list the most common symptoms for your product. Once you select a symptom, we’ll identify the model-specific parts and/or conditions that are associated with that symptom.";
            //model.Add(recentProblemModel);
            //return PartialView("_RecentProblems", model);
        }
        public ActionResult CreateProblem(Problem model, FormCollection form)
        {
            var experts = Request.Form["UserSuggestedExperts"];
            var tags = Request.Form["Tag"];
            HttpFileCollectionBase files = Request.Files;
            ProblemEngine probEngine = new ProblemEngine();
            ResponseObjectForAnything responseObject = new ResponseObjectForAnything();
            CreateProblemObject complexmodel = new CreateProblemObject();
            GetInitialDropDowns(complexmodel);
            int count = 0;
            int actualcount = 0;
            int problemid = 0;
            string[] filePaths = new string[Request.Files.Count];
            string[] fileExtns = new string[Request.Files.Count];
            if (form["ResolutionMethod"] == "Yes")
                form["ResolutionMethod"] = "true";
            else
                form["ResolutionMethod"] = "false";
            if (form["RegisteredAddress"] == "Yes")
                form["RegisteredAddress"] = "true";
            else
                form["RegisteredAddress"] = "false";
            string resultmessage = "";
            if (files.Count > 0)
            {
                foreach (string file in Request.Files)
                {
                    HttpPostedFileBase hpf = Request.Files[count] as HttpPostedFileBase;

                    if (hpf.ContentLength > 0)
                    {
                        string newFileName = Guid.NewGuid().ToString() + "_" + hpf.FileName.Replace(" ", "_");
                        string relativePath = @"~\upload\problem-image\" + newFileName;
                        hpf.SaveAs(Server.MapPath(relativePath));
                        filePaths[actualcount] = ConfigurationManager.AppSettings["ApplicationURL"] + ConfigurationManager.AppSettings["problemimage"] + newFileName;
                        if (newFileName.ToLower().Contains("gif") || newFileName.ToLower().Contains("png") || newFileName.ToLower().Contains("jpg") || newFileName.ToLower().Contains("jpeg"))
                            fileExtns[actualcount] = "image";
                        else
                            fileExtns[actualcount] = "video";
                        actualcount++;
                    }
                    count++;
                }
            }
            string response = probEngine.SaveProblemJSON(Request.Cookies["sessionkey"].Value, null, form["CompanyRelated"], form["CompanyID"], form["ProblemHeading"],
                            form["CategoryID"], form["SubCategory"], form["Product"], form["ModelNo"], form["Description"], form["PurchaseMonth"], form["PurchaseYear"],
                            form["ProductStatusID"], form["ResolutionNeededBy"], form["Tag"], form["ResolutionMethod"], form["RegisteredAddress"], form["AddressLine1"],
                            form["AddressLine2"], form["AddressLine3"], form["City"], form["State"], form["Country"], form["Pincode"]);
            if (!string.IsNullOrEmpty(response)) { responseObject = (ResponseObjectForAnything)Serializer.JSONStringToObject<ResponseObjectForAnything>(response); }
            problemid = responseObject.ResultObjectID;
            bool isValid = false;
            if(responseObject.ResultCode == "SUCCESS")
            {
                isValid = true;
                resultmessage = responseObject.ResultMessage;
                for (int fileCt = 0; fileCt < actualcount; fileCt++)
                {
                    if(filePaths[fileCt] != string.Empty)
                    {
                        response = "";
                        if(fileCt == 0)
                            response = probEngine.SaveMedia(Request.Cookies["sessionkey"].Value, responseObject.ResultObjectID.ToString(), filePaths[fileCt], fileExtns[fileCt], true);
                        else
                            response = probEngine.SaveMedia(Request.Cookies["sessionkey"].Value, responseObject.ResultObjectID.ToString(), filePaths[fileCt], fileExtns[fileCt], false);
                    }
                }
                responseObject = (ResponseObjectForAnything)Serializer.JSONStringToObject<ResponseObjectForAnything>(response);

                if(responseObject.ResultCode == "SUCCESS")
                {
                    if(experts.Count() > 0)
                    {
                        response = probEngine.InviteExpertsJSON(Request.Cookies["sessionkey"].Value, problemid.ToString(), experts);
                        responseObject = (ResponseObjectForAnything)Serializer.JSONStringToObject<ResponseObjectForAnything>(response);
                        if(responseObject.ResultCode == "SUCCESS")
                        {
                            isValid = true;
                        }
                    }
                }
                else
                {
                    isValid = false;
                }
            }
            else
            {
                isValid = false;
            }
            if(!isValid)
            {
                Common.DTO.Alert alert = new Common.DTO.Alert();
                alert.AlertType = Common.DTO.Alert.ALERTTYPE.Error;
                alert.Message = responseObject.ResultMessage;
                alert.MessageType = Common.DTO.Alert.ALERTMESSAGETYPE.OnlyText;
                ViewBag.AlertMessageModel = alert;
            }
            else
            {
                Common.DTO.Alert alert = new Common.DTO.Alert();
                alert.AlertType = Common.DTO.Alert.ALERTTYPE.Success;
                alert.Message = responseObject.ResultMessage;
                alert.MessageType = Common.DTO.Alert.ALERTMESSAGETYPE.TextWithClose;
                ViewBag.AlertMessageModel = alert;
            }
            //if (!string.IsNullOrEmpty(model.VideoStremName1))
            //{
            //    string DirectoryName = ServerSettings.VideoStoragePhysicalFolderPath;

            //    int status = Mapping.ConvertToMp4(ServerSettings.MEDIASERVERURL, model.VideoStremName1 + ".flv", DirectoryName, model.VideoStremName1 + ".mp4");

            //}
            //if (!string.IsNullOrEmpty(model.VideoStremName2))
            //{
            //    string DirectoryName = ServerSettings.VideoStoragePhysicalFolderPath;

            //    int status = Mapping.ConvertToMp4(ServerSettings.MEDIASERVERURL, model.VideoStremName2 + ".flv", DirectoryName, model.VideoStremName2 + ".mp4");

            //}
            return View(complexmodel);
        }
 public ActionResult CompanyProfile(int id)
 {
     List<Company> lstcompany = new List<Company>();
     ResponseObjectForAnything responseObject = new ResponseObjectForAnything();
     MasterlistEngine masterEngine = new MasterlistEngine();
     string response = masterEngine.GetCompanyListJSON(Request.Cookies["sessionkey"].Value);
     responseObject = (ResponseObjectForAnything)Serializer.JSONStringToObject<ResponseObjectForAnything>(response);
     lstcompany = (List<Company>)Serializer.JSONStringToObject<List<Company>>(responseObject.ResultObjectJSON);
     return PartialView("_CompanyProfile", lstcompany);
     //CompanyProfileComplexModel model = new CompanyProfileComplexModel();
     //model.CompanyId = 1;
     //model.CompanyLogo = "~/assets/img/walmart.png";
     //model.CompanyName = "WallMart Group Inc.";
     //model.Description = " Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.";
     //model.CompanySupportWeekdaysStartTime = "09:00 AM";
     //model.CompanySupportWeekdaysEndTime = "06:00 PM";
     //model.CompanySupportWeekendsEndTime = "06:00 AM";
     //model.CompanySupportWeekendsStartTime = "09:00 AM";
     //model.Address1 = "WalMart Inc.";
     //model.Address2 = "795 Park Ave, Suite 120";
     //model.Address3 = "Dalal Street";
     //model.City = "Texas";
     //model.StateName = "Texas Repulic";
     //model.PinCode = "94107";
     //model.CompanyEmail = "*****@*****.**";
     //model.CompanyPhone = "000-666-444";
     //model.Latitude = Convert.ToDecimal(76.1111111);
     //model.Longitude = Convert.ToDecimal(76.1111111);
     //return PartialView("_CompanyProfile", model);
 }
        /// <summary>
        /// Action for Get Reolution Detail By ResoluitionID
        /// </summary>
        /// <param name="pResolutionID">ID of a resolution of which a detail needs to be get</param>
        /// <returns></returns>
        public ActionResult Resolution(int pResolutionID)
        {
            //ViewBag.resolutionid = pResolutionID;
            ResolutionObject resolutionobj = new ResolutionObject();
            ResponseObjectForAnything responseObject = new ResponseObjectForAnything();
            BidEngine bidEngine = new BidEngine();
            string response = bidEngine.GetResolutionDetailsByIdJSON(Request.Cookies["sessionkey"].Value, pResolutionID.ToString());
            responseObject = (ResponseObjectForAnything)Serializer.JSONStringToObject<ResponseObjectForAnything>(response);
            resolutionobj = (ResolutionObject)Serializer.JSONStringToObject<ResolutionObject>(responseObject.ResultObjectJSON);
            return PartialView("_Resolution", resolutionobj);
            //ResoulutionDetailViewModel model = new ResoulutionDetailViewModel();

            //model.ProblemBidViewModel.ID = pResolutionID;
            //model.ProblemBidViewModel.ProblemID = 1;
            //model.ProblemBidViewModel.UserID = 1;
            //model.ProblemBidViewModel.Description = "Having good experice of working with electronics";
            //model.ProblemBidViewModel.ResolutionMethodID = 1;
            //model.ProblemBidViewModel.ResolutionMethodName = "Onsite Visit Required";
            //model.ProblemBidViewModel.QuickBloxUserID = "5815727";
            //model.ProblemBidViewModel.ResolutionLink1 = "http://www.facebook.com";
            //model.ProblemBidViewModel.ResolutionLink2 = "http://www.google.com";
            //model.ProblemBidViewModel.Amount = 1200M;
            //model.ProblemBidViewModel.FirstName = "Charles";
            //model.ProblemBidViewModel.LastName = "Brown";
            //model.ProblemBidViewModel.IsSelected = true;

            //ResolutionMediaViewModel resolutionMediaViewModel = null;

            //for (int i = 1; i < 5; i++)
            //{
            //    resolutionMediaViewModel = new ResolutionMediaViewModel();
            //    resolutionMediaViewModel.ID = i;
            //    resolutionMediaViewModel.BidID = 1;
            //    resolutionMediaViewModel.IsImage = true;
            //    resolutionMediaViewModel.ResolutionMediaPath = ServerSettings.WebApplicationURL + "/assets/images/ProblemResolution/" + i.ToString() + ".JPG";
            //    model.ResolutionMediaViewModelList.Add(resolutionMediaViewModel);
            //}

            //for (int i = 5; i < 7; i++)
            //{
            //    resolutionMediaViewModel = new ResolutionMediaViewModel();
            //    resolutionMediaViewModel.ID = i;
            //    resolutionMediaViewModel.BidID = 1;
            //    resolutionMediaViewModel.IsImage = false;
            //    resolutionMediaViewModel.ResolutionMediaPath = ServerSettings.WebApplicationURL + "/upload/video/robotic.mp4";
            //    model.ResolutionMediaViewModelList.Add(resolutionMediaViewModel);
            //}

            //ResolutionProposedTime resolutionProposedTime = null;

            //resolutionProposedTime = new ResolutionProposedTime();
            //resolutionProposedTime.ID = 1;
            //resolutionProposedTime.BidID = 1;
            //resolutionProposedTime.ProposedTime = CommonLogic.CDate("10-09-2015 11:35 AM");
            //resolutionProposedTime.MeetingType = MEETINGTYPE.FaceToFace.GetHashCode();
            //resolutionProposedTime.CreatedByUserID = 1;
            //resolutionProposedTime.IsSelected = true;
            //resolutionProposedTime.CreatedBy = "Expert";
            //model.ResolutionProposedTimeList.Add(resolutionProposedTime);

            //resolutionProposedTime = new ResolutionProposedTime();
            //resolutionProposedTime.ID = 2;
            //resolutionProposedTime.BidID = 1;
            //resolutionProposedTime.ProposedTime = CommonLogic.CDate("10-15-2015 4:45 PM");
            //resolutionProposedTime.MeetingType = MEETINGTYPE.Video.GetHashCode();
            //resolutionProposedTime.CreatedByUserID = 1;
            //resolutionProposedTime.IsSelected = true;
            //resolutionProposedTime.CreatedBy = "Expert";
            //model.ResolutionProposedTimeList.Add(resolutionProposedTime);

            //resolutionProposedTime = new ResolutionProposedTime();
            //resolutionProposedTime.ID = 3;
            //resolutionProposedTime.BidID = 1;
            //resolutionProposedTime.ProposedTime = CommonLogic.CDate("10-15-2015 4:45 PM");
            //resolutionProposedTime.MeetingType = MEETINGTYPE.Video.GetHashCode();
            //resolutionProposedTime.CreatedByUserID = 2;
            //resolutionProposedTime.IsSelected = true;
            //resolutionProposedTime.CreatedBy = "User";
            //model.ResolutionProposedTimeList.Add(resolutionProposedTime);

            //resolutionProposedTime = new ResolutionProposedTime();
            //resolutionProposedTime.ID = 3;
            //resolutionProposedTime.BidID = 1;
            //resolutionProposedTime.ProposedTime = CommonLogic.CDate("10-09-2015 11:35 AM");
            //resolutionProposedTime.MeetingType = MEETINGTYPE.Video.GetHashCode();
            //resolutionProposedTime.CreatedByUserID = 2;
            //resolutionProposedTime.IsSelected = true;
            //resolutionProposedTime.CreatedBy = "User";
            //model.ResolutionProposedTimeList.Add(resolutionProposedTime);

            //return PartialView("_Resolution", model);
        }