Exemple #1
0
        //================================== Fill Client Grid Code For Client Details in BD ===========================================

        public StaticPagedList <FetchClientBD> Loc_ContGridList(int?page, int?client_id)
        {
            jobDbContext  _db        = new jobDbContext();
            var           pageIndex  = (page ?? 1);
            const int     pageSize   = 5;
            int           totalCount = 5;
            FetchClientBD Ulist      = new FetchClientBD();

            IEnumerable <FetchClientBD> result = _db.ClientBDList.SqlQuery(@"exec USP_FetchClientcontact_details
                   @Client_ID,@pPageIndex, @pPageSize",
                                                                           new SqlParameter("@Client_ID", client_id),
                                                                           new SqlParameter("@pPageIndex", pageIndex),
                                                                           new SqlParameter("@pPageSize", pageSize)

                                                                           ).ToList <FetchClientBD>();

            totalCount = 0;
            if (result.Count() > 0)
            {
                totalCount = Convert.ToInt32(result.FirstOrDefault().TotalRows);
            }
            var itemsAsIPagedList = new StaticPagedList <FetchClientBD>(result, pageIndex, pageSize, totalCount);

            return(itemsAsIPagedList);
        }
Exemple #2
0
        //================================== Fetch client details for update Code For Business Developer===========================================

        public ActionResult FetchClinetBusiness(int client_id)
        {
            try
            {
                EditClient data = new EditClient();

                jobDbContext _db    = new jobDbContext();
                var          result = _db.EDTCList.SqlQuery(@"exec usp_ClientDetailsforupdate 
                @client_id",
                                                            new SqlParameter("@client_id", client_id)).ToList <EditClient>();

                data = result.FirstOrDefault();

                //data.RoleID = 0;
                ViewData["BusinessTypeList"] = binddropdown("BusinessTypeList", 0);
                ViewData["LocationList"]     = binddropdown("LocationList", 0);
                ViewData["ClientTypeList"]   = binddropdown("ClientTypeList", 0);
                return(Request.IsAjaxRequest()
                       ? (ActionResult)PartialView("_EditClientBusiness", data)
                       : View("_EditClientBusiness", data));
            }
            catch (Exception ex)
            {
                string message = string.Format("<b>Message:</b> {0}<br /><br />", ex.Message);
                return(RedirectToAction("_EditClientBusiness"));
            }
            finally
            {
            }
        }
Exemple #3
0
        public StaticPagedList <clientLocationdetails> CllientLocationDetailsList(int?page, int?client_id)
        {
            jobDbContext          _db        = new jobDbContext();
            var                   pageIndex  = (page ?? 1);
            const int             pageSize   = 10;
            int                   totalCount = 10;
            clientLocationdetails Ulist      = new clientLocationdetails();

            IEnumerable <clientLocationdetails> result = _db.clientLocationdetails.SqlQuery(@"exec USP_FetchClientLocation_details
                  @ClientId,@pPageIndex, @pPageSize",
                                                                                            new SqlParameter("@ClientId", client_id),
                                                                                            new SqlParameter("@pPageIndex", pageIndex),
                                                                                            new SqlParameter("@pPageSize", pageSize)

                                                                                            ).ToList <clientLocationdetails>();

            totalCount = 0;
            if (result.Count() > 0)
            {
                totalCount = Convert.ToInt32(result.FirstOrDefault().TotalRows);
            }
            var itemsAsIPagedList = new StaticPagedList <clientLocationdetails>(result, pageIndex, pageSize, totalCount);

            return(itemsAsIPagedList);
        }
Exemple #4
0
        public ActionResult Edit_ClientBusiness(EditClient rs)
        {
            try
            {
                jobDbContext _db    = new jobDbContext();
                var          result = _db.Database.ExecuteSqlCommand(@"exec [USP_UpdateClientMaster] 
                @client_id,@Client_Name,@Client_Type_id,@location_id,@address,@DID_no,@fax_no,@Manifactring,@products,@compitators,@buissType_id,@update_date",
                                                                     new SqlParameter("@client_id", rs.client_id),
                                                                     new SqlParameter("@Client_Name", rs.Client_Name),
                                                                     new SqlParameter("@Client_Type_id", rs.Client_Type_id),
                                                                     new SqlParameter("@location_id", rs.location_id == null ? (object)DBNull.Value : rs.location_id),
                                                                     new SqlParameter("@address", rs.address == null ? (object)DBNull.Value : rs.address),
                                                                     new SqlParameter("@DID_no", rs.DID_no == null ? (object)DBNull.Value : rs.DID_no),
                                                                     new SqlParameter("@fax_no", rs.fax_no == null ? (object)DBNull.Value : rs.fax_no),
                                                                     new SqlParameter("@Manifactring", rs.Manifactring == null ? (object)DBNull.Value : rs.Manifactring),
                                                                     new SqlParameter("@products", rs.products == null ? (object)DBNull.Value : rs.products),
                                                                     new SqlParameter("@compitators", rs.compitators == null ? (object)DBNull.Value : rs.compitators),
                                                                     new SqlParameter("@buissType_id", rs.buissType_id == null ? (object)DBNull.Value : rs.buissType_id),
                                                                     new SqlParameter("@update_date", DateTime.Now)
                                                                     );
                return(Json("IndexForBusinessDev"));
            }

            catch (Exception ex)
            {
                string message = string.Format("<b>Message:</b> {0}<br /><br />", ex.Message);
                return(View("IndexForBusinessDev", message));
            }
        }
Exemple #5
0
        public ActionResult Login(Login L, string ReturnUrl)
        {
            jobDbContext _db    = new jobDbContext();
            var          result = _db.LoginDetail.SqlQuery(@"exec usp_login 
                @User_Name,@Password",
                                                           new SqlParameter("@User_Name", L.UserName == null ? (object)DBNull.Value : L.UserName),
                                                           new SqlParameter("@Password", L.Password == null ? (object)DBNull.Value : L.Password)).ToList <Login>();

            // LoginDetail data = new LoginDetail();
            L = result.FirstOrDefault();
            if (L == null)
            {
                ViewBag.error = "Please enter valid user Name password";
            }
            else
            {
                Session["UserName"] = L.UserName;
                Session["User_id"]  = L.User_ID;
                Session["RoleID"]   = L.Role;

                return(RedirectToAction("Index", "Master"));
            }

            return(View());
        }
        public ActionResult add_MultipalVertical(Requirement[] Requirement)
        {
            try
            {
                var          result = 0;
                jobDbContext _db    = new jobDbContext();
                foreach (var item in Requirement)
                {
                    Requirement O = new Requirement();
                    O.SectorId = item.SectorId;
                    result     = _db.Database.ExecuteSqlCommand(@"exec USP_AddUserVerticals 
                    @UserId,@VerticalID",
                                                                new SqlParameter("@UserId", Convert.ToInt16(Session["User_id"].ToString())),
                                                                new SqlParameter("@VerticalID", O.SectorId));
                }

                return(Json(result, JsonRequestBehavior.AllowGet));
            }

            catch (Exception ex)
            {
                string message = string.Format("<b>Message:</b> {0}<br /><br />", ex.Message);
                return(View("IndexForDesignation"));
                //return PartialView(rs);
            }
        }
Exemple #7
0
        public ActionResult Address(int?client_id)
        {
            try
            {
                BusinessDev data = new BusinessDev();

                jobDbContext _db = new jobDbContext();


                var result = _db.clientdetails.SqlQuery(@"exec Usp_GetClientDetails
                @Client_ID",
                                                        new SqlParameter("@Client_ID", client_id)).ToList <BusinessDev>();

                data = result.FirstOrDefault();
                if (data == null)
                {
                    ViewBag.Javascript = "<script language='javascript' type='text/javascript'>alert('Data Already Exists');</script>";
                    return(RedirectToAction("IndexForBusinessDev", "BussinessDev"));
                }
                return(Request.IsAjaxRequest()
                     ? (ActionResult)PartialView("Address", data)
                     : View("Address", data));
            }
            catch (Exception ex)
            {
                string message = string.Format("<b>Message:</b> {0}<br /><br />", ex.Message);
                return(RedirectToAction("Address"));
            }
            finally
            {
            }
        }
Exemple #8
0
        public JsonResult GetRoleList()
        {
            jobDbContext _db     = new jobDbContext();
            var          lstItem = binddropdown("RoleName", 0).Select(i => new { i.Value, i.Text }).ToList();

            //_spService.BindDropdown("PricingUser", "", "").Select(i => new { i.Value, i.Text }).ToList();
            return(Json(lstItem, JsonRequestBehavior.AllowGet));
        }
        public ActionResult DeleteVehical(int vehicalid)
        {
            jobDbContext _db    = new jobDbContext();
            var          result = _db.Database.ExecuteSqlCommand(@"exec USP_DeleteUserVerticals @UserId,@VerticalID",
                                                                 new SqlParameter("@UserId", Convert.ToInt16(Session["User_id"].ToString())),
                                                                 new SqlParameter("@VerticalID", vehicalid));

            return(Json("Deleted sucessfully"));
        }
        public ActionResult DisplayRecruiterProfile(int?userid)
        {
            jobDbContext db     = new jobDbContext();
            var          result = db.editlist.SqlQuery(@"exec disp @Id", new SqlParameter("@Id", Convert.ToInt16(Session["User_id"].ToString()))).ToList <RecruiterList>();

            RecruiterList ed = new RecruiterList();

            ed = result.FirstOrDefault();
            return(View("DisplayRecruiterProfile", ed));
        }
        public void setUserOnlineStatus(int?userid)
        {
            jobDbContext _db    = new jobDbContext();
            var          result = _db.Database.ExecuteSqlCommand(@"exec UpdateUSerOnlineStatus 
                @UserId,@status",
                                                                 new SqlParameter("@UserId", userid),
                                                                 new SqlParameter("@status", 1));

            Session["OnlineStatus"] = 1;
        }
        public ActionResult AddRecruiterProfile(int?userid)
        {
            ViewData["LocationList"] = binddropdown("LocationList", 0);
            jobDbContext  db     = new jobDbContext();
            var           result = db.editlist.SqlQuery(@"exec disp @Id", new SqlParameter("@Id", 39)).ToList <RecruiterList>();
            RecruiterList ed     = new RecruiterList();

            ed = result.FirstOrDefault();
            return(View("AddRecruiterProfile", ed));
        }
Exemple #13
0
        public ActionResult ColumnChart()
        {
            jobDbContext _db = new jobDbContext();

            IEnumerable <StackedChartData> result = _db.StackedChartData.SqlQuery(@"exec GetSalesChart").ToList <StackedChartData>();

            return(Request.IsAjaxRequest()
                    ? (ActionResult)PartialView("ColumnChart", result)
                    : View("ColumnChart", result));
        }
Exemple #14
0
        public ActionResult ContactPersonDetails(int?client_id)
        {
            ClientContactDetails data = new ClientContactDetails();
            jobDbContext         _db  = new jobDbContext();
            var result = _db.CCList.SqlQuery(@"exec GetClientContactDetails 
                @client_id",
                                             new SqlParameter("@client_id", client_id)).ToList <ClientContactDetails>();

            return(Request.IsAjaxRequest()
                ? (ActionResult)PartialView("ContactPersonDetails", result)
                : View("ContactPersonDetails", data));
        }
Exemple #15
0
        public ActionResult SharePosition(int?Req_id)
        {
            jobDbContext _db = new jobDbContext();

            IEnumerable <Userdetailsforpositionshare> result = _db.Userdetailsforpositionshare.SqlQuery(@"exec [GetUserDetails] @Req_id",
                                                                                                        new SqlParameter("@Req_id", Req_id == null ? (object)DBNull.Value : Req_id)).ToList <Userdetailsforpositionshare>();

            Session["reqid"] = Req_id;
            return(Request.IsAjaxRequest()
                    ? (ActionResult)PartialView("SharePosition", result)
                    : View("SharePosition", result));
        }
        //EditRecruiterProfile
        public ActionResult FetchRecruiterProfile(int?userid)
        {
            ViewData["LocationList"]       = binddropdown("LocationList", 0);
            ViewData["PositionSectorList"] = binddropdown("PositionSector", 0);
            jobDbContext db     = new jobDbContext();
            var          result = db.editlist.SqlQuery(@"exec disp @Id", new SqlParameter("@Id", userid)).ToList <RecruiterList>();

            RecruiterList ed = new RecruiterList();

            ed = result.FirstOrDefault();
            ViewBag.Verticaldata = result.FirstOrDefault().VerticalId;
            return(View("FetchRecruiterProfile", ed));
        }
Exemple #17
0
        public ActionResult DashboardData(int?Locationid, string sectorname = "")
        {
            jobDbContext _db = new jobDbContext();

            IEnumerable <DashbardData> result = _db.DashbardData.SqlQuery(@"exec GetDashbordPositionData @location_id, @Sector_name",
                                                                          new SqlParameter("@location_id", Locationid),
                                                                          new SqlParameter("@Sector_name", sectorname)).ToList <DashbardData>();

            return(Request.IsAjaxRequest()
                    ? (ActionResult)PartialView("DashboardData", result)
                    : View("DashboardData", result));
            //return View(StackedChartData.GetData());
        }
Exemple #18
0
        public ActionResult DashboardCityData()
        {
            using (jobDbContext context = new jobDbContext())
            {
                DataTable dt = new DataTable();
                DataSet   ds = new DataSet();

                var conn            = context.Database.Connection;
                var connectionState = conn.State;
                try
                {
                    if (connectionState != ConnectionState.Open)
                    {
                        conn.Open();
                    }
                    using (var cmd = conn.CreateCommand())
                    {
                        cmd.CommandText = "GetDashboardCityData";

                        cmd.CommandType = CommandType.StoredProcedure;
                        //cmd.Parameters.Add(new SqlParameter("@suppliername", suppliername));
                        using (var reader = cmd.ExecuteReader())
                        {
                            dt.Load(reader);
                        }
                    }
                }
                catch (Exception ex)
                {
                    // error handling
                    var messege = ex.Message;
                }
                finally
                {
                    if (connectionState != ConnectionState.Closed)
                    {
                        conn.Close();
                    }
                }
                // TempData["Data"] = dt;

                return(Request.IsAjaxRequest()
                      ? (ActionResult)PartialView("DashboardCityData", dt)
                      : View("DashboardCityData", dt));
            }
        }
Exemple #19
0
        public List <SelectListItem> binddropdown(string action, int val = 0)
        {
            jobDbContext _db = new jobDbContext();

            var res = _db.Database.SqlQuery <SelectListItem>("exec USP_BindDropDown @action , @val",
                                                             new SqlParameter("@action", action),
                                                             new SqlParameter("@val", val))
                      .ToList()
                      .AsEnumerable()
                      .Select(r => new SelectListItem
            {
                Text     = r.Text.ToString(),
                Value    = r.Value.ToString(),
                Selected = r.Value.Equals(Convert.ToString(val))
            }).ToList();

            return(res);
        }
        public void setPermissionData(int userid)
        {
            using (jobDbContext context = new jobDbContext())
            {
                DataTable dt = new DataTable();
                DataSet   ds = new DataSet();

                var conn            = context.Database.Connection;
                var connectionState = conn.State;
                try
                {
                    if (connectionState != ConnectionState.Open)
                    {
                        conn.Open();
                    }
                    using (var cmd = conn.CreateCommand())
                    {
                        cmd.CommandText = "GetUserPermissionDetail";

                        cmd.CommandType = CommandType.StoredProcedure;
                        cmd.Parameters.Add(new SqlParameter("@userid", userid));
                        using (var reader = cmd.ExecuteReader())
                        {
                            dt.Load(reader);
                        }
                    }
                    Session["UserPermission"] = dt;
                }

                catch (Exception ex)
                {
                    // error handling
                    var messege = ex.Message;
                }
                finally
                {
                    if (connectionState != ConnectionState.Closed)
                    {
                        conn.Close();
                    }
                }
            }
        }
        public ActionResult Login(Login L)
        {
            jobDbContext _db    = new jobDbContext();
            var          result = _db.LoginDetail.SqlQuery(@"exec usp_login 
                @User_Name,@Password",
                                                           new SqlParameter("@User_Name", L.UserName),
                                                           new SqlParameter("@Password", L.Password)).ToList <LoginDetail>();
            LoginDetail data = new LoginDetail();

            data = result.FirstOrDefault();

            if (data == null)
            {
                ViewBag.error = "Please enter valid user Name password";
            }
            else
            {
                Session["UserName"] = data.User_Name;
                Session["User_id"]  = data.User_id;
                Session["RoleName"] = data.RoleName;
                Session["RoleID"]   = data.RoleID;


                setPermissionData(data.User_id);   //set user permission to session using data table
                setUserOnlineStatus(data.User_id); //set userlogin status

                if (data.RoleName == "Business development")
                {
                    return(RedirectToAction("IndexForBusinessDev", "BussinessDev"));
                }
                else if (data.RoleID == 7)
                {
                    return(RedirectToAction("AdminIndex", "Admin"));
                }
                else
                {
                    return(RedirectToAction("Index", "Placement"));
                }
            }

            return(View());
        }
        public StaticPagedList <CustomerList> GridList(int?page, int?PageRowNumber, String CName = "")
        {
            jobDbContext _db        = new jobDbContext();
            var          pageIndex  = (page ?? 1);
            int          pageSize   = (PageRowNumber ?? 8);
            int          totalCount = (PageRowNumber ?? 8);
            CustomerList clist      = new CustomerList();

            IEnumerable <CustomerList> result = _db.CList.SqlQuery(@"exec USP_GetCustomerList
              @pPageIndex, @pPageSize,@cName",
                                                                   new SqlParameter("@pPageIndex", pageIndex),
                                                                   new SqlParameter("@pPageSize", pageSize),
                                                                   new SqlParameter("cName", CName == null ? (object)DBNull.Value : CName)
                                                                   ).ToList <CustomerList>();

            totalCount = 0;
            if (result.Count() > 0)
            {
                totalCount = Convert.ToInt32(result.FirstOrDefault().TotalRows);
            }
            var itemsAsIPagedList = new StaticPagedList <CustomerList>(result, pageIndex, pageSize, totalCount);

            return(itemsAsIPagedList);
        }
Exemple #23
0
        //================================== Fill Client Grid Code For Business Developer ===========================================

        public StaticPagedList <ClientGrid> BusinessDevGridList(int?page, String Name = "")
        {
            jobDbContext _db        = new jobDbContext();
            var          pageIndex  = (page ?? 1);
            const int    pageSize   = 10;
            int          totalCount = 10;
            ClientGrid   Ulist      = new ClientGrid();

            IEnumerable <ClientGrid> result = _db.ClientGrid.SqlQuery(@"exec USP_FetchClient
                   @pPageIndex, @pPageSize,@Name",
                                                                      new SqlParameter("@pPageIndex", pageIndex),
                                                                      new SqlParameter("@pPageSize", pageSize),
                                                                      new SqlParameter("@Name", Name == null ? (object)DBNull.Value : Name)
                                                                      ).ToList <ClientGrid>();

            totalCount = 0;
            if (result.Count() > 0)
            {
                totalCount = Convert.ToInt32(result.FirstOrDefault().TotalRows);
            }
            var itemsAsIPagedList = new StaticPagedList <ClientGrid>(result, pageIndex, pageSize, totalCount);

            return(itemsAsIPagedList);
        }
        public ActionResult SaveRecruiterProfile(RecruiterList cl)
        {
            // Checking no of files injected in Request object
            if (Request.Files.Count > 0)
            {
                try
                {
                    //  Get all files from Request object
                    HttpFileCollectionBase files = Request.Files;
                    for (int i = 0; i < files.Count; i++)
                    {
                        HttpPostedFileBase file = files[i];
                        string             fname;

                        if (Request.Browser.Browser.ToUpper() == "IE" || Request.Browser.Browser.ToUpper() == "INTERNETEXPLORER")
                        {
                            string[] testfiles = file.FileName.Split(new char[] { '\\' });
                            fname = testfiles[testfiles.Length - 1];
                        }
                        else
                        {
                            fname = file.FileName;
                        }

                        var name            = Request.Form[0].ToString();
                        var summery         = Request.Form[1].ToString();
                        var totalYearsOfExp = Request.Form[2].ToString();
                        var location        = Request.Form[3].ToString();
                        var graduation      = Request.Form[4].ToString();
                        var PG = Request.Form[5].ToString();
                        var currentlyWorkingWith = Request.Form[6].ToString();
                        var cPosition            = Request.Form[7].ToString();
                        var cDetailProfile       = Request.Form[8].ToString();
                        var lastWorkingWith      = Request.Form[9].ToString();
                        var lPosition            = Request.Form[10].ToString();
                        var lDetailProfile       = Request.Form[11].ToString();
                        var KeyArea = Request.Form[12].ToString();
                        var industrySpecialisation = Request.Form[13].ToString();
                        var verticalSpecalization  = Request.Form[14].ToString();
                        var expertise     = Request.Form[15].ToString();
                        var achivement    = Request.Form[16].ToString();
                        var LanguagesKnow = Request.Form[17].ToString();


                        string filePath = Server.MapPath("~/ProfileImage/");

                        bool isExists = System.IO.Directory.Exists(filePath);
                        if (!isExists)
                        {
                            System.IO.Directory.CreateDirectory(filePath);
                        }


                        string extension = Path.GetExtension(file.FileName);
                        string fileName  = name + extension;

                        // Get the complete folder path and store the file inside it.
                        fname = Path.Combine(filePath, fileName);
                        var imgpath = filePath + name + extension;
                        var DbPath  = "~/ProfileImages/" + name + extension;
                        file.SaveAs(fname);

                        jobDbContext db = new jobDbContext();

                        var res = db.Database.ExecuteSqlCommand(@"exec [SpUserProfile] @userid,@name,@summery,@totalYearsOfExp,@location,@graduation,@PG,@currentlyWorkingWith,@cPosition,@cDetailProfile,@lastWorkingWith,@lPosition,@lDetailProfile,@KeyArea,@industrySpecialisation,@verticalSpecalization,@expertise,@achivement,@LanguagesKnow,@profileImg",
                                                                new SqlParameter("@userid", 007),
                                                                new SqlParameter("@name", name),
                                                                new SqlParameter("@summery", summery),
                                                                new SqlParameter("@totalYearsOfExp", totalYearsOfExp),
                                                                new SqlParameter("@location", location),
                                                                new SqlParameter("@graduation", graduation),
                                                                new SqlParameter("@PG", PG),
                                                                new SqlParameter("@currentlyWorkingWith", currentlyWorkingWith),
                                                                new SqlParameter("@cPosition", cPosition),
                                                                new SqlParameter("@cDetailProfile", cDetailProfile),
                                                                new SqlParameter("@lastWorkingWith", lastWorkingWith),
                                                                new SqlParameter("@lPosition", lPosition),
                                                                new SqlParameter("@lDetailProfile", lDetailProfile),
                                                                new SqlParameter("@KeyArea", KeyArea),
                                                                new SqlParameter("@industrySpecialisation", industrySpecialisation),
                                                                new SqlParameter("@verticalSpecalization", verticalSpecalization),
                                                                new SqlParameter("@expertise", expertise),
                                                                new SqlParameter("@achivement", achivement),
                                                                new SqlParameter("@LanguagesKnow", LanguagesKnow),
                                                                new SqlParameter("@profileImg", DbPath));

                        return(Json("Data Inserted Successfully"));
                    }


                    // Returns message that successfully uploaded
                    return(Json("File Uploaded Successfully!"));
                }
                catch (Exception ex)
                {
                    return(Json("Error occurred. Error details: " + ex.Message));
                }
            }
            return(Json("Data Inserted Successfully"));
        }
        public ActionResult UpdateRecruiterProfile(RecruiterList rm)
        {
            var DbPath = "";

            if (Request.Files.Count > 0)
            {
                var name = rm.F_Name;
                HttpFileCollectionBase files = Request.Files;
                for (int i = 0; i < files.Count; i++)
                {
                    HttpPostedFileBase file = files[i];
                    string             fname;

                    if (Request.Browser.Browser.ToUpper() == "IE" || Request.Browser.Browser.ToUpper() == "INTERNETEXPLORER")
                    {
                        string[] testfiles = file.FileName.Split(new char[] { '\\' });
                        fname = testfiles[testfiles.Length - 1];
                    }
                    else
                    {
                        fname = file.FileName;
                    }

                    string filePath = Server.MapPath("~/ProfileImage/");

                    bool isExists = System.IO.Directory.Exists(filePath);
                    if (!isExists)
                    {
                        System.IO.Directory.CreateDirectory(filePath);
                    }


                    string extension = Path.GetExtension(file.FileName);
                    string fileName  = name + extension;

                    // Get the complete folder path and store the file inside it.
                    fname = Path.Combine(filePath, fileName);
                    var imgpath = filePath + name + extension;
                    DbPath = "~/ProfileImage/" + name + extension;
                    file.SaveAs(fname);
                }
            }
            else
            {
                DbPath = rm.ProflieImg;
            }

            jobDbContext db  = new jobDbContext();
            var          res = db.Database.ExecuteSqlCommand(@"exec SpUpdatedata @userid,@F_Name,@M_Name,@L_Name,@phone,@Mobile,@Password,@emailId,@summery,@totalYearsOfExp,@location,
                     @graduation,@pG,@currentlyWorkingWith,@cPosition,@cDetailProfile,@lastWorkingWith,@lPosition,@lDetailProfile,@KeyArea,
                     @industrySpecialisation,@verticalSpecalization,@expertise,@achivement,@languagesKnow,@profileImg",
                                                             new SqlParameter("@userid", rm.UserId),
                                                             new SqlParameter("@F_Name", rm.F_Name),
                                                             new SqlParameter("@M_Name", rm.M_Name == null ? (object)DBNull.Value : rm.M_Name),
                                                             new SqlParameter("@L_Name", rm.L_Name),
                                                             new SqlParameter("@phone", rm.phone == null ? (object)DBNull.Value : rm.phone),
                                                             new SqlParameter("@Mobile", rm.Mobile),
                                                             new SqlParameter("@Password", rm.Password),
                                                             new SqlParameter("@emailId", rm.emailId == null ? (object)DBNull.Value : rm.emailId),
                                                             new SqlParameter("@summery", rm.Summery == null ? (object)DBNull.Value : rm.Summery),
                                                             new SqlParameter("@totalYearsOfExp", rm.TotalYearsOfExp == null ? (object)DBNull.Value : rm.TotalYearsOfExp),
                                                             new SqlParameter("@location", rm.Location == null ? (object)DBNull.Value : rm.Location),
                                                             new SqlParameter("@graduation", rm.Graduation == null ? (object)DBNull.Value : rm.Graduation),
                                                             new SqlParameter("@pg", rm.PG == null ? (object)DBNull.Value : rm.PG),
                                                             new SqlParameter("@CurrentlyWorkingWith", rm.CurrentlyWorkingWith == null ? (object)DBNull.Value : rm.CurrentlyWorkingWith),
                                                             new SqlParameter("@cPosition", rm.CurrentPosition == null ? (object)DBNull.Value : rm.CurrentPosition),
                                                             new SqlParameter("@cDetailProfile", rm.CurrentDetailProfile == null ? (object)DBNull.Value : rm.CurrentDetailProfile),
                                                             new SqlParameter("@lastWorkingWith", rm.LastWorkingWith == null ? (object)DBNull.Value : rm.LastWorkingWith),
                                                             new SqlParameter("@lPosition", rm.LastPosition == null ? (object)DBNull.Value : rm.LastPosition),
                                                             new SqlParameter("@lDetailProfile", rm.LastDetailProfile == null ? (object)DBNull.Value : rm.LastDetailProfile),
                                                             new SqlParameter("@KeyArea", rm.KeyArea == null ? (object)DBNull.Value : rm.KeyArea),
                                                             new SqlParameter("@industrySpecialisation", rm.IndustrySpecialisation == null ? (object)DBNull.Value : rm.IndustrySpecialisation),
                                                             new SqlParameter("@verticalSpecalization", rm.VerticalSpecalization == null ? (object)DBNull.Value : rm.VerticalSpecalization),
                                                             new SqlParameter("@expertise", rm.Expertise == null ? (object)DBNull.Value : rm.Expertise),
                                                             new SqlParameter("@achivement", rm.Achivement == null ? (object)DBNull.Value : rm.Achivement),
                                                             new SqlParameter("@LanguagesKnow", rm.LanguagesKnow == null ? (object)DBNull.Value : rm.LanguagesKnow),
                                                             new SqlParameter("@profileImg", DbPath));


            return(Json("Data Updated Sucessfully"));
        }