Exemple #1
0
    /// <summary>
    /// 获取用户填写的自产文献篇名信息
    /// </summary>
    /// <returns></returns>
    private ZCWX_PM GetZCWXPM()
    {
        ZCWX_PM zcwxPM = new ZCWX_PM();
        //索引编码
        zcwxPM.sybm = this.sybmTextBox.Text;
        //分类编码
        zcwxPM.flbm = this.flbmTextBox.Text;
        //出版单位
        zcwxPM.cbdw = this.cbdwTextBox.Text;
        //馆藏号
        zcwxPM.gch = this.gchTextBox.Text.Trim();
        //中文篇名
        zcwxPM.zwpm = this.zwpmTextBox.Text.Trim();
        //主题词
        zcwxPM.zwztc = this.zwztcTextBox.Text.Trim();
        //文献密级
        zcwxPM.wxmj = this.wxmjTextBox.Text.Trim();
        //文献类型
        zcwxPM.wxlx = this.wxlxTextBox.Text.Trim();
        //出版日期
        if (!"".Equals(this.cbrqTextBox.Text))
            zcwxPM.cbrq = DateTime.Parse(this.cbrqTextBox.Text);
        //载体形态
        zcwxPM.ztxt = this.ztxtTextbox.Text.Trim();
        //国图分类
        zcwxPM.gtfl = this.gtflTextBox.Text.Trim();
        //责任个人
        zcwxPM.zrgr = this.zrgrTextBox.Text.Trim();
        //责任单位
        zcwxPM.zrdw = this.zrdwTextBox.Text.Trim();
        //中文文摘
        zcwxPM.zwwz = this.zwwzTextBox.Text.Trim();
        //备注
        zcwxPM.bz = this.bzTextBox.Text.Trim();
        //更新日期
        try
        {
            zcwxPM.gxrq = DateTime.Parse(this.gxrqTextBox.Text);
        }
        catch
        {
            zcwxPM.gxrq = DateTime.Now;
        }

        zcwxPM.dlr = this.dlrTextBox.Text.Trim();

        return zcwxPM;
    }
Exemple #2
0
        /// <summary>
        /// 生成日志信息
        /// </summary>
        /// <param name="zwqkPM">中文篇名信息</param>
        /// <param name="opType">操作类型</param>
        /// <param name="uname">用户名</param>
        /// <returns></returns>
        private OperationLogItem GetOperationLogItem(ZCWX_PM zcwxPM, String opType, String uname)
        {
            if (null == zcwxPM)
            {
                return null;
            }

            OperationLogItem operationLogItem = new OperationLogItem();
            //操作类型
            operationLogItem.opType = opType;
            //数据库表
            operationLogItem.opTable = "ZCWX_PM";

            operationLogItem.opObjectID = "自产文献";
            // 操作涉及的书刊
            operationLogItem.opBookIn = "自产文献";

            // 时间
            operationLogItem.opDate = DateTime.Now;
            // 操作员
            operationLogItem.opPerson = uname;
            //记录操作模式,判断是否属于批量操作。取值范围SINGLE/BATCH。
            operationLogItem.opMode = "SINGLE";

            //操作的内容
            String content = "('" + zcwxPM.flbm + "','" + zcwxPM.sybm + "','" + zcwxPM.gch + "','" + zcwxPM.zwpm + "','" + zcwxPM.cbdw + "','" + zcwxPM.wxmj + "','" + zcwxPM.wxlx + "','" + zcwxPM.zrgr + "','" + zcwxPM.zrdw + "','" + zcwxPM.cbrq + "','" + zcwxPM.ztxt + "','" + zcwxPM.gtfl + "','" + zcwxPM.zwztc + "','" + zcwxPM.zwwz + "','" + zcwxPM.bz + "','" + zcwxPM.gxrq + "')";
            operationLogItem.opContent = content;
            return operationLogItem;
        }
Exemple #3
0
 /// <summary>
 /// 插入一条篇名信息
 /// </summary>
 /// <param name="zcwx_pm">篇名信息</param>
 /// <returns></returns>
 public Boolean InsertZCWX_PM(ZCWX_PM zcwx_pm)
 {
     Boolean flag = true;
     OperationLogItem operationLog = this.GetOperationLogItem(zcwx_pm, "INSERT", null);
     try
     {
         sqlMapper.Insert("InsertZCWX_PM", zcwx_pm);
         this.operationLogDAO.insertLogItem(operationLog);
     }
     catch (Exception)
     {
         flag = false;
     }
     return flag;
 }
Exemple #4
0
 /// <summary>
 /// 更新一条篇名信息
 /// </summary>
 /// <param name="zcwx_pm">要更新的篇名信息</param>
 /// <param name="uname">操作用户名</param>
 /// <returns></returns>
 public Boolean UpdateZCWX_PM(ZCWX_PM zcwx_pm, String uname)
 {
     Boolean flag = true;
     int back = sqlMapper.Update("UpdateZCWX_PM", zcwx_pm);
     if (back <= 0)
     {
         flag = false;
     }
     if (flag)
     {
         OperationLogItem operationLog = this.GetOperationLogItem(zcwx_pm, "UPDATE", uname);
         this.operationLogDAO.insertLogItem(operationLog);
     }
     return flag;
 }
Exemple #5
0
        protected override PM getPM(OleDbDataReader reader, out String err)
        {
            err = String.Empty;
            ZCWX_PM pm = new ZCWX_PM();
            if (hasFormatTable)
            {
                pm.flbm = reader["分类编码"].ToString().Trim();
                pm.sybm = reader["索引编码"].ToString().Trim();
                pm.gch = reader["馆藏号"].ToString().Trim();
                pm.zwpm = reader["中文篇名"].ToString().Trim();
                pm.cbdw = reader["出版单位"].ToString().Trim();
                pm.wxmj = reader["文献密级"].ToString().Trim();
                pm.wxlx = reader["文献类型"].ToString().Trim();
                pm.zrgr = reader["责任个人"].ToString().Trim();
                pm.zrdw = reader["责任单位"].ToString().Trim();

                string dateStr = reader["出版日期"].ToString().Trim();
                try
                {
                    if (!"".Equals(dateStr))
                        pm.cbrq = DateTime.Parse(dateStr);
                }
                catch { }

                pm.ztxt = reader["载体形态"].ToString().Trim();
                pm.gtfl = reader["国图分类"].ToString().Trim();
                pm.zwztc = reader["中文主题词"].ToString().Trim();
                pm.zwwz = reader["中文文摘"].ToString().Trim();
                pm.bz = reader["备注"].ToString().Trim();

            }
            else
            {
            }

            /* 更新日期,登录人 */
            pm.gxrq = DateTime.Now;
            pm.dlr = user.name;

            pm.fillEmptyStringAsNull();
            return pm;
        }