/// <summary> /// 绑定数据 /// </summary> private void BindData() { this.currentSYBM=(String)Request["sybm"]; if (null == this.currentSYBM) { String message = "错误:索引编码为空"; Response.Redirect(GlobalResource.ERROR_PAGE+"?message="+message); return; } this.wwqk_syml = this.wwqkDAO.getWwqkSYMLBySybm(this.currentSYBM); if (null == this.wwqk_syml) { String message = "错误:没有找到索引编码对应的索引期刊"; Response.Redirect(GlobalResource.ERROR_PAGE + "?message=" + message); return; } //索引编码 this.sybmTextBox.Text = this.wwqk_syml.sybm; //分类编码 this.flbmTextBox.Text = this.wwqk_syml.flbm; //分类名称 this.SetFLMC(this.wwqk_syml.flbm); //收录年份 this.slnfTextBox.Text = this.wwqk_syml.slnf; //年份区间 this.nfqjTextBox.Text = this.wwqk_syml.nfqj.ToString(); //最新年份 this.zxnfTextBox.Text = this.wwqk_syml.zxnf.ToString(); //中文名称 this.zwmcTextBox.Text = this.wwqk_syml.zwmc; //开放 if (this.wwqk_syml.kf) { this.kfCheckBox.Checked = true; } else { this.kfCheckBox.Checked = false; } //外文名称 this.wwmcTextBox.Text = this.wwqk_syml.wwmc; //主办单位 this.zbdwTextBox.Text = this.wwqk_syml.zbdw; //创刊年份 this.cknfTextBox.Text = this.wwqk_syml.cknf; //编辑单位 this.bjdwTextBox.Text = this.wwqk_syml.bjdw; //负责人 this.fzrTextBox.Text = this.wwqk_syml.fzr; //通讯地址 this.txdzTextBox.Text = this.wwqk_syml.txdz; //邮政编码 this.yzbmTextBox.Text = this.wwqk_syml.yzbm; //办公电话 this.bgdhTextBox.Text = this.wwqk_syml.bgdh; //传真电话 this.czdhTextBox.Text = this.wwqk_syml.czdh; //电子邮件 this.dzyjTextBox.Text = this.wwqk_syml.dzyj; //发行周期 this.SetFXZQ(this.wwqk_syml.fxzq); //国际刊号 this.gjkhTextBox.Text = this.wwqk_syml.gjkh; //国内刊号 this.gnkhTextBox.Text = this.wwqk_syml.gnkh; //资料来源 this.zllyTextBox.Text = this.wwqk_syml.zlly; //邮发代号 this.yfdhTextBox.Text = this.wwqk_syml.yfdh; //简介 this.jjTextBox.Text = this.wwqk_syml.jj; }
/// <summary> /// 按索引编码更新索引目录信息。 /// 索引编码为主键。 /// </summary> /// <param name="syml"></param> /// <returns></returns> public bool updateWwqkSYMLBySYBM(WWQK_SYML syml) { bool result; try { sqlMapper.BeginTransaction(); sqlMapper.Update("UpdateWWQK_SYML", syml); sqlMapper.CommitTransaction(); result = true; } catch { sqlMapper.RollBackTransaction(); result = false; } return result; }
/// <summary> /// 获取页面中的信息 /// </summary> /// <returns>一个索引目录对象</returns> private WWQK_SYML GetWWQK_SYML() { WWQK_SYML wwqkSYML = new WWQK_SYML(); //分类编码 wwqkSYML.flbm = this.flbmTextBox.Text.Trim(); //索引编码 wwqkSYML.sybm = this.sybmTextBox.Text.Trim(); //中文名称 wwqkSYML.zwmc = this.zwmcTextBox.Text.Trim(); //外文名称 wwqkSYML.wwmc = this.wwmcTextBox.Text.Trim(); //开放 if (this.kfCheckBox.Checked) { wwqkSYML.kf = true; } else { wwqkSYML.kf = false; } //收录年份 wwqkSYML.slnf = this.slnfTextBox.Text.Trim(); //最新年份 try { wwqkSYML.zxnf = Int32.Parse(this.zxnfTextBox.Text.Trim()); } catch (Exception) { } //年份区间 try { wwqkSYML.nfqj = Int32.Parse(this.nfqjTextBox.Text.Trim()); } catch (Exception) { } //主办单位 wwqkSYML.zbdw = this.zbdwTextBox.Text.Trim(); //编辑单位 wwqkSYML.bjdw = this.bjdwTextBox.Text.Trim(); //通讯地址 wwqkSYML.txdz = this.txdzTextBox.Text.Trim(); //办公电话 wwqkSYML.bgdh = this.bgdhTextBox.Text.Trim(); //传真电话 wwqkSYML.czdh = this.czdhTextBox.Text.Trim(); //电子邮件 wwqkSYML.dzyj = this.dzyjTextBox.Text.Trim(); //创刊年份 wwqkSYML.cknf = this.cknfTextBox.Text.Trim(); //负责人 wwqkSYML.fzr = this.fzrTextBox.Text.Trim(); //邮政编码 wwqkSYML.yzbm = this.yzbmTextBox.Text.Trim(); //发行周期 wwqkSYML.fxzq = this.fxzqDropDownList.SelectedValue; //国际刊号 wwqkSYML.gjkh = this.gjkhTextBox.Text.Trim(); //国内刊号 wwqkSYML.gnkh = this.gnkhTextBox.Text.Trim(); //邮发代号 wwqkSYML.yfdh = this.yfdhTextBox.Text.Trim(); //资料来源 wwqkSYML.zlly = this.zllyTextBox.Text.Trim(); //简介 wwqkSYML.jj = this.jjTextBox.Text; return wwqkSYML; }
/// <summary> /// 插入外文期刊索引目录信息。 /// </summary> /// <param name="syml"></param> public void insertWwqkSYML(WWQK_SYML syml) { sqlMapper.Insert("InsertWWQK_SYML", syml); }