コード例 #1
0
        /// <summary>
        ///  更新一条数据
        /// </summary>
        public void Update(MobileSoft.Model.WorkFlow.Tb_WorkFlow_NodeRoleTemp model)
        {
            int rowsAffected;

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

            DbHelperSQL.RunProcedure("Proc_Tb_WorkFlow_NodeRoleTemp_Update", parameters, out rowsAffected);
        }
コード例 #2
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public MobileSoft.Model.WorkFlow.Tb_WorkFlow_NodeRoleTemp GetModel()
        {
            SqlParameter[] parameters =
            {
            };

            MobileSoft.Model.WorkFlow.Tb_WorkFlow_NodeRoleTemp model = new MobileSoft.Model.WorkFlow.Tb_WorkFlow_NodeRoleTemp();
            DataSet ds = DbHelperSQL.RunProcedure("Proc_Tb_WorkFlow_NodeRoleTemp_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.Tb_Sys_Role_RoleCode = ds.Tables[0].Rows[0]["Tb_Sys_Role_RoleCode"].ToString();
                return(model);
            }
            else
            {
                return(null);
            }
        }