예제 #1
0
파일: Common.cs 프로젝트: JiahuiGuo/openPDC
 public static int? ToNullableInteger(this string value)
 {
     int temp = 0;
     if (int.TryParse(value.CleanText(), out temp))
         return temp;
     else
         return (int?)null;
 }
예제 #2
0
파일: Common.cs 프로젝트: JiahuiGuo/openPDC
 public static long? ToNullableLong(this string value)
 {
     long temp = 0;
     if (long.TryParse(value.CleanText(), out temp))
         return temp;
     else
         return (long?)null;
 }
예제 #3
0
파일: Common.cs 프로젝트: JiahuiGuo/openPDC
 public static decimal? ToNullableDecimal(this string value)
 {
     decimal temp = 0;
     if (decimal.TryParse(value.CleanText(), out temp))
         return temp;
     else
         return (decimal?)null;
 }
예제 #4
0
파일: Common.cs 프로젝트: JiahuiGuo/openPDC
 public static double? ToNullableDouble(this string value)
 {
     double temp = 0;
     if (double.TryParse(value.CleanText(), out temp))
         return temp;
     else
         return (double?)null;
 }
예제 #5
0
파일: Common.cs 프로젝트: JiahuiGuo/openPDC
 public static int ToInteger(this string value)
 {
     int temp = 0;
     int.TryParse(value.CleanText(), out temp);
     return temp;
 }
예제 #6
0
파일: Common.cs 프로젝트: JiahuiGuo/openPDC
 public static long ToLong(this string value)
 {
     long temp = 0;
     long.TryParse(value.CleanText(), out temp);
     return temp;
 }
예제 #7
0
파일: Common.cs 프로젝트: JiahuiGuo/openPDC
 public static decimal ToDecimal(this string value)
 {
     decimal temp = 0;
     decimal.TryParse(value.CleanText(), out temp);
     return temp;
 }
예제 #8
0
파일: Common.cs 프로젝트: JiahuiGuo/openPDC
 public static double ToDouble(this string value)
 {
     double temp = 0;
     double.TryParse(value.CleanText(), out temp);
     return temp;
 }
예제 #9
0
파일: Common.cs 프로젝트: JiahuiGuo/openPDC
 public static bool IsLong(this string value)
 {
     long temp;
     return long.TryParse(value.CleanText(), out temp);
 }
예제 #10
0
파일: Common.cs 프로젝트: JiahuiGuo/openPDC
 public static bool IsInteger(this string value)
 {
     int temp;
     return int.TryParse(value.CleanText(), out temp);
 }
예제 #11
0
파일: Common.cs 프로젝트: JiahuiGuo/openPDC
 public static bool IsDouble(this string value)
 {
     double temp;
     return double.TryParse(value.CleanText(), out temp);
 }
예제 #12
0
파일: Common.cs 프로젝트: JiahuiGuo/openPDC
 public static bool IsDecimal(this string value)
 {
     decimal temp;
     return decimal.TryParse(value.CleanText(), out temp);
 }
예제 #13
0
 public static bool HasText(this TextBox textBox)
 {
     return !string.IsNullOrWhiteSpace(textBox.CleanText());
 }