Example #1
0
        //获取司机列表
        public XmlDocument getDriverList()
        {
            result = XmlProvider.Document("configdata");
            string _sql = readXml("getDriverList");

            using (SqlCommand _cmd = new SqlCommand())
            {
                _cmd.Connection  = SQLConfig.Connection(this.conn);
                _cmd.CommandText = _sql;
                result           = SQLProvider.GetData(_cmd);
            }
            return(this.result);
        }
Example #2
0
        //获取有出车天数的车牌
        public XmlDocument getCarListOnDesc(string _licenseidList)
        {
            result = XmlProvider.Document("sqldata");
            string _sql = " SELECT SUM(CAST(DAYS as int)) AS DAYS ,LicenseID FROM CAR_APPLIED WHERE  AppliedStatue!='拒绝' and AppliedStatue!='取消'  AND LicenseID!='NULL' AND " + _licenseidList + "  group by licenseid order by DAYS ASC";

            //读取数据
            using (SqlCommand _cmd = new SqlCommand())
            {
                _cmd.Connection  = SQLConfig.Connection(this.conn);
                _cmd.CommandText = _sql;
                this.result      = SQLProvider.GetData(_cmd);
            }
            return(result);
        }
Example #3
0
        //获取有出车天数的车牌
        public string getApplyCount(string _SqlLicenseID, DateTime _SqlStart, DateTime _SqlEnd)
        {
            result = XmlProvider.Document("sqldata");
            string _sql = "Select Count(*) AS NUM from Car_Applied where licenseid='" + _SqlLicenseID + "' and StartTime>='" + _SqlStart.ToString() + "' and StartTime<='" + _SqlEnd.ToString() + "'";

            //读取数据
            using (SqlCommand _cmd = new SqlCommand())
            {
                _cmd.Connection  = SQLConfig.Connection(this.conn);
                _cmd.CommandText = _sql;
                this.result      = SQLProvider.GetData(_cmd);
            }
            return(result.DocumentElement.SelectSingleNode("SchemaTable/Num").InnerText.ToString().Trim());
        }
Example #4
0
        /// <summary>
        /// 查询所有车辆状态为出行、维修、空闲的车辆的车牌集合
        /// </summary>
        /// <returns></returns>
        public XmlDocument getEnableCarLicense()
        {
            result = XmlProvider.Document("configdata");
            string _sql = readXml("getEnableCarLicense");//Car.xml中的获取所有车辆状态为出行、维修、空闲的车辆的车牌的标签的type为 getEnableCarLicense

            using (SqlCommand _cmd = new SqlCommand())
            {
                _cmd.Connection  = SQLConfig.Connection(this.conn);
                _cmd.CommandText = _sql;

                this.result = SQLProvider.GetData(_cmd);
            }
            return(result);
        }
Example #5
0
        //获取需要调度员控制的车辆数量
        public int getControlNum()
        {
            result = XmlProvider.Document("configdata");
            string _sql = readXml("getControlCarNum");

            using (SqlCommand _cmd = new SqlCommand())
            {
                _cmd.Connection  = SQLConfig.Connection(this.conn);
                _cmd.CommandText = _sql;

                result = SQLProvider.GetData(_cmd);
            }

            return(Convert.ToInt32(result.DocumentElement.SelectSingleNode("SchemaTable/SetValue").InnerText.ToString().Trim()));
        }
Example #6
0
        //获取司机详情
        public XmlDocument getDriverDetail(string _driverid)
        {
            result = XmlProvider.Document("configdata");
            string _sql = readXml("getDriverDetail");

            using (SqlCommand _cmd = new SqlCommand())
            {
                _cmd.Connection  = SQLConfig.Connection(this.conn);
                _cmd.CommandText = _sql;
                SqlParameter driverid = new SqlParameter("DriverID", SqlDbType.NVarChar, 50);
                driverid.Value = _driverid;
                _cmd.Parameters.Add(driverid);
                result = SQLProvider.GetData(_cmd);
            }
            return(this.result);
        }
Example #7
0
        //根据账号查找司机信息
        public XmlDocument getSingleDetailByAccount(string _account)
        {
            result = XmlProvider.Document("configdata");
            string _sql = readXml("getByAccount");

            using (SqlCommand _cmd = new SqlCommand())
            {
                _cmd.Connection  = SQLConfig.Connection(this.conn);
                _cmd.CommandText = _sql;
                SqlParameter account = new SqlParameter("DriverAccount", SqlDbType.NVarChar, 50);
                account.Value = _account;
                _cmd.Parameters.Add(account);
                result = SQLProvider.GetData(_cmd);
            }
            return(this.result);
        }
Example #8
0
        //获取待联系方式的车辆记录
        public XmlDocument getSingleCarAndCarTel(string _guid)
        {
            result = XmlProvider.Document("configdata");
            string _sql = readXml("getSingleCarAndCarTel");

            using (SqlCommand _cmd = new SqlCommand())
            {
                _cmd.Connection  = SQLConfig.Connection(this.conn);
                _cmd.CommandText = _sql;
                SqlParameter guid = new SqlParameter("Guid", SqlDbType.NVarChar, 50);
                guid.Value = _guid;
                _cmd.Parameters.Add(guid);
                result = SQLProvider.GetData(_cmd);
            }
            return(this.result);
        }
Example #9
0
        /// <summary>
        /// 查询临时调度员账号
        /// </summary>
        /// <returns></returns>
        public XmlDocument getLsDispatcher()
        {
            result = XmlProvider.Document("configdata");
            string _sql = readXml("getLsDispather");//Dispather.xml中的获取临时调度员账号的标签的type为getLsDispather

            using (SqlCommand _cmd = new SqlCommand())
            {
                _cmd.Connection  = SQLConfig.Connection(this.conn);
                _cmd.CommandText = _sql;
                SqlParameter resourceID = new SqlParameter("ResourceID", SqlDbType.NVarChar, 50);
                resourceID.Value = "LSSYSTEM";
                _cmd.Parameters.Add(resourceID);
                result = SQLProvider.GetData(_cmd);
            }
            return(this.result);
        }
Example #10
0
        //获取待联系方式的车辆记录ByLicenseID
        public XmlDocument getSingleCarByLicenseID(string _licenseID)
        {
            result = XmlProvider.Document("configdata");
            string _sql = readXml("getSingleCarByLicenseID");

            using (SqlCommand _cmd = new SqlCommand())
            {
                _cmd.Connection  = SQLConfig.Connection(this.conn);
                _cmd.CommandText = _sql;
                SqlParameter licenseID = new SqlParameter("LicenseID", SqlDbType.NVarChar, 50);
                licenseID.Value = _licenseID;
                _cmd.Parameters.Add(licenseID);
                result = SQLProvider.GetData(_cmd);
            }
            return(this.result);
        }
Example #11
0
        //解除司机与车辆绑定
        public XmlDocument unBound(string _licenseID)
        {
            result = XmlProvider.Document("data");
            string _sql = readXml("unBound");

            using (SqlCommand _cmd = new SqlCommand())
            {
                _cmd.Connection  = SQLConfig.Connection(this.conn);
                _cmd.CommandText = _sql;
                SqlParameter licenseID = new SqlParameter("LicenseID", SqlDbType.NVarChar, 50);
                licenseID.Value = _licenseID;
                _cmd.Parameters.Add(licenseID);
                result = SQLProvider.Transcation(_cmd);
            }
            return(result);
        }
Example #12
0
        //更新需要调度员控制的车辆数量
        public XmlDocument upControlNum(int _num)
        {
            result = XmlProvider.Document("configdata");
            string _sql = readXml("upControlCarNum");

            using (SqlCommand _cmd = new SqlCommand())
            {
                _cmd.Connection  = SQLConfig.Connection(this.conn);
                _cmd.CommandText = _sql;
                SqlParameter SetValue = new SqlParameter("SetValue", SqlDbType.NVarChar, 50);
                SetValue.Value = _num;
                _cmd.Parameters.Add(SetValue);
                result = SQLProvider.Transcation(_cmd);
            }

            return(result);
        }
Example #13
0
        /// <summary>
        /// 获取车辆状态
        /// </summary>
        /// <param name="_reqLicenseID"></param>
        /// <returns></returns>
        public string getStatue(string _reqLicenseID)
        {
            this.result = XmlProvider.Document("sqldata");
            string _sql = readXml("getCarStatue");

            using (SqlCommand _cmd = new SqlCommand())
            {
                _cmd.Connection  = SQLConfig.Connection(this.conn);
                _cmd.CommandText = _sql;
                SqlParameter licenseID = new SqlParameter("LicenseID", SqlDbType.NVarChar, 50);
                licenseID.Value = _reqLicenseID;
                _cmd.Parameters.Add(licenseID);
                result = SQLProvider.GetData(_cmd);
            }

            return(this.result.DocumentElement.SelectSingleNode("SchemaTable/CarStatue").InnerText.ToString().Trim());//车辆状态
        }
Example #14
0
        /// <summary>
        /// 删除司机
        /// </summary>
        /// <param name="_driverID"></param>
        /// <returns></returns>
        public XmlDocument delDriver(string _driverID)
        {
            result = XmlProvider.Document("configdata");
            string _sql = readXml("delDriver");//driver.xml中的添加车辆的标签的type为addDriver

            using (SqlCommand _cmd = new SqlCommand())
            {
                _cmd.Connection  = SQLConfig.Connection(this.conn);
                _cmd.CommandText = _sql;

                SqlParameter driverID = new SqlParameter("DriverID", SqlDbType.NVarChar, 50);
                driverID.Value = _driverID;
                _cmd.Parameters.Add(driverID);

                result = SQLProvider.Transcation(_cmd);
            }
            return(result);
        }
Example #15
0
        //司机获取列表
        public XmlDocument getListD(string _account)
        {
            result = XmlProvider.Document("sqldata");
            string _sql = readXml("getListD");

            using (SqlCommand _cmd = new SqlCommand())
            {
                _cmd.Connection  = SQLConfig.Connection(this.conn);
                _cmd.CommandText = _sql;

                SqlParameter _coAccount = new SqlParameter("COAccount", SqlDbType.NVarChar, 50);
                _coAccount.Value = _account;
                _cmd.Parameters.Add(_coAccount);

                result = SQLProvider.GetData(_cmd);
            }
            return(this.result);
        }
Example #16
0
        //更新车牌
        public XmlDocument upLicense(string _driverid, string _licenseid)
        {
            result = XmlProvider.Document("configdata");
            string _sql = readXml("upLicense");

            using (SqlCommand _cmd = new SqlCommand())
            {
                _cmd.Connection  = SQLConfig.Connection(this.conn);
                _cmd.CommandText = _sql;
                SqlParameter driverid = new SqlParameter("DriverID", SqlDbType.NVarChar, 50);
                driverid.Value = _driverid;
                _cmd.Parameters.Add(driverid);
                SqlParameter licenseID = new SqlParameter("LicenseID", SqlDbType.NVarChar, 50);
                licenseID.Value = _licenseid;
                _cmd.Parameters.Add(licenseID);
                result = SQLProvider.Transcation(_cmd);
            }
            return(this.result);
        }
Example #17
0
        /// <summary>
        /// 更新车辆状态
        /// </summary>
        /// <param name="_licenseID">车牌</param>
        /// <returns></returns>
        public XmlDocument upCarStatue(string _guid, string _carStatue)
        {
            result = XmlProvider.Document("configdata");
            string _sql = readXml("upCarStatue");//Car.xml中的更新车辆状态的标签的type为upCarStatue

            using (SqlCommand _cmd = new SqlCommand())
            {
                _cmd.Connection  = SQLConfig.Connection(this.conn);
                _cmd.CommandText = _sql;

                SqlParameter carStatue = new SqlParameter("CarStatue", SqlDbType.NVarChar, 50);
                carStatue.Value = _carStatue;
                _cmd.Parameters.Add(carStatue);
                SqlParameter guid = new SqlParameter("Guid", SqlDbType.NVarChar, 50);
                guid.Value = _guid;
                _cmd.Parameters.Add(guid);
                result = SQLProvider.Transcation(_cmd);
            }
            return(result);
        }
Example #18
0
        //更新总公里数
        public XmlDocument upKm(string _km, string _account)
        {
            result = XmlProvider.Document("configdata");
            string _sql = readXml("upKm");

            using (SqlCommand _cmd = new SqlCommand())
            {
                _cmd.Connection  = SQLConfig.Connection(this.conn);
                _cmd.CommandText = _sql;

                SqlParameter _diAccount = new SqlParameter("DriverAccount", SqlDbType.NVarChar, 50);
                _diAccount.Value = _account;
                _cmd.Parameters.Add(_diAccount);
                SqlParameter _kmLength = new SqlParameter("Kilometers", SqlDbType.NVarChar, 50);
                _kmLength.Value = _km;
                _cmd.Parameters.Add(_kmLength);
                result = SQLProvider.Transcation(_cmd);
            }
            return(result);
        }
Example #19
0
        //根据ID查找某一预约信息
        public XmlDocument getApply(string _guid)
        {
            result = XmlProvider.Document("sqldata");
            string _sql = readXml("getApply");

            //读取数据
            using (SqlCommand _cmd = new SqlCommand())
            {
                _cmd.Connection  = SQLConfig.Connection(this.conn);
                _cmd.CommandText = _sql;

                SqlParameter _applyID = new SqlParameter("CarAppliedID", SqlDbType.NVarChar, 50);
                _applyID.Value = _guid;
                _cmd.Parameters.Add(_applyID);

                result = SQLProvider.GetData(_cmd);
            }

            return(this.result);
        }
Example #20
0
        public XmlDocument upCarStatueByLicenseID(string _licenseID, string _carStatue)
        {
            result = XmlProvider.Document("configdata");
            string _sql = readXml("upCarStatueByLicenseID");

            using (SqlCommand _cmd = new SqlCommand())
            {
                _cmd.Connection  = SQLConfig.Connection(this.conn);
                _cmd.CommandText = _sql;

                SqlParameter carStatue = new SqlParameter("CarStatue", SqlDbType.NVarChar, 50);
                carStatue.Value = _carStatue;
                _cmd.Parameters.Add(carStatue);
                SqlParameter guid = new SqlParameter("LicenseID", SqlDbType.NVarChar, 50);
                guid.Value = _licenseID;
                _cmd.Parameters.Add(guid);
                result = SQLProvider.Transcation(_cmd);
            }
            return(result);
        }
Example #21
0
        /// <summary>
        /// 车辆维修列表
        /// </summary>
        /// <returns></returns>
        public XmlDocument getFixedList()
        {
            result = XmlProvider.Document("configdata");
            string _sql = readXml("getFixdList");

            try
            {
                using (SqlCommand _cmd = new SqlCommand())
                {
                    _cmd.Connection  = SQLConfig.Connection(this.conn);
                    _cmd.CommandText = _sql;

                    result = SQLProvider.GetData(_cmd);
                }
            }
            catch (Exception _exc)
            {
                Provider.LogErr(result, _exc);
            }
            return(result);
        }
Example #22
0
        /// <summary>
        /// 添加维修记录
        /// </summary>
        /// <param name="_reqLisenceID">车牌</param>
        /// <param name="_reqStartTime">开始时间</param>
        /// <param name="_reqEndTime">结束时间</param>
        /// <returns></returns>
        public XmlDocument addFixed(string _reqLicenseID, string _reqStartTime, string _reqEndTime)
        {
            DateTime _reqEndTimeDay = Convert.ToDateTime(_reqEndTime);

            _reqEndTime = _reqEndTimeDay.Year + "-" + _reqEndTimeDay.Month + "-" + _reqEndTimeDay.Day + " 23:59:59";
            result      = XmlProvider.Document("configdata");
            string _sql = readXml("addFixed");

            try
            {
                using (SqlCommand _cmd = new SqlCommand())
                {
                    _cmd.Connection  = SQLConfig.Connection(this.conn);
                    _cmd.CommandText = _sql;
                    SqlParameter _guid = new SqlParameter("FixID", SqlDbType.NVarChar, 50);
                    _guid.Value = Provider.GUID;
                    _cmd.Parameters.Add(_guid);
                    SqlParameter _licenseID = new SqlParameter("LicenseID", SqlDbType.NVarChar, 50);
                    _licenseID.Value = _reqLicenseID;
                    _cmd.Parameters.Add(_licenseID);
                    SqlParameter _startTime = new SqlParameter("StartTime", SqlDbType.NVarChar, 50);
                    _startTime.Value = Convert.ToDateTime(_reqStartTime);
                    _cmd.Parameters.Add(_startTime);
                    SqlParameter _endTime = new SqlParameter("EndTime", SqlDbType.NVarChar, 50);
                    _endTime.Value = Convert.ToDateTime(_reqEndTime);
                    _cmd.Parameters.Add(_endTime);
                    SqlParameter _statue = new SqlParameter("Statue", SqlDbType.NVarChar, 10);
                    _statue.Value = "未开始";
                    _cmd.Parameters.Add(_statue);

                    result = SQLProvider.Transcation(_cmd);
                }
            }
            catch (Exception _exc)
            {
                Provider.LogErr(result, _exc);
            }
            return(result);
        }
Example #23
0
        private XmlDocument TokenData()
        {
            XmlDocument _result = XmlProvider.Document("sqldata");

            try
            {
                //获取用户
                using (SqlCommand _cmd = new SqlCommand())
                {
                    _cmd.Connection  = SQLConfig.Connection(this.conn);
                    _cmd.CommandText = "select top 1 * from V_Token where TokenID=@id";

                    SqlParameter _id = new SqlParameter("id", SqlDbType.NVarChar, 50);
                    _id.Value = this.token;
                    _cmd.Parameters.Add(_id);

                    _result = SQLProvider.GetData(_cmd);
                    //XmlDocument _api = XmlProvider.Document("api");
                    //_api.Load("http://api.qgj.cn/webapi/profile.asmx/GetUser?User="******"SchemaTable/TokenAccount").InnerText.Trim());
                    //设置用户名
                    XmlElement  _name = _result.CreateElement("TokenName");
                    GetUserInfo user  = new GetUserInfo(_result.DocumentElement.SelectSingleNode("SchemaTable/TokenAccount").InnerText.Trim());
                    _name.InnerXml = "<![CDATA[" + user.getUserName() + "]]>";
                    _result.DocumentElement.SelectSingleNode("SchemaTable").AppendChild(_name);

                    //设置权限节点
                    XmlElement _realPermit = _result.CreateElement("TokenPermit");
                    _realPermit.InnerXml = "<![CDATA[ ]]>";
                    _result.DocumentElement.SelectSingleNode("SchemaTable").AppendChild(_realPermit);
                }
            }
            catch (Exception _exc)
            {
                Provider.LogErr(_result, _exc);
            }

            return(_result);
        }
Example #24
0
        //查找某车某天冲突记录(id)
        public XmlDocument clashApply(string _delayLicenseid, DateTime _dalyStarTtime)
        {
            result = XmlProvider.Document("sqldata");
            string _sql = readXml("delayClashApply");

            //读取数据
            using (SqlCommand _cmd = new SqlCommand())
            {
                _cmd.Connection  = SQLConfig.Connection(this.conn);
                _cmd.CommandText = _sql;

                SqlParameter _licenseid = new SqlParameter("LicenseID", SqlDbType.NVarChar, 50);
                _licenseid.Value = _delayLicenseid;
                _cmd.Parameters.Add(_licenseid);

                SqlParameter _starttime = new SqlParameter("StartTime", SqlDbType.NVarChar, 50);
                _starttime.Value = _dalyStarTtime;
                _cmd.Parameters.Add(_starttime);

                result = SQLProvider.GetData(_cmd);
            }
            return(result);
        }
Example #25
0
        //更改预约状态
        public XmlDocument upApplyStatue(string _guid, string _statue)
        {
            result = XmlProvider.Document("sqldata");
            string _sql = readXml("upApplyStatue");

            //读取数据
            using (SqlCommand _cmd = new SqlCommand())
            {
                _cmd.Connection  = SQLConfig.Connection(this.conn);
                _cmd.CommandText = _sql;

                SqlParameter _applyID = new SqlParameter("CarAppliedID", SqlDbType.NVarChar, 50);
                _applyID.Value = _guid;
                _cmd.Parameters.Add(_applyID);

                SqlParameter _statues = new SqlParameter("AppliedStatue", SqlDbType.NVarChar, 50);
                _statues.Value = _statue;
                _cmd.Parameters.Add(_statues);

                result = SQLProvider.Transcation(_cmd);
            }

            return(this.result);
        }
Example #26
0
        //派遣司机
        public XmlDocument sendDriver(string _guid, string _account, string _name, string _linceseid, string _tel)
        {
            result = XmlProvider.Document("sqldata");
            string _sql = readXml("sendDriver");

            //读取数据
            using (SqlCommand _cmd = new SqlCommand())
            {
                _cmd.Connection  = SQLConfig.Connection(this.conn);
                _cmd.CommandText = _sql;

                SqlParameter _licenid = new SqlParameter("LicenseID", SqlDbType.NVarChar, 50);
                _licenid.Value = _linceseid;
                _cmd.Parameters.Add(_licenid);

                SqlParameter _owner = new SqlParameter("CarOwner", SqlDbType.NVarChar, 50);
                _owner.Value = _name;
                _cmd.Parameters.Add(_owner);

                SqlParameter _coAccount = new SqlParameter("COAccount", SqlDbType.NVarChar, 50);
                _coAccount.Value = _account;
                _cmd.Parameters.Add(_coAccount);

                SqlParameter _carTel = new SqlParameter("CarTelephone", SqlDbType.NVarChar, 50);
                _carTel.Value = _tel;
                _cmd.Parameters.Add(_carTel);

                SqlParameter _guids = new SqlParameter("CarAppliedID", SqlDbType.NVarChar, 50);
                _guids.Value = _guid;
                _cmd.Parameters.Add(_guids);

                result = SQLProvider.Transcation(_cmd);
            }

            return(this.result);
        }
Example #27
0
        /// <summary>
        /// 修改车辆
        /// </summary>
        public XmlDocument motifyCar(string _guid, string _licenseID, string _driverAccount, string _sites, string _mot, string _insurance, string _kilometers)
        {
            result = XmlProvider.Document("configdata");
            string _sql = readXml("motifyCar");

            using (SqlCommand _cmd = new SqlCommand())
            {
                _cmd.Connection  = SQLConfig.Connection(this.conn);
                _cmd.CommandText = _sql;

                SqlParameter guid = new SqlParameter("Guid", SqlDbType.NVarChar, 50);
                guid.Value = _guid;
                _cmd.Parameters.Add(guid);
                SqlParameter licenseID = new SqlParameter("LicenseID", SqlDbType.NVarChar, 50);
                licenseID.Value = _licenseID;
                _cmd.Parameters.Add(licenseID);
                SqlParameter driverAccount = new SqlParameter("DriverAccount", SqlDbType.NVarChar, 50);
                driverAccount.Value = _driverAccount;
                _cmd.Parameters.Add(driverAccount);
                SqlParameter sites = new SqlParameter("Sites", SqlDbType.Int);
                sites.Value = Convert.ToInt32(_sites);
                _cmd.Parameters.Add(sites);
                SqlParameter mot = new SqlParameter("MOT", SqlDbType.NVarChar, 50);
                mot.Value = _mot;
                _cmd.Parameters.Add(mot);
                SqlParameter insurance = new SqlParameter("Insurance", SqlDbType.NVarChar, 50);
                insurance.Value = _insurance;
                _cmd.Parameters.Add(insurance);
                SqlParameter kilometers = new SqlParameter("Kilometers", SqlDbType.NVarChar, 50);
                kilometers.Value = _kilometers;
                _cmd.Parameters.Add(kilometers);

                result = SQLProvider.Transcation(_cmd);
            }
            return(result);
        }
Example #28
0
        //获取部门领导账号
        public string getDepartAccount(string _departID)
        {
            result = XmlProvider.Document("configdata");
            string _sql = readXml("getDepartLeader");

            using (SqlCommand _cmd = new SqlCommand())
            {
                _cmd.Connection  = SQLConfig.Connection(this.conn);
                _cmd.CommandText = _sql;

                SqlParameter departID = new SqlParameter("DepartID", SqlDbType.NVarChar, 50);
                departID.Value = _departID;
                _cmd.Parameters.Add(departID);
                result = SQLProvider.GetData(_cmd);
            }
            if (result.DocumentElement.SelectNodes("SchemaTable").Count > 0)
            {
                return(result.DocumentElement.SelectSingleNode("SchemaTable/DepartLeaderAccount").InnerText.ToString().Trim());
            }
            else
            {
                return("");
            }
        }
Example #29
0
        //查找某车某日记录
        public XmlDocument getDayCar(string _reqLicenseID, string _stime)
        {
            result = XmlProvider.Document("sqldata");
            string   _sql       = readXml("getDayCar");
            DateTime _stimeDate = Convert.ToDateTime(_stime);

            //读取数据
            using (SqlCommand _cmd = new SqlCommand())
            {
                _cmd.Connection  = SQLConfig.Connection(this.conn);
                _cmd.CommandText = _sql;

                SqlParameter _licenseid = new SqlParameter("LicenseID", SqlDbType.NVarChar, 50);
                _licenseid.Value = _reqLicenseID;
                _cmd.Parameters.Add(_licenseid);

                SqlParameter _starttime = new SqlParameter("starttime", SqlDbType.NVarChar, 50);
                _starttime.Value = _stimeDate.Year + "-" + _stimeDate.Month + "-" + _stimeDate.Day + " 23:00:00";
                _cmd.Parameters.Add(_starttime);
                result = SQLProvider.GetData(_cmd);
            }

            return(this.result);
        }
Example #30
0
        /// <summary>
        /// 取消维修
        /// </summary>
        /// <param name="_reqFixID"></param>
        /// <returns></returns>
        public XmlDocument cancelFixedStatue(string _reqFixID)
        {
            result = XmlProvider.Document("configdata");
            string _sql = readXml("cancelFixedStatue");

            try
            {
                using (SqlCommand _cmd = new SqlCommand())
                {
                    _cmd.Connection  = SQLConfig.Connection(this.conn);
                    _cmd.CommandText = _sql;
                    SqlParameter _guid = new SqlParameter("FixID", SqlDbType.NVarChar, 50);
                    _guid.Value = _reqFixID;
                    _cmd.Parameters.Add(_guid);

                    result = SQLProvider.Transcation(_cmd);
                }
            }
            catch (Exception _exc)
            {
                Provider.LogErr(result, _exc);
            }
            return(this.result);
        }