public int UpdateFiles(FilesEntity entity) { CustomDataCommand command = DataCommandManager.CreateCustomDataCommandFromConfig("UpdateFiles"); command.SetParameterValue("@SysNo", entity.SysNo); command.SetParameterValue("@Flag", entity.Flag); command.SetParameterValue("@FSysNo", entity.FSysNo); command.SetParameterValue("@FileName", entity.FileName); command.SetParameterValue("@Path", entity.Path); command.SetParameterValue("@Status", entity.Status); command.SetParameterValue("@InUser", entity.InUser); command.SetParameterValue("@InDate", entity.InDate); return command.ExecuteNonQuery(); }
public int InsertFiles(FilesEntity entity) { CustomDataCommand command = DataCommandManager.CreateCustomDataCommandFromConfig("InsertFiles"); command.SetParameterValue("@Flag", entity.Flag); command.SetParameterValue("@FSysNo", entity.FSysNo); command.SetParameterValue("@FileName", entity.FileName); command.SetParameterValue("@Path", entity.Path); command.SetParameterValue("@Status", entity.Status); command.SetParameterValue("@InUser", entity.InUser); command.SetParameterValue("@InDate", entity.InDate); object obj = command.ExecuteScalar(); if (obj != null) return Convert.ToInt32(obj); else return 0; }