示例#1
0
        public string[] CreateItem(Entity.HRJob model)
        {
            Dictionary <string, string> dic = new Dictionary <string, string>();
            string orders = Tools.Orders("K_HRJob").ToString();

            dic.Add("AddDate", DateTime.Now.ToString());
            dic.Add("AddMan", model.AddMan.ToString());
            dic.Add("Age", model.Age.ToString());
            dic.Add("Degree", model.Degree.ToString());
            dic.Add("EMail", model.EMail.ToString());
            dic.Add("EndDate", model.EndDate.ToString());
            dic.Add("Experience", model.Experience.ToString());
            dic.Add("FlowState", model.FlowState.ToString());
            dic.Add("IsDel", "0");
            dic.Add("IsHtml", "0");
            dic.Add("JobType", model.JobType.ToString());
            dic.Add("MetaDescript", model.MetaDescript.ToString());
            dic.Add("MetaKeyword", model.MetaKeyword.ToString());
            dic.Add("NodeCode", model.NodeCode.ToString());
            dic.Add("Number", model.Number.ToString());
            dic.Add("Orders", orders);
            dic.Add("PageTitle", model.PageTitle.ToString());
            dic.Add("PublishDate", model.PublishDate.ToString());
            dic.Add("Qualifications", model.Qualifications.ToString());
            dic.Add("Salary", model.Salary.ToString());
            dic.Add("SiteID", model.SiteID.ToString());
            dic.Add("Title", model.Title.ToString());
            dic.Add("Welfare", model.Welfare.ToString());
            dic.Add("WorkDuty", model.WorkDuty.ToString());
            dic.Add("WorkPlace", model.WorkPlace.ToString());
            dic.Add("WorkUnit", model.WorkUnit.ToString());
            return(InfoHelper.Add("K_HRJob", dic));
        }
示例#2
0
        //添加成功返回影响行数和ID号码,失败返回失败错误描述
        //成功arr[0]=1;arr[1]=ID
        //失败arr[0]=错误描述,arr[1]=0
        public string[] CreateItem(Entity.HRResume model)
        {
            Dictionary <string, string> dic = new Dictionary <string, string>();


            dic.Add("Address", model.Address.ToString());
            dic.Add("Birthday", model.Birthday.ToString());
            dic.Add("CardID", model.CardID.ToString());
            dic.Add("City", model.City.ToString());
            dic.Add("CompanyExpect", model.CompanyExpect.ToString());
            dic.Add("ComputerLevel", model.ComputerLevel.ToString());
            dic.Add("CurrentSalary", model.CurrentSalary.ToString());
            dic.Add("Degree", model.Degree.ToString());

            dic.Add("EducationalBackground", model.EducationalBackground.ToString());
            dic.Add("EMail", model.EMail.ToString());
            dic.Add("EnglishLevel", model.EnglishLevel.ToString());
            dic.Add("Gender", model.Gender.ToString());
            dic.Add("Height", model.Height.ToString());
            dic.Add("Hobbies", model.Hobbies.ToString());
            dic.Add("Industry", model.Industry.ToString());
            dic.Add("InformationWay", model.InformationWay.ToString());
            dic.Add("IsDel", model.IsDel.ToString());
            dic.Add("IsRead", model.IsRead.ToString());
            dic.Add("IsRoom", model.IsRoom.ToString());
            dic.Add("Marriage", model.Marriage.ToString());
            dic.Add("MemberName", model.MemberName.ToString());
            dic.Add("Mobile", model.Mobile.ToString());
            dic.Add("Nation", model.Nation.ToString());
            dic.Add("NativePlace", model.NativePlace.ToString());
            dic.Add("NodeCode", model.NodeCode.ToString());
            dic.Add("Photo", model.Photo.ToString());
            dic.Add("Post", model.Post.ToString());
            dic.Add("PostExpect", model.PostExpect.ToString());
            dic.Add("QQ", model.QQ.ToString());
            dic.Add("ReportDate", model.ReportDate.ToString());
            dic.Add("RequiresSalary", model.RequiresSalary.ToString());
            dic.Add("SiteID", model.SiteID.ToString());
            dic.Add("SkillsExpertise", model.SkillsExpertise.ToString());
            dic.Add("Speciality", model.Speciality.ToString());
            dic.Add("Specialty", model.Specialty.ToString());
            dic.Add("Tel", model.Tel.ToString());
            dic.Add("Train", model.Train.ToString());
            dic.Add("Universities", model.Universities.ToString());

            dic.Add("UserName", model.UserName.ToString());
            dic.Add("Weight", model.Weight.ToString());
            dic.Add("WorkDescription", model.WorkDescription.ToString());
            dic.Add("WorkExperience", model.WorkExperience.ToString());
            dic.Add("WorkYear", model.WorkYear.ToString());
            dic.Add("ZipCode", model.ZipCode.ToString());
            return(InfoHelper.Add("K_HRResume", dic));
        }
示例#3
0
        public string[] CreateItem(Entity.HRJobCate model)
        {
            Dictionary <string, string> dic = new Dictionary <string, string>();

            string sql = "select max(ID) from K_HRJobCate Where ParentID=@ParentID AND CateType=@CateType";

            SqlParameter[] prams = new SqlParameter[] {
                new SqlParameter("@ParentID", model.ParentID),
                new SqlParameter("@CateType", model.CateType),
            };
            SqlDataReader dr = SQLHelper.ExecuteReader(SQLHelper.ConnectionStringLocalTransaction, CommandType.Text, sql, prams);
            string        id = "100";

            if (dr.Read())
            {
                string id1 = dr[0].ToString();
                if (string.IsNullOrEmpty(id1) && model.ParentID != "0")
                {
                    id = model.ParentID + "001";
                }
                else if (!string.IsNullOrEmpty(id1))
                {
                    int    idLen = id1.Length;
                    string id2   = "00" + (Utils.ParseInt(id1.Substring(idLen - 3), 0) + 1).ToString();
                    id = id1.Substring(0, idLen - 3) + id2.Substring(id2.Length - 3);
                }
            }
            else
            {
                if (model.ParentID != "0")
                {
                    id = model.ParentID + "001";
                }
            }
            dr.Close();
            dr.Dispose();

            dic.Add("ID", id);
            dic.Add("AddDate", model.AddDate.ToString());
            dic.Add("CateType", model.CateType);
            dic.Add("DelTime", model.DelTime.ToString());
            dic.Add("FlowState", model.FlowState.ToString());
            dic.Add("Intro", model.Intro.ToString());
            dic.Add("IsDel", model.IsDel.ToString());
            dic.Add("NodeCode", model.NodeCode.ToString());
            dic.Add("ParentID", model.ParentID);
            dic.Add("SiteID", model.SiteID.ToString());
            dic.Add("Title", model.Title.ToString());
            dic.Add("Orders", model.Orders.ToString());
            return(InfoHelper.Add("K_HRJobCate", dic));
        }