コード例 #1
0
        public void InsertMyProfileAbount(string Id, string Phone, string country, string city, string Picture)
        {
            string filePath = string.Empty;

            if (Request.Files.Count > 0)
            {
                try
                {
                    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;
                        }
                        fname    = Generate() + fname;
                        filePath = "/Uploads/" + fname + "";
                        fname    = Path.Combine(Server.MapPath("~/Uploads/"), fname);

                        file.SaveAs(fname);
                    }
                }
                catch (Exception ex)
                {
                }
            }


            MyProfileCon.InsertMyProfileAbount(Id, Phone, country, city, filePath, Picture);
            TempData["Message"] = "Record has been update successfully";
            TempData["tab"]     = "About";
        }
コード例 #2
0
        // GET: MyProfile
        public ActionResult MyProfile(string StrMain)
        {
            string UsertypeId = Session["UserTypeId"].ToString();

            if (StrMain == null || StrMain == "")
            {
                TempData["Message"] = "";
            }
            else
            {
                TempData["Message"] = StrMain;
            }
            DataTable dtCountryList = new DataTable();

            dtCountryList       = StudentCon.CountryList();
            ViewBag.CountryList = ToSelectList(dtCountryList, "Id", "Name");

            DataTable objStudent = new DataTable();

            objStudent = MyProfileCon.GetMyProfile(UsertypeId);
            return(View(objStudent));
        }
コード例 #3
0
 public void InsertMyProfilelinksUp(string Id, string linksUp)
 {
     MyProfileCon.InsertMyProfilelinksUp(Id, linksUp);
     TempData["Message"] = "Record has been update successfully";
     TempData["tab"]     = "linksUp";
 }
コード例 #4
0
 public void InsertMyProfileAchievement(string Id, string Achievement)
 {
     MyProfileCon.InsertMyProfileAchievement(Id, Achievement);
     TempData["Message"] = "Record has been update successfully";
     TempData["tab"]     = "Achievement";
 }
コード例 #5
0
 public void InsertMyProfileExperience(string Id, string Experience)
 {
     MyProfileCon.InsertMyProfilExperience(Id, Experience);
     TempData["Message"] = "Record has been update successfully";
     TempData["tab"]     = "Experience";
 }