public void SaveUserRegLink(string UserId, Decimal Point, string Url) { using (DbOperHandler dbOperHandler = new ComData().Doh()) { dbOperHandler.Reset(); dbOperHandler.ConditionExpress = "UserId=" + UserId + " and Point=" + (object)Point; if (dbOperHandler.Exist("N_UserRegLink")) { dbOperHandler.Reset(); dbOperHandler.ConditionExpress = "UserId=" + UserId + " and Point=" + (object)Point; dbOperHandler.AddFieldItem(nameof(UserId), (object)UserId); dbOperHandler.AddFieldItem(nameof(Point), (object)Point); dbOperHandler.AddFieldItem(nameof(Url), (object)Url); dbOperHandler.Update("N_UserRegLink"); } else { dbOperHandler.Reset(); dbOperHandler.AddFieldItem(nameof(UserId), (object)UserId); dbOperHandler.AddFieldItem(nameof(Point), (object)Point); dbOperHandler.AddFieldItem(nameof(Url), (object)Url); dbOperHandler.Insert("N_UserRegLink"); } } }
public void SaveUserRegLink(string UserId, Decimal Point, string YxTime, string Times, string Url) { using (DbOperHandler dbOperHandler = new ComData().Doh()) { dbOperHandler.Reset(); dbOperHandler.ConditionExpress = "UserId=" + UserId + " and Point=" + (object)Point; if (dbOperHandler.Exist("N_UserRegLink")) { dbOperHandler.Reset(); dbOperHandler.ConditionExpress = "UserId=" + UserId + " and Point=" + (object)Point; dbOperHandler.AddFieldItem("UserId", (object)UserId); dbOperHandler.AddFieldItem("Point", (object)Point); dbOperHandler.AddFieldItem("YxTime", (object)YxTime); dbOperHandler.AddFieldItem("Times", (object)Times); dbOperHandler.AddFieldItem("Url", (object)Url); dbOperHandler.Update("N_UserRegLink"); } else { dbOperHandler.Reset(); dbOperHandler.AddFieldItem("UserId", (object)UserId); dbOperHandler.AddFieldItem("Point", (object)Point); dbOperHandler.AddFieldItem("YxTime", (object)YxTime); dbOperHandler.AddFieldItem("Times", (object)Times); dbOperHandler.AddFieldItem("Url", (object)Url); dbOperHandler.Insert("N_UserRegLink"); } } }
public bool Exists(string _wherestr) { int num = 0; using (DbOperHandler dbOperHandler = new ComData().Doh()) { dbOperHandler.Reset(); dbOperHandler.ConditionExpress = _wherestr; if (dbOperHandler.Exist("N_UserBank")) num = 1; } return num == 1; }
public bool Exists(string _wherestr) { int num = 0; using (DbOperHandler dbOperHandler = new ComData().Doh()) { dbOperHandler.Reset(); dbOperHandler.ConditionExpress = _wherestr; if (dbOperHandler.Exist("Pay_temp")) { num = 1; } } return(num == 1); }
public void ClearUser() { using (DbOperHandler dbOperHandler = new ComData().Doh()) { dbOperHandler.Reset(); dbOperHandler.ConditionExpress = "datediff(minute,ontime ,getdate())>5"; if (dbOperHandler.Exist("N_User")) { dbOperHandler.Reset(); dbOperHandler.ConditionExpress = "datediff(minute,ontime ,getdate())>5"; dbOperHandler.AddFieldItem("IsOnline", "0"); dbOperHandler.AddFieldItem("SessionId", Guid.NewGuid().ToString().Replace("-", "")); dbOperHandler.Update("N_User"); } } }
public bool Exists(int _type, string _title, string _number) { int num = 0; using (DbOperHandler dbOperHandler = new ComData().Doh()) { dbOperHandler.Reset(); dbOperHandler.ConditionExpress = "Type=@Type and NumberAll=@NumberAll"; dbOperHandler.AddConditionParameter("@Type", (object)_type); dbOperHandler.AddConditionParameter("@NumberAll", (object)_number); if (dbOperHandler.Exist("Sys_LotteryData")) { num = 1; } } return(num == 1); }
public bool Exists(string _type) { int num = 0; using (DbOperHandler dbOperHandler = new ComData().Doh()) { dbOperHandler.Reset(); dbOperHandler.ConditionExpress = "ActiveType=@ActiveType and STime=@STime"; dbOperHandler.AddConditionParameter("@ActiveType", _type); dbOperHandler.AddConditionParameter("@STime", DateTime.Now.ToString("yyyy-MM-dd")); if (dbOperHandler.Exist("Act_AutoRecord")) { num = 1; } } return(num == 1); }
public bool Exists(int _type, string _title) { int num = 0; using (DbOperHandler dbOperHandler = new ComData().Doh()) { dbOperHandler.Reset(); dbOperHandler.ConditionExpress = "Title=@Title and Type=@Type"; dbOperHandler.AddConditionParameter("@Title", _title); dbOperHandler.AddConditionParameter("@Type", _type); if (dbOperHandler.Exist("Sys_LotteryData")) { num = 1; } } return(num == 1); }
public void SaveUserRegLink(string UserId, decimal Point, string YxTime, string Times, string Url) { using (DbOperHandler dbOperHandler = new ComData().Doh()) { dbOperHandler.Reset(); dbOperHandler.ConditionExpress = string.Concat(new object[] { "UserId=", UserId, " and Point=", Point }); if (dbOperHandler.Exist("N_UserRegLink")) { dbOperHandler.Reset(); dbOperHandler.ConditionExpress = string.Concat(new object[] { "UserId=", UserId, " and Point=", Point }); dbOperHandler.AddFieldItem("UserId", UserId); dbOperHandler.AddFieldItem("Point", Point); dbOperHandler.AddFieldItem("YxTime", YxTime); dbOperHandler.AddFieldItem("Times", Times); dbOperHandler.AddFieldItem("Url", Url); dbOperHandler.Update("N_UserRegLink"); } else { dbOperHandler.Reset(); dbOperHandler.AddFieldItem("UserId", UserId); dbOperHandler.AddFieldItem("Point", Point); dbOperHandler.AddFieldItem("YxTime", YxTime); dbOperHandler.AddFieldItem("Times", Times); dbOperHandler.AddFieldItem("Url", Url); dbOperHandler.Insert("N_UserRegLink"); } } }