DAL/common/TCWL_D_Common.cs
(开头部分) 21KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
namespace DAL.common
{
using Common;
using Model;
using Model.common;
using System;
using System.Data;
using System.Data.SqlClient;
using System.Runtime.InteropServices;
using System.Text;
public class TCWL_D_Common
{
public string Binding(TCWL_M_UserInfo model, out string serviceID, out string au, out string mm, out string ID_log)
{
int num;
DataTable table2;
au = "";
mm = "";
serviceID = "";
ID_log = Guid.NewGuid().ToString();
DataTable dataTable = DBHelper.GetDataTable(string.Format("select userName,serviceID,belongRole,frees,moneyState,period,moneyTime,getdate() as TimeNow,state from TCWL_User where bindPhone='{0}' and userMM='{1}' ", DESEncrypt.Encrypt(model.userName), DESEncrypt.Encrypt(model.userMM)));
if (Convert.ToInt32(dataTable.Rows.Count) <= 0)
{
return "failed";
}
model.userName = dataTable.Rows[0]["userName"].ToString();
if (dataTable.Rows[0]["state"].ToString() == "0")
{
num = DBHelper.ExecuteSql("insert into TCWL_Log (ID,userID,doSomething,ip,serviceID,MAC) values ('" + ID_log + "','" + model.userName + "','用户登录失败(账号被禁用)','" + model.IPAddress + "','','" + model.MACAddress + "')", new SqlParameter[0]);
return "error_N";
}
DateTime time = Convert.ToDateTime(dataTable.Rows[0]["TimeNow"].ToString());
if (dataTable.Rows[0]["frees"].ToString() == "0")
{
if (dataTable.Rows[0]["moneyState"].ToString() == "0")
{
num = DBHelper.ExecuteSql("insert into TCWL_Log (ID,userID,doSomething,ip,serviceID,MAC) values ('" + ID_log + "','" + model.userName + "','用户登录失败(过期未续费)','" + model.IPAddress + "','','" + model.MACAddress + "')", new SqlParameter[0]);
return "error";
}
DateTime time2 = Convert.ToDateTime(dataTable.Rows[0]["moneyTime"].ToString()).AddMonths(Convert.ToInt32(dataTable.Rows[0]["period"].ToString()));
if (DateTime.Compare(time, time2) <= 0)
{
mm = DESEncrypt.Encrypt(model.userMM);
serviceID = dataTable.Rows[0]["serviceID"].ToString();
table2 = DBHelper.GetDataTable(string.Format("select permission from TCWL_Role where ID='{0}'", dataTable.Rows[0]["belongRole"].ToString()));
if (table2.Rows.Count > 0)
{
au = table2.Rows[0][0].ToString();
}
num = DBHelper.ExecuteSql("insert into TCWL_Log (ID,userID,doSomething,ip,serviceID,MAC) values ('" + ID_log + "','" + model.userName + "','用户登录系统','" + model.IPAddress + "','" + serviceID + "','" + model.MACAddress + "')", new SqlParameter[0]);
return "success";
}
num = DBHelper.ExecuteSql("insert into TCWL_Log (ID,userID,doSomething,ip,serviceID,MAC) values ('" + ID_log + "','" + model.userName + "','用户登录失败(过期未续费)','" + model.IPAddress + "','','" + model.MACAddress + "')", new SqlParameter[0]);
return "error";
}
mm = DESEncrypt.Encrypt(model.userMM);
serviceID = dataTable.Rows[0]["serviceID"].ToString();
table2 = DBHelper.GetDataTable(string.Format("select permission from TCWL_Role where ID='{0}'", dataTable.Rows[0]["belongRole"].ToString()));
if (table2.Rows.Count > 0)
后面还有 327 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
