baseline: 小军 WMS 二开代码原始快照(含 SynOABusiness.cs Debugger.Break)
This commit is contained in:
commit
c2b0e7be0d
6522 files changed
+3530643
No files matched your search
@@ -0,0 +1,53 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace GXWebApi.Common
|
||||
{
|
||||
|
||||
public static class WmsCommonFunction
|
||||
{
|
||||
|
||||
public static T GetBodyData<T>(string jsonData)
|
||||
{
|
||||
T myBodyData = JsonConvert.DeserializeObject<T>(jsonData);
|
||||
return myBodyData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新或者插入功能使用次数
|
||||
/// </summary>
|
||||
/// <param name="FNumber"></param>
|
||||
/// <param name="FName"></param>
|
||||
public static void UpUserCount(string FNumber,string FName)
|
||||
{
|
||||
DBHelpe db = new DBHelpe();
|
||||
|
||||
DateTime now = DateTime.Now;
|
||||
int year = now.Year;
|
||||
int month = now.Month;
|
||||
|
||||
string SQL = $@"SELECT *
|
||||
from T_Oth_DevelopmentInfo
|
||||
WHERE FYear = {year} and FMonth = {month} and FNumber = '{FNumber}'";
|
||||
string SQL1 = string.Empty;
|
||||
DataTable dt = db.ExecuteTable(SQL);
|
||||
if(dt != null && dt.Rows.Count > 0)
|
||||
{
|
||||
SQL1 = $@"UPDATE T_Oth_DevelopmentInfo set FCount = {Convert.ToInt32(dt.Rows[0]["FCount"]) + 1}
|
||||
WHERE FYear = {year} and FMonth = {month} and FNumber = '{FNumber}'";
|
||||
}
|
||||
else
|
||||
{
|
||||
SQL1 = $@"INSERT into T_Oth_DevelopmentInfo(FYear,FMonth,FNumber,FName,FCount)
|
||||
values ({year} ,{month},'{FNumber}','{FName}',1)";
|
||||
}
|
||||
db.ExecuteNonQuery(SQL1);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user