Example #1
0
 public int IInsertPersonnelRealtionship(PersonnelRelationship perRe)
 {
     try {
         return(prs.InsertPersonnelRealtionship(perRe));
     }
     catch {
         return(0);
     }
 }
Example #2
0
        public string InsertAttentionIndustry(string perRe)
        {
            PersonnelRelationship com = JSONHelper.JsonDeserialize_JsonTo <PersonnelRelationship>(perRe);
            int returnValue           = IInsertPersonnelRealtionship(com);

            if (returnValue == 0)
            {
                return(JSONHelper.GetError(returnValue.ToString()));
            }
            else
            {
                return(JSONHelper.GetSuccess(returnValue.ToString()));
            }
        }
Example #3
0
        public int InsertAttentionIndustry(PersonnelRelationship perRe)
        {
            PersonnelRelationshipDataContext db = new PersonnelRelationshipDataContext();

            try
            {
                db.PersonnelRelationship.InsertOnSubmit(perRe);
                db.SubmitChanges();
                return(int.Parse(perRe.UserID.ToString()));
            }
            catch
            {
                return(0);
            }
        }
        public int InsertPersonnelRealtionship(PersonnelRelationship perRe)
        {
            iwaywardDataContext db = new iwaywardDataContext();

            try
            {
                db.PersonnelRelationship.InsertOnSubmit(perRe);
                db.SubmitChanges();
                return(int.Parse(perRe.UserID.ToString()));
            }
            catch
            {
                return(0);
            }
        }
Example #5
0
        public int UpdatePersonnelRelationshipfoByUserID(PersonnelRelationship attInd)
        {
            PersonnelRelationshipDataContext db = new PersonnelRelationshipDataContext();

            try
            {
                var result = (from item in db.PersonnelRelationship where item.UserID == attInd.UserID select item).Single();
                result.GUserID = attInd.GUserID;
                result.IndID   = attInd.IndID;
                result.objType = attInd.objType;
                db.SubmitChanges();
                return(int.Parse(result.UserID.ToString()));
            }
            catch
            {
                return(0);
            }
        }