private void ShowInfo(int _id) { BLL.job bll = new BLL.job(); Model.job model = bll.GetModel(_id); txtTitle.Text = model.title; rblIsLock.SelectedValue = model.is_lock.ToString(); txtDepart.Text = model.depart; txtNumber.Text = model.number.ToString(); ddlSex.SelectedValue = model.sex; txtExperience.Text = model.experience; txtEducation.Text = model.education; txtAge.Text = model.age; txtProfession.Text = model.profession; txtWork_area.Text = model.work_area; txtStart_time.Text = model.start_time; txtEnd_time.Text = model.end_time; txtContent.Value = model.Content; txtClick.Text = model.click.ToString(); txtSortId.Text = model.sort_id.ToString(); txtContactName.Text = model.ContactName; txtPhone.Text = model.Phone; txtFax.Text = model.Fax; txtEmail.Text = model.Fax; txtAddress.Text = model.Address; }
protected string GetJobName(int jobId) { BLL.job bll = new BLL.job(); Model.job model = bll.GetModel(jobId); if (model == null) return ""; return model.title; }
protected string GetJobName(int jobId) { BLL.job bll = new BLL.job(); Model.job model = bll.GetModel(jobId); if (model == null) { return(""); } return(model.title); }
//设置操作 protected void rptList_ItemCommand(object source, RepeaterCommandEventArgs e) { int id = Convert.ToInt32(((HiddenField)e.Item.FindControl("hidId")).Value); BLL.job bll = new BLL.job(); Model.job model = bll.GetModel(id); switch (e.CommandName.ToLower()) { case "ibtnlock": if (model.is_lock == 1) { bll.UpdateField(id, "is_lock=0"); } else { bll.UpdateField(id, "is_lock=1"); } break; } this.RptBind("id>0" + CombSqlTxt(this.keywords), "sort_id asc,id desc"); }
private bool DoEdit(int _id) { ChkAdminLevel("plugin_job", DTEnums.ActionEnum.Edit.ToString()); //检查权限 bool result = true; BLL.job bll = new BLL.job(); Model.job model = bll.GetModel(_id); model.title = txtTitle.Text.Trim(); model.depart = txtDepart.Text.Trim(); model.sex = ddlSex.SelectedValue; model.number = int.Parse(txtNumber.Text.Trim()); model.education = txtEducation.Text.Trim(); model.age = txtAge.Text.Trim(); model.profession = txtProfession.Text.Trim(); model.experience = txtExperience.Text.Trim(); model.work_area = txtWork_area.Text.Trim(); model.start_time = txtStart_time.Text.Trim(); model.end_time = txtEnd_time.Text.Trim(); model.Content = txtContent.Value.Trim(); model.ContactName = txtContactName.Text.Trim(); model.Phone = txtPhone.Text.Trim(); model.Fax = txtFax.Text.Trim(); model.Email = txtEmail.Text.Trim(); model.Address = txtAddress.Text.Trim(); model.click = int.Parse(txtClick.Text.Trim()); model.sort_id = int.Parse(txtSortId.Text.Trim()); model.is_lock = int.Parse(rblIsLock.SelectedValue); model.add_time = DateTime.Now; if (!bll.Update(model)) { result = false; } return(result); }
//设置操作 protected void rptList_ItemCommand(object source, RepeaterCommandEventArgs e) { int id = Convert.ToInt32(((HiddenField)e.Item.FindControl("hidId")).Value); BLL.job bll = new BLL.job(); Model.job model = bll.GetModel(id); switch (e.CommandName.ToLower()) { case "ibtnlock": if (model.is_lock == 1) bll.UpdateField(id, "is_lock=0"); else bll.UpdateField(id, "is_lock=1"); break; } this.RptBind("id>0" + CombSqlTxt(this.keywords), "sort_id asc,id desc"); }
private bool DoEdit(int _id) { ChkAdminLevel("plugin_job", DTEnums.ActionEnum.Edit.ToString()); //检查权限 bool result = true; BLL.job bll = new BLL.job(); Model.job model = bll.GetModel(_id); model.title = txtTitle.Text.Trim(); model.depart = txtDepart.Text.Trim(); model.sex = ddlSex.SelectedValue; model.number = int.Parse(txtNumber.Text.Trim()); model.education = txtEducation.Text.Trim(); model.age = txtAge.Text.Trim(); model.profession = txtProfession.Text.Trim(); model.experience = txtExperience.Text.Trim(); model.work_area = txtWork_area.Text.Trim(); model.start_time = txtStart_time.Text.Trim(); model.end_time = txtEnd_time.Text.Trim(); model.Content = txtContent.Value.Trim(); model.ContactName = txtContactName.Text.Trim(); model.Phone = txtPhone.Text.Trim(); model.Fax = txtFax.Text.Trim(); model.Email = txtEmail.Text.Trim(); model.Address = txtAddress.Text.Trim(); model.click = int.Parse(txtClick.Text.Trim()); model.sort_id = int.Parse(txtSortId.Text.Trim()); model.is_lock = int.Parse(rblIsLock.SelectedValue); model.add_time = DateTime.Now; if (!bll.Update(model)) { result = false; } return result; }