📄 basemothed.cs
字号:
using System;
using System.Collections.Generic;
using System.Text;
namespace Hotel.Command
{
public class BaseMothed
{
public Boolean ResultIntToBool(Int32 result)
{
if (result > 0)
{ return true; }
else
{ return false; }
}
public Int32 CheckDataIsInt(object obj)
{
try
{
if (obj != null )
{
return System.Convert.ToInt32(obj.ToString());
}
else
{
return 2;
}
}
catch (Exception)
{
return 2;
}
}
public string CheckDataIsStr(object obj)
{
try
{
if (obj != null)
{
return obj.ToString();
}
else
{
return "";
}
}
catch (Exception)
{
return "";
}
}
public Boolean CheckDataIsBool(object obj)
{
if (obj != null)
{
return System.Convert.ToBoolean(obj.ToString());
}
else
{
return false;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -