public void AddMFavorite(string resID) { string sql = "select * from YZSysFavorites where uid='" + YZAuthHelper.LoginUserAccount + "' and resid='" + resID + "' and resType='App'"; if (!DBUtil_APP.Exists(sql)) { string sql3 = "select max(ORDERINDEX) from YZSysFavorites where uid='" + YZAuthHelper.LoginUserAccount + "' and resType='App'"; int ORDERINDEX = Convert.ToInt32(DBUtil_APP.GetSingle(sql3)) + 1; string sql2 = string.Format(@"INSERT INTO [YZSysFavorites] ( [UID] ,[RESTYPE] ,[RESID] ,[DATE] ,[COMMENTS] ,[ORDERINDEX] ) VALUES ('{0}' ,'{1}' ,'{2}' ,'{3}' ,'{4}' ,'{5}')", YZAuthHelper.LoginUserAccount, "App", resID, DateTime.Now.ToString(), "", ORDERINDEX); DBUtil_APP.ExecuteSqlWithGoUseTran(sql2); } }
public void SaveLogin(LoginModule login) { string sql = string.Format(@"DELETE APP_LOGIN_CONFIG;INSERT INTO [APP_LOGIN_CONFIG] ( [CREATEDATE] ,[CREATEUSER] ,[WXLOGIN] ,[WXID] ,[WXAGENTID] ,[WXSECRET] ,[DDLOGIN] ,[DDID] ,[DDAGENTID] ,[DDSECRET] ,[OLOGIN], [DDCORPID],[WXLINKSQL],[DDLINKSQL]) VALUES ('{0}' ,'{1}' ,'{2}' ,'{3}' ,'{4}' ,'{5}','{6}','{7}','{8}','{9}','{10}','{11}','{12}','{13}')", DateTime.Now.ToString(), YZAuthHelper.LoginUserAccount, login.WxLogin, login.WxId, login.WxAgentId, login.WxSecret, login.DdLogin, login.DdId, login.DdAgentId, login.DdSecret, login.OLogin, login.DdCorpId, login.WxLinkSql, login.DdLinkSql); DBUtil_APP.ExecuteSqlWithGoUseTran(sql); }
public void SaveAppInfo(AppInfoModule aim) { string sql = @"DELETE APP_APPINFO WHERE PID='" + aim.PID + @"';INSERT INTO APP_APPINFO ([UID] ,[PID] ,[CREATEDATE] ,[JSON]) VALUES ('" + aim.UID + @"' ,'" + aim.PID + @"' ,'" + aim.CREATEDATE + @"' ,'" + aim.JSON + "')"; DBUtil_APP.ExecuteSqlWithGoUseTran(sql); }
public void SaveOrgSyncConfig(OrgSyncInfoModule OrgSync) { string sql = string.Format(@"DELETE APP_ORGSYNC;INSERT INTO [APP_ORGSYNC] ( [WXCORPID] ,[WXSECRET] ,[DDCORPID] ,[DDSECRET] ,[DDOUSQL] ,[DDUSERSQL] ,[WXOUSQL] ,[WXUSERSQL] ) VALUES ('{0}' ,'{1}' ,'{2}' ,'{3}','{4}','{5}','{6}','{7}' )", OrgSync.WxCorpId, OrgSync.WxSecret, OrgSync.DdCorpId, OrgSync.DdSecret, System.Web.HttpUtility.HtmlEncode(OrgSync.DdOuSql), System.Web.HttpUtility.HtmlEncode(OrgSync.DdUserSql), System.Web.HttpUtility.HtmlEncode(OrgSync.WxOuSql), System.Web.HttpUtility.HtmlEncode(OrgSync.WxUserSql)); DBUtil_APP.ExecuteSqlWithGoUseTran(sql); }
public void SaveNotice(PushNoticeModule Notice) { string sql = string.Format(@"DELETE APP_NOTICE_CONFIG;INSERT INTO [APP_NOTICE_CONFIG] ([CREATEDATE] ,[CREATEUSER] ,[WXID] ,[WXAGENTID] ,[WXSECRET] ,[WXPUSHURL] ,[DDID] ,[DDAGENTID] ,[DDSECRET],[DDPUSHURL],[WXLINKSQL],[DDLINKSQL]) VALUES ('{0}' ,'{1}' ,'{2}' ,'{3}' ,'{4}' ,'{5}','{6}','{7}','{8}','{9}','{10}','{11}')", DateTime.Now.ToString(), YZAuthHelper.LoginUserAccount, Notice.WxId, Notice.WxAgentid, Notice.WxSecret, Notice.WxPushUrl, Notice.DdId, Notice.DdAgentid, Notice.DdSecret, Notice.DdPushUrl, Notice.WxLinkSql, Notice.DdLinkSql); DBUtil_APP.ExecuteSqlWithGoUseTran(sql); }
/// <summary> /// 新增编辑应用 /// </summary> /// <param name="id"></param> public void SaveApp(AppModule app) { if (app.Id == 0) { string sql = string.Format(@"INSERT INTO App_Index ([CreateDate] ,[CreateUser] ,[AppName] ,[Icon] ,[IconColor] ,[IconSize] ,[AppUrl] ,[Enable] ,[Sort] ,[TYPE] ,[ViewType] ,[BADGE]) VALUES ('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}','{9}','{10}','{11}')", DateTime.Now.ToString(), YZAuthHelper.LoginUserAccount, app.AppName, app.Icon, app.IconColor, app.IconSize, app.AppUrl, app.Enable, app.Sort, app.Type, app.ViewType, app.BADGE); DBUtil_APP.ExecuteSqlWithGoUseTran(sql); } else { string sql = string.Format(@"UPDATE App_Index SET [CreateDate] = '{0}' ,[CreateUser] ='{1}' ,[AppName] = '{2}' ,[Icon] = '{3}' ,[IconColor] = '{4}' ,[IconSize] ='{5}' ,[AppUrl] = '{6}' ,[Enable] = '{7}' ,[Sort] = '{8}' ,[TYPE] = '{9}' ,[ViewType]='{10}',[BADGE]='{11}' where id='{12}'", DateTime.Now.ToString(), YZAuthHelper.LoginUserAccount, app.AppName, app.Icon, app.IconColor, app.IconSize, app.AppUrl, app.Enable, app.Sort, app.Type, app.ViewType, app.BADGE, app.Id); DBUtil_APP.ExecuteSqlWithGoUseTran(sql); } }
/// <summary> /// 删除部门中间表 /// </summary> /// <returns></returns> public static void DELETEBPM2DD(long id) { string sql = @"DELETE APP_ORGSYNC_DEPTBPM2DD WHERE DDID='" + id + "';"; DBUtil_APP.ExecuteSqlWithGoUseTran(sql); }
/// <summary> /// 更新部门中间表 /// </summary> /// <returns></returns> public static void BPM2DD(int id, long ddid) { string sql = @"DELETE APP_ORGSYNC_DEPTBPM2DD WHERE OUID='" + id + "'; INSERT APP_ORGSYNC_DEPTBPM2DD values('" + id + "','" + ddid + "','" + DateTime.Now.ToString() + "')"; DBUtil_APP.ExecuteSqlWithGoUseTran(sql); }
public void DeleteMFavorite(string resID) { string sql = "delete YZSysFavorites where resID='" + resID + "' and resType='App' and uid='" + YZAuthHelper.LoginUserAccount + "' "; DBUtil_APP.ExecuteSqlWithGoUseTran(sql); }
/// <summary> /// 删除应用 /// </summary> /// <param name="id"></param> public void DeleteApp(int id) { string sql = "delete App_Index where id='" + id + "'"; DBUtil_APP.ExecuteSqlWithGoUseTran(sql); }