public static void Set(string userName, string name, string position) { //ClientService_kfku k = new ClientService_kfku(); string[] po = position.Split(','); //k.ZF29 = po[0];//经度 //k.ZF30 = po[1];//纬度 //k.ZF28 = userName; //k.Updata(" and name='" + name + "' "); string sql_测试库 = " update makelanaln.dbo.clientservice_kfku set zf28 ='" + userName + "', " + " zf29 = '" + po[0] + "', zf30 = '" + po[1] + "' where makelanaln.dbo.clientservice_kfku.NAME ='" + name + "' "; DBLL.ExecuteNonQuery(MyGlobal.DataBase, sql_测试库); string sql = " update sysanqi.dbo.clientservice_kfku set zf28 ='" + userName + "', " + " zf29 = '" + po[0] + "', zf30 = '" + po[1] + "' where sysanqi.dbo.clientservice_kfku.NAME ='" + name + "' "; DBLL.ExecuteNonQuery(MyGlobal.DataBase, sql); }
public int PushPoi(string userName, string name, string position) //修改为name 20180728 skl { string cookies = HttpContext.Current.Request.Cookies["guid"] == null ? "" : HttpContext.Current.Request.Cookies["guid"].Value as string; string session = Session.SessionID.ToString(); if (!cookies.Equals(session)) { return(-10);//身份验证失败 } MLogin.GetExeUname(); ClientService_kfku k = new ClientService_kfku(); List <ClientService_kfku> ts = k.Select(" and name='" + name.Trim() + "' "); if (ts.Count > 0) { //注释 2018 10 12 原始定位需提交审核单。 if (ts[0].ZF29 != null && ts[0].ZF29.Trim() != "")//当前客户有定位 { return(-1); } else { try { //事务处理开始,劫持链接通道的sql语句 TransactionSql.Start(MyGlobal.DataBase); //===>开始 ClientService_kfku ke = new ClientService_kfku(); string[] po = position.Split(','); ke.ZF29 = po[0]; //经度 ke.ZF30 = po[1]; //纬度 ke.ZF28 = userName; ke.Updata(" and name='" + name + "' "); // string sql_测试库 = " update makelanaln.dbo.clientservice_kfku set zf28 ='" + userName + "', " + //" zf29 = '" + po[0] + "', zf30 = '" + po[1] + "' where makelanaln.dbo.clientservice_kfku.NAME ='" + name + "' "; // DBLL.ExecuteNonQuery(MyGlobal.DataBase, sql_测试库); string sql_正式库 = " update sysanqi.dbo.clientservice_kfku set zf28 ='" + userName + "', " + " zf29 = '" + po[0] + "', zf30 = '" + po[1] + "' where sysanqi.dbo.clientservice_kfku.NAME ='" + name + "' "; DBLL.ExecuteNonQuery(MyGlobal.DataBase, sql_正式库); //提交事务到sql服务器处理 if (!TransactionSql.EndSql()) { return(-3); //回滚触发 } //===>结束 else { return(0); } } catch (Exception ex) { return(-4);//程序出现错误 } } } else { return(-2); } }