Exemple #1
0
        public int UpdatePositionInfoByJobID(positionInfo post)
        {
            iwaywardDataContext db = new iwaywardDataContext();

            try
            {
                var result = (from item in db.positionInfo where item.posID == post.posID select item).Single();
                result.posID        = post.posID;
                result.userID       = post.userID;
                result.companyID    = post.companyID;
                result.posName      = post.posName;
                result.createTime   = post.createTime;
                result.region       = post.region;
                result.city         = post.city;
                result.province     = post.province;
                result.record       = post.record;
                result.recruitment  = post.recruitment;
                result.range        = post.range;
                result.posstate     = post.posstate;
                result.posType      = post.posType;
                result.requirements = post.requirements;
                db.SubmitChanges();
                return(int.Parse(result.posID.ToString()));
            }
            catch
            {
                return(0);
            }
        }
Exemple #2
0
        public int InsertPositionInfo(positionInfo post)
        {
            iwaywardDataContext db = new iwaywardDataContext();

            try
            {
                db.positionInfo.InsertOnSubmit(post);
                db.SubmitChanges();
                return(int.Parse(post.posID.ToString()));
            }
            catch
            {
                return(0);
            }
        }