Esempio n. 1
0
        /// <summary>
        ///  更新一条数据
        /// </summary>
        public void Update(MobileSoft.Model.WorkFlow.Tb_WorkFlow_OprLevelTableTemp model)
        {
            int rowsAffected;

            SqlParameter[] parameters =
            {
                new SqlParameter("@Tb_WorkFlow_FlowNode_InfoId", SqlDbType.Int,      4),
                new SqlParameter("@LevelCode",                   SqlDbType.NVarChar, 20)
            };
            parameters[0].Value = model.Tb_WorkFlow_FlowNode_InfoId;
            parameters[1].Value = model.LevelCode;

            DbHelperSQL.RunProcedure("Proc_Tb_WorkFlow_OprLevelTableTemp_Update", parameters, out rowsAffected);
        }
Esempio n. 2
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public MobileSoft.Model.WorkFlow.Tb_WorkFlow_OprLevelTableTemp GetModel()
        {
            SqlParameter[] parameters =
            {
            };

            MobileSoft.Model.WorkFlow.Tb_WorkFlow_OprLevelTableTemp model = new MobileSoft.Model.WorkFlow.Tb_WorkFlow_OprLevelTableTemp();
            DataSet ds = DbHelperSQL.RunProcedure("Proc_Tb_WorkFlow_OprLevelTableTemp_GetModel", parameters, "ds");

            if (ds.Tables[0].Rows.Count > 0)
            {
                if (ds.Tables[0].Rows[0]["Tb_WorkFlow_FlowNode_InfoId"].ToString() != "")
                {
                    model.Tb_WorkFlow_FlowNode_InfoId = int.Parse(ds.Tables[0].Rows[0]["Tb_WorkFlow_FlowNode_InfoId"].ToString());
                }
                model.LevelCode = ds.Tables[0].Rows[0]["LevelCode"].ToString();
                return(model);
            }
            else
            {
                return(null);
            }
        }