예제 #1
0
        private DataTable GetAppAlarmAlert(string sysflag, string cid, string uid, DateTime st, DateTime et)
        {
            ComSqlHelper csh = new ComSqlHelper();

            SqlParameter[] Parameters = { new SqlParameter("@cid", cid), new SqlParameter("@uid", uid),
                                          new SqlParameter("@st",  st),  new SqlParameter("@et",  et) };
            DataTable      dt = csh.FillDataSet(WebProc.GetAppSysflagKey(sysflag), WebProc.Proc("QWGProc_App_GetAppAlarmAlert"), Parameters).Tables[0];

            return(dt);
        }
예제 #2
0
        public DataTable GetTracksFromDB(string sysflag, string cid, string st, string et)
        {
            try
            {
                ComSqlHelper   csh = new ComSqlHelper();
                SqlParameter[] oaPara;
                //参数构建
                oaPara    = new SqlParameter[3];
                oaPara[0] = new SqlParameter("@cid", cid);
                oaPara[1] = new SqlParameter("@BEGINTime", st);
                oaPara[2] = new SqlParameter("@ENDTime", et);

                DataTable dt = new DataTable();
                return(csh.FillDataSet(sysflag, WebProc.Proc("QWGProc_App_StoryTrack"), oaPara).Tables[0]);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
예제 #3
0
        public ResponseAppResult AppVINUpload(Dictionary <string, string> inparams)
        {
            ResponseAppResult Result = null;

            if (!inparams.Keys.Contains("cid") || inparams["cid"] == "")
            {
                Result = new ResponseAppResult(ResState.ParamsImperfect, "缺少cid或cid为空!", null);
                return(Result);
            }
            if (!inparams.Keys.Contains("vins") || inparams["vins"] == "")
            {
                Result = new ResponseAppResult(ResState.ParamsImperfect, "缺少vins或vins为空!", null);
                return(Result);
            }

            try
            {
                string       sysflag    = inparams["sysflag"];
                string       cid        = inparams["cid"];
                string       vins       = inparams["vins"];
                string       uploaddate = inparams["uploaddate"];
                string[]     rtarray    = vins.Split(',');
                ComSqlHelper csh        = new ComSqlHelper();

                foreach (string vin in rtarray)
                {
                    SqlParameter[] Parameters2 = { new SqlParameter("@cid", cid)
                                                   ,                        new SqlParameter("@vin", vin)
                                                   ,                        new SqlParameter("@uploaddate", uploaddate) };
                    csh.ExecuteSPNoQuery(sysflag, WebProc.Proc("QWGProc_App_ExtVINUpload"), Parameters2, false);
                }
                Result = new ResponseAppResult(ResState.Success, "操作成功", null);
            }
            catch (Exception ex)
            {
                LogHelper.WriteError("AppVINUpload调用异常", ex);
                Result = new ResponseAppResult(ResState.OperationFailed, ex.Message, null);
            }
            return(Result);
        }
예제 #4
0
        /// <summary>
        /// 用户退出系统时记录日志到数据库
        /// </summary>
        /// <param name="sm"></param>
        private static void logoutForDb(SessionModel sm)
        {
            string key = sm.sysflag;
            string uid = sm.uid.ToString();

            string ip       = sm.userIP;
            string usertype = "";

            if (sm.onecaruser) //单车用户
            {
                usertype = "0";
            }
            else//系统用户
            {
                usertype = "1";
            }
            SqlParameter[] ParametersLogout = new SqlParameter[3];
            ParametersLogout[0] = new SqlParameter("@UserType", usertype);
            ParametersLogout[1] = new SqlParameter("@UserIP", ip);
            ParametersLogout[2] = new SqlParameter("@userID", uid);
            csh.ExecuteSPNoQuery(key, WebProc.Proc("QWGProc_M_InsertCancelLogin"), ParametersLogout, false);
        }
예제 #5
0
        private long GetCarTNO(string sysflag, string cid)
        {
            long         tno = 0;
            ComSqlHelper csh = new ComSqlHelper();

            SqlParameter[] Parameters = { new SqlParameter("@cid", cid) };
            DataTable      dt         = csh.FillDataSet(WebProc.GetAppSysflagKey(sysflag), WebProc.Proc("QWGProc_SC_GetTnoByCid"), Parameters).Tables[0];

            if (dt.Rows.Count > 0)
            {
                tno = long.Parse(dt.Rows[0]["tno"].ToString());
            }
            return(tno);
        }
예제 #6
0
        private string GetCarSIMCode(string sysflag, string cid)
        {
            string       simcode = "";
            ComSqlHelper csh     = new ComSqlHelper();

            SqlParameter[] Parameters = { new SqlParameter("@cid", cid) };
            DataTable      dt         = csh.FillDataSet(WebProc.GetAppSysflagKey(sysflag), WebProc.Proc("QWCProc_LC_GetSimTnoByCid"), Parameters).Tables[0];

            if (dt.Rows.Count > 0)
            {
                simcode = dt.Rows[0]["SimCode"].ToString();
            }
            return(simcode);
        }
예제 #7
0
        private long GetCidByTno(string sysflag, string tno)
        {
            long         cid = -1;
            ComSqlHelper csh = new ComSqlHelper();

            SqlParameter[] Parameters = { new SqlParameter("@tno", tno) };
            DataTable      dt         = csh.FillDataSet(WebProc.GetAppSysflagKey(sysflag), WebProc.Proc("QWCProc_LT_GetCidByTno"), Parameters).Tables[0];

            if (dt.Rows.Count > 0)
            {
                cid = long.Parse(dt.Rows[0]["cid"].ToString());
            }
            return(cid);
        }
예제 #8
0
        private long GetCarCID(string sysflag, string carno)
        {
            long         cid = -1;
            ComSqlHelper csh = new ComSqlHelper();

            SqlParameter[] Parameters = { new SqlParameter("@carno", carno), new SqlParameter("@lpc", "") };
            DataTable      dt         = csh.FillDataSet(WebProc.GetAppSysflagKey(sysflag), WebProc.Proc("QSProc_Car_SelectByCno"), Parameters).Tables[0];

            if (dt.Rows.Count > 0)
            {
                cid = long.Parse(dt.Rows[0]["CID"].ToString());
            }
            return(cid);
        }
예제 #9
0
        private long GetCarCIDBySimCode(string sysflag, string sim)
        {
            long         cid = long.Parse(sim);
            ComSqlHelper csh = new ComSqlHelper();

            SqlParameter[] Parameters = { new SqlParameter("@SIMCode", sim) };
            DataTable      dt         = csh.FillDataSet(WebProc.GetAppSysflagKey(sysflag), WebProc.Proc("QWGProc_App_GetCidBySimcode"), Parameters).Tables[0];

            if (dt.Rows.Count > 0)
            {
                cid = long.Parse(dt.Rows[0]["CID"].ToString());
            }
            return(cid);
        }
예제 #10
0
        private DataTable GetUserCars(string sysflag, string uid)
        {
            ComSqlHelper csh = new ComSqlHelper();

            SqlParameter[] Parameters = { new SqlParameter("@uid", uid) };
            DataTable      dt         = csh.FillDataSet(WebProc.GetAppSysflagKey(sysflag), WebProc.Proc("QWGProc_App_GetUserCars"), Parameters).Tables[0];

            return(dt);
        }
예제 #11
0
        private string GetCarCarno(string sysflag, string cid)
        {
            string       carno = "";
            ComSqlHelper csh   = new ComSqlHelper();

            SqlParameter[] Parameters = { new SqlParameter("@cid", cid) };
            DataTable      dt         = csh.FillDataSet(WebProc.GetAppSysflagKey(sysflag), WebProc.Proc("QWGProc_SC_GetTnoByCid"), Parameters).Tables[0];

            if (dt.Rows.Count > 0)
            {
                carno = dt.Rows[0]["carno"].ToString();
            }
            return(carno);
        }
예제 #12
0
        private carinfo GetCarCID(string sysflag, string carno)
        {
            carinfo      ci  = new carinfo();
            long         cid = -1;
            ComSqlHelper csh = new ComSqlHelper();

            SqlParameter[] Parameters = { new SqlParameter("@carno", carno) };
            DataTable      dt         = csh.FillDataSet(WebProc.GetAppSysflagKey(sysflag), WebProc.Proc("QWGProc_App_GetCarInfoByCarno"), Parameters).Tables[0];

            if (dt.Rows.Count > 0)
            {
                ci.cid   = long.Parse(dt.Rows[0]["CID"].ToString());
                ci.carno = dt.Rows[0]["CarNo"].ToString();
                ci.owner = dt.Rows[0]["CarOwnName"].ToString();
            }
            else
            {
                return(null);
            }
            return(ci);
        }