Ejemplo n.º 1
0
        /// <summary>
        /// 获取计量任务流水数据
        /// </summary>
        private void getTaskDoResult()
        {
            if (SelectedUser == null || string.IsNullOrWhiteSpace(SelectedUser.LogName))
            {
                return;
            }
            string serviceUrl = ConfigurationManager.AppSettings["getTaskDoResult"].Trim();
            var    temp       = new
            {
                equcode       = "",
                equname       = "",
                equtype       = "",
                opname        = "",
                opcode        = SelectedUser.LogName,
                carno         = "",
                taskdoresult  = "",
                memo          = "",
                taskbegintime = DateTimeBegin.ToString("yyyy-MM-dd HH:mm:ss"),
                taskendtime   = DateTimeEnd.ToString("yyyy-MM-dd HH:mm:ss")
            };

            string jsonStr = "[" + InfoExchange.ConvertToJsonIgnoreRef1(temp) + "]";

            serviceUrl = string.Format(serviceUrl, jsonStr);
            HttpWebRequest request = WebRequestCommon.GetHttpGetWebRequest(serviceUrl, 10);

            request.BeginGetResponse(new AsyncCallback(BindTaskDoResult), request);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Calcul de la consommation de carburant requise pour le vol
        /// </summary>
        /// <returns></returns>
        public double CalculateRequiredFuel()
        {
            // La consommation est exprimée en : Consommation / (KM/h)
            var      fuelConsumption_Per_KM_Per_Hour = Aircraft.FuelConsumption_Per_KM_Per_Hour;
            var      distance = CalculateDistance();
            TimeSpan duration = DateTimeEnd.Subtract(DateTimeBegin);

            return((fuelConsumption_Per_KM_Per_Hour * (distance / duration.TotalHours)) + Aircraft.TakeOffEffort);
        }
Ejemplo n.º 3
0
        public override string ToString()
        {
            string newLine = "\r\n";

            return("BEGIN:VCALENDAR" + newLine +
                   "VERSION:2.0" + newLine +
                   "PRODID:-//" + companyName + "//" + applicationName + "//EN" + newLine +
                   "METHOD:PUBLISH" + newLine +
                   "BEGIN:VEVENT" + newLine +
                   "SUMMARY:" + Summary + newLine +
                   "UID:" + Guid.NewGuid() + newLine +
                   "DTSTART:" + DateTimeStart.ToUniversalTime().ToString(dateFormat) + newLine +
                   "DTEND:" + DateTimeEnd.ToUniversalTime().ToString(dateFormat) + newLine +
                   "DTSTAMP:" + DateTime.Now.ToUniversalTime().ToString(dateFormat) + newLine +
                   "LOCATION:" + Location + newLine +
                   "DESCRIPTION:" + Description + newLine +
                   "END:VEVENT" + newLine +
                   "END:VCALENDAR" + newLine);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 获取计量员集合
        /// </summary>
        private void getAllTaskDoResultAvgTime()
        {
            string serviceUrl = ConfigurationManager.AppSettings["getAllTaskDoResultAvgTime"].Trim();
            var    temp       = new { taskbegintime = DateTimeBegin.ToString("yyyy-MM-dd HH:mm:ss"), taskendtime = DateTimeEnd.ToString("yyyy-MM-dd HH:mm:ss") };

            string jsonStr = "[" + InfoExchange.ConvertToJsonIgnoreRef1(temp) + "]";

            serviceUrl = string.Format(serviceUrl, jsonStr);
            HttpWebRequest request = WebRequestCommon.GetHttpGetWebRequest(serviceUrl, 10);

            request.BeginGetResponse(new AsyncCallback(BindAllTaskDoResultAvgTime), request);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 获取计量员集合
        /// </summary>
        private void getCarWeightTaskCount()
        {
            string serviceUrl = ConfigurationManager.AppSettings["getCarWeightTaskCount"].Trim();
            var    temp       = new { equcode = "", equname = "", begintime = DateTimeBegin.ToString("yyyy-MM-dd HH:mm:ss"), endtime = DateTimeEnd.ToString("yyyy-MM-dd HH:mm:ss") };

            string jsonStr = InfoExchange.ConvertToJsonIgnoreRef1(temp);

            serviceUrl = string.Format(serviceUrl, jsonStr);
            HttpWebRequest request = WebRequestCommon.GetHttpGetWebRequest(serviceUrl, 10);

            request.BeginGetResponse(new AsyncCallback(BindCarWeightTaskCount), request);
        }