Example #1
0
    private void SaveJob()
    {
        BLL.UserBLL userbll = new BLL.UserBLL();

        BLL.JobBLL bll   = new BLL.JobBLL();
        JobModel   model = new JobModel();

        model.JobId = ReStr("JobId", "");

        if (userbll.HasPower(model.JobId))
        {
            //如果没有权限发布
        }
        else
        {
            ReTrue();
        }

        if (model.JobId.Trim() != "")
        {    //修改
            model = bll.GetJobModel(model.JobId);
            if (model.CreateUser == Common.CookieSings.GetCurrentUserId())
            {
            }
            else
            {
                if (!userbll.IsAdministrator())
                {
                    throw new Exception("您没有权限执行此操作!");
                }
            }
        }
        else
        {
            model.RecommendLv = ReInt("RecommendLv", 0);
        }
        model.HumNum       = ReInt("HumNum");
        model.ContactEmail = ReStr("ContactEmail");
        model.ContactName  = ReStr("ContactName");
        model.ContactPhone = ReStr("ContactPhone", "");
        model.ContactQQ    = ReStr("ContactQQ", "");
        model.ContactTell  = ReStr("ContactTell", "");
        model.HumNum       = ReInt("HumNum", 0);
        model.IsTop        = ReBool("IsTop", false);
        model.JobMemo      = ReStr("JobMemo");
        model.JobPayId     = ReInt("JobPayId");
        model.JobtTitle    = ReStr("JobtTitle");
        model.JobTypeId    = ReInt("JobTypeId");
        model.MerchantId   = ReDecimal("MerchantId", 0);
        model.SchoolExpId  = ReInt("SchoolExpId");
        model.Sex          = ReStr("Sex");
        model.WorkYearId   = ReInt("WorkYearId");
        model.JobLat       = ReDecimal("JobLat", 0);
        model.JobLng       = ReDecimal("JobLng", 0);
        model.TownId       = ReDecimal("TownId");
        bll.SaveJob(model);

        ReDict2.Add("JobId", model.JobId);
        ReTrue();
    }