pry há 2 anos
ascendente
cometimento
a5b6140c9f
4 ficheiros alterados com 37 adições e 5 eliminações
  1. +2
    -3
      HKCardManager/Form1.cs
  2. +7
    -1
      HKCardManager/PersonnelEntry.cs
  3. +27
    -0
      HKCardManager/Servers/Extend.cs
  4. +1
    -1
      HKLib/DB/DbContext.cs

+ 2
- 3
HKCardManager/Form1.cs Ver ficheiro

@@ -7,11 +7,10 @@ namespace HKCardManager
public Form1()
{
InitializeComponent();

Task.Factory.StartNew(() =>
Task.Factory.StartNew(() =>
{
DbContext.InitTable();
});
});
}

private void ÈËԱ¼ÈëToolStripMenuItem_Click(object sender, EventArgs e)


+ 7
- 1
HKCardManager/PersonnelEntry.cs Ver ficheiro

@@ -1,4 +1,6 @@
using HKLib.Logic;
using HKLib.Dto;
using HKLib.Interfaces;
using HKLib.Logic;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -33,6 +35,10 @@ namespace HKCardManager
private void button2_Click(object sender, EventArgs e)
{

HKLibHelper.AddUser(new UserDto()
{

});
}
}
}

+ 27
- 0
HKCardManager/Servers/Extend.cs Ver ficheiro

@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace HKCardManager
{
public static class Extend
{
/// <summary>
///
/// </summary>
/// <param name="str"></param>
/// <param name="IsStrict"></param>
/// <returns></returns>
public static bool IsMobile(this string str, bool IsStrict = false)
{
if (string.IsNullOrEmpty(str)) return false;
//string regex=@"^1[0123456789]\d{9}$";
Regex.IsMatch(str, @"^(1)\d{10}$");
string regex = IsStrict ? @"^[1][358]\d{9}$" : @"[1]\d{10}";
return Regex.IsMatch(str, regex);
}
}
}

+ 1
- 1
HKLib/DB/DbContext.cs Ver ficheiro

@@ -29,7 +29,7 @@ namespace HKLib.DB
static string Route()
{
var dir = SyncStatic.CreateDir(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Database"));
var r= SyncStatic.CreateFile(Path.Combine(dir, "data.db3"));
var r = SyncStatic.CreateFile(Path.Combine(dir, "data.db3"));
return r;
}
public static void InitTable()


Carregando…
Cancelar
Guardar