You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DSWMS/Vue.Net/VOL.Entity/DomainModels/WMS/DBResult.cs

63 lines
1.4 KiB
C#

using System;
using System.Collections.Generic;
using System.Text;
namespace VOL.Entity.DomainModels
{
public class DBResult
{
private bool success = false;
public bool Success
{
get { return success; }
set { success = value; }
}
private string message = String.Empty;
public string Message
{
get { return message; }
set { message = value; }
}
public object Data { get; set; }
public DBResult()
{
success = false;
message = "";
Data = null;
}
public DBResult(bool _success, string _message, object _data = null)
{
success = _success;
message = _message;
Data = _data;
}
public void setMessage(bool _success, string _message)
{
success = _success;
message += _message + ";";
}
public void SetErrorInfo(string message, bool success = false, object data = null)
{
Success = success;
if (Message.IndexOf(message) >= 0)
{
}
else
{
if (!string.IsNullOrWhiteSpace(Message) && !string.IsNullOrWhiteSpace(message)) Message += ",";
Message += message;
Data = data;
}
}
}
}