public static int UpdateTbl_FlowForm(Tbl_FlowForm tbl_flowform)
 {
     WebCommon.Public.WriteLog("修改表单:" + tbl_flowform.IF_Name);
     tbl_flowform.DealUser = WebCommon.Public.GetUserName();
     tbl_flowform.DealTime = DateTime.Now;
     return(new Tbl_FlowFormService().UpdateTbl_FlowFormById(tbl_flowform));
 }
Esempio n. 2
0
        public int AddTbl_FlowForm(Tbl_FlowForm tbl_flowform)
        {
            string sql = "insert into [Tbl_FlowForm] ([IF_Name],[IF_Type],[IF_Content],[DealUser]) values (@IF_Name,@IF_Type,@IF_Content,@DealUser)";

            SqlParameter[] sp = new SqlParameter[]
            {
                new SqlParameter("@IF_Name", tbl_flowform.IF_Name),
                new SqlParameter("@IF_Type", tbl_flowform.IF_Type),
                new SqlParameter("@IF_Content", tbl_flowform.IF_Content),
                new SqlParameter("@DealUser", tbl_flowform.DealUser)
            };
            return(DBHelper.ExecuteNonQuery(this.connection, CommandType.Text, sql, sp));
        }
Esempio n. 3
0
        public int UpdateTbl_FlowFormById(Tbl_FlowForm tbl_flowform)
        {
            string sql = "update [Tbl_FlowForm] set [IF_Name]=@IF_Name,[IF_Type]=@IF_Type,[IF_Content]=@IF_Content,[DealUser]=@DealUser where DealFlag=0 and [ID]=@ID";

            SqlParameter[] sp = new SqlParameter[]
            {
                new SqlParameter("@ID", tbl_flowform.ID),
                new SqlParameter("@IF_Name", tbl_flowform.IF_Name),
                new SqlParameter("@IF_Type", tbl_flowform.IF_Type),
                new SqlParameter("@IF_Content", tbl_flowform.IF_Content),
                new SqlParameter("@DealUser", tbl_flowform.DealUser)
            };
            return(DBHelper.ExecuteNonQuery(this.connection, CommandType.Text, sql, sp));
        }
Esempio n. 4
0
        /// <summary>
        ///根据SQL语句获取实体
        /// </summary>
        private Tbl_FlowForm getTbl_FlowFormBySql(string sql)
        {
            Tbl_FlowForm tbl_flowform = null;
            DataSet      ds           = DBHelper.ExecuteDataset(this.connection, CommandType.Text, sql);

            if (ds.Tables.Count > 0)
            {
                DataTable dt = ds.Tables[0];
                tbl_flowform = new Tbl_FlowForm();
                foreach (DataRow dr in dt.Rows)
                {
                    tbl_flowform.ID         = Convert.ToInt32(dr["ID"]);
                    tbl_flowform.IF_Name    = Convert.ToString(dr["IF_Name"]);
                    tbl_flowform.IF_Type    = Convert.ToString(dr["IF_Type"]);
                    tbl_flowform.DealFlag   = Convert.ToInt32(dr["DealFlag"]);
                    tbl_flowform.DealTime   = Convert.ToDateTime(dr["DealTime"]);
                    tbl_flowform.DealUser   = Convert.ToString(dr["DealUser"]);
                    tbl_flowform.IF_Content = Convert.ToString(dr["IF_Content"]);
                    tbl_flowform.AddDate    = Convert.ToDateTime(dr["AddDate"]);
                }
            }
            return(tbl_flowform);
        }
 public static int AddTbl_FlowForm(Tbl_FlowForm tbl_flowform)
 {
     WebCommon.Public.WriteLog("添加表单:" + tbl_flowform.IF_Name);
     return(new Tbl_FlowFormService().AddTbl_FlowForm(tbl_flowform));
 }