public void addExpInfo(string skills, int minsalary, string expsummary, string expyrs, string cemployer, string cdes, string expcorg, string rescjob, int userId, string pemployer, string pdes, string expporg, string resppjob, DateTime dol)
        {
            DataClasses1DataContext db  = new DataClasses1DataContext();
            JobResumeExp            obj = new JobResumeExp();

            obj.skills     = skills;
            obj.minsalary  = minsalary;
            obj.expsummary = expsummary;
            obj.expyrs     = expyrs;
            obj.cemployer  = cemployer;
            obj.cdes       = cdes;
            obj.expcorg    = expcorg;
            obj.rescjob    = rescjob;
            obj.userId     = userId;
            db.JobResumeExps.InsertOnSubmit(obj);
            db.SubmitChanges();

            PreviousHistory obj1 = new PreviousHistory();

            obj1.pemployer     = pemployer;
            obj1.pdes          = pdes;
            obj1.expporg       = expporg;
            obj1.resppjob      = resppjob;
            obj1.dateofleaving = dol;
            obj1.userid        = userId;
            db.PreviousHistories.InsertOnSubmit(obj1);
            db.SubmitChanges();
        }
Exemplo n.º 2
0
        public ActionResult UpdateExpinfo()
        {
            JobResumeExp er = new JobResumeExp();

            er.skills     = Request["skills"];
            er.minsalary  = Convert.ToInt32(Request["minsalary"]);
            er.expsummary = Request["expsum"];
            er.expyrs     = Request["expyrs"];
            er.cemployer  = Request["currentemp"];
            er.cdes       = Request["currentdes"];
            er.expcorg    = Request["exporg"];
            er.rescjob    = Request["respcjob"];
            er.userId     = uid;
            PreviousHistory ph = new PreviousHistory();

            ph.pemployer = Request["prevemp"];
            ph.pdes      = Request["prevdes"];
            ph.expporg   = Request["prevexporg"];
            ph.resppjob  = Request["respprevjob"];
            string date = Request["dolj"];

            ph.dateofleaving = Convert.ToDateTime(date);
            ph.userid        = uid;

            ExpInfo obj = new ExpInfo();

            obj.updateExpInfo(er, ph);
            getAllLists obj2 = new getAllLists();

            ViewBag.Cities     = obj2.getCities();
            ViewBag.Countaries = obj2.getCountaries();
            ViewBag.Degrees    = obj2.getDegrees();
            ViewBag.Institutes = obj2.getInstitutes();
            BasicInfo b  = new BasicInfo();
            ExpInfo   e1 = new ExpInfo();
            ExtraInfo e2 = new ExtraInfo();

            ViewBag.isBasicInfoExist = b.isBasicInfoFound(uid);
            if (ViewBag.isBasicInfoExist)
            {
                ViewBag.allBasicInfo = b.getBasicInfo(uid);
            }
            ViewBag.isExpInfoExist = e1.isExpInfoFound(uid);
            if (ViewBag.isExpInfoExist)
            {
                ViewBag.allExpInfo = e1.getExpInfo(uid);
                ViewBag.allPreExp  = e1.getPreviousHistory(uid);
            }
            ViewBag.isExtraInfoExist = e2.isExtraInfoFound(uid);
            if (ViewBag.isExtraInfoExist)
            {
                ViewBag.allExraInfo = e2.getExtraInfo(uid);
            }

            UserInfo u = new UserInfo();

            ViewBag.UserInfo = u.getUserInfo(uid);

            return(View("Update"));
        }
        public void addExpInfo(JobResumeExp obj, PreviousHistory obj1)
        {
            DataClasses1DataContext db = new DataClasses1DataContext();

            db.JobResumeExps.InsertOnSubmit(obj);
            db.SubmitChanges();
            db.PreviousHistories.InsertOnSubmit(obj1);
            db.SubmitChanges();
        }
        public void updateExpInfo(JobResumeExp er, PreviousHistory ph)
        {
            DataClasses1DataContext db = new DataClasses1DataContext();
            var obj = (from x in db.JobResumeExps
                       where x.userId == er.userId
                       select x).First();

            obj = er;
            db.SubmitChanges();

            var obj1 = (from x in db.PreviousHistories
                        where x.userid == ph.userid
                        select x).First();

            obj1 = ph;
            db.SubmitChanges();
        }