示例#1
0
 private void setInfo()
 {
     if (id > 0)
     {
         using (BLLJobDetail bll = new BLLJobDetail())
         {
             JobDetail jobdetail = bll.GetSingle(id);
             if (jobdetail != null)
             {
                 ddlJobTypeID.SelectedValue = jobdetail.JobTypeID.ToString();
                 txtJobName.Text            = jobdetail.JobName;
                 txtContent.Value           = jobdetail.JobContent;
                 txtJobNumber.Text          = jobdetail.JobNumber;
                 txtJobTreatment.Text       = jobdetail.JobTreatment;
                 txtCandidatesway.Text      = jobdetail.Candidatesway;
                 txtJobEndDate.Value        = jobdetail.JobEndDate.ToString();
                 txtRemarks.Text            = jobdetail.Remarks;
                 if (jobdetail.IsEnglish == 1)
                 {
                     rbtnIsChinese.Checked = true;
                 }
                 else if (jobdetail.IsEnglish == 2)
                 {
                     rbtnIsEnglish.Checked = true;
                 }
             }
         }
     }
 }
        public static string OperateRecords(string ids, int op)
        {
            string[] array = ids.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
            using (BLLJobType bll = new BLLJobType())
            {
                foreach (string id in array)
                {
                    switch (op)
                    {
                    case 7:
                        SearchJobDetail cond = new SearchJobDetail();
                        cond.CpJobTypeID = Convert.ToInt32(id);
                        using (BLLJobDetail jobbll = new BLLJobDetail())
                        {
                            if (jobbll.GetList(cond).Count > 0)
                            {
                                return("有子类目不能删除;");
                            }
                            else
                            {
                                bll.Delete(id);
                                break;
                            }
                        }
                    }
                }

                if (bll.IsFail)
                {
                    return(ExceptionManager.GetErrorMsg(bll.DevNetException));
                }
            }
            return(string.Empty);
        }
        private void bindList()
        {
            SearchJobDetail con = new SearchJobDetail();

            if (ddlJobType.SelectedValue != "")
            {
                con.CpJobTypeID = Convert.ToInt32(ddlJobType.SelectedValue);
            }
            if (rbtnIsChinese.Checked == true)
            {
                con.IsEnglish = 1;
            }
            else if (rbtnIsEnglish.Checked == true)
            {
                con.IsEnglish = 2;
            }
            Pagination pagina = new Pagination(pager.PageIndex, pager.PageSize, 0);

            using (BLLJobDetail bll = new BLLJobDetail())
            {
                List <JobDetail> lists = bll.GetPageList(con, pagina, JobDetail.ID_FieldName, ScriptQuery.SortEnum.DESC);

                pager.RecordCount = pagina.RecordCount;
                pager.PageCount   = pagina.PageCount;

                grid_friendlink.DataSource = lists;
                grid_friendlink.DataBind();
            }
        }
示例#4
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            using (BLLJobDetail bll = new BLLJobDetail())
            {
                JobDetail obj = new JobDetail();
                if (id > 0)
                {
                    obj = bll.GetSingle(id);
                }
                obj.JobTypeID     = Convert.ToInt32(ddlJobTypeID.SelectedValue);
                obj.JobName       = txtJobName.Text;
                obj.JobNumber     = txtJobNumber.Text;
                obj.JobContent    = txtContent.Value;
                obj.JobTreatment  = txtJobTreatment.Text;
                obj.Candidatesway = txtCandidatesway.Text;
                obj.Remarks       = txtRemarks.Text.ToString();
                obj.JobEndDate    = Convert.ToDateTime(txtJobEndDate.Value);
                if (rbtnIsChinese.Checked == true)
                {
                    obj.IsEnglish = 1;
                }
                else if (rbtnIsEnglish.Checked == true)
                {
                    obj.IsEnglish = 2;
                }
                else
                {
                    ShowMsg("请选择语言类别!");
                    return;
                }

                bll.Save(obj);

                if (bll.IsFail)
                {
                    ExceptionManager.ShowErrorMsg(this, bll.DevNetException);
                }
                else
                {
                    JSMsg.ShowWinRedirect(this, "保存成功", "cpJobList.aspx");
                }
            }
        }
        public static string OperateRecords(string ids, int op)
        {
            string[] array = ids.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
            using (BLLJobDetail bll = new BLLJobDetail())
            {
                foreach (string id in array)
                {
                    switch (op)
                    {
                    case 7:
                        bll.Delete(id);

                        break;
                    }
                }

                if (bll.IsFail)
                {
                    return(ExceptionManager.GetErrorMsg(bll.DevNetException));
                }
            }
            return(string.Empty);
        }