Ejemplo n.º 1
0
        public string WeatherDataListing()
        {
            //Forms the weather data into a string separated by line feeds
            string wsList = "";

            if (weaList.Count > 0)
            {
                {
                    wsList += "WriteDate:\t" + ReportDate.ToString("hh:mm:ss");
                    wsList += "\r\n" + "TempScale:\t" + TempScale.ToString();
                    wsList += "\r\n" + "WindScale:\t" + WindScale.ToString();
                    wsList += "\r\n" + "SkyTemp:\t" + SkyTemp.ToString();
                    wsList += "\r\n" + "AmbTemp:\t" + AmbTemp.ToString();
                    wsList += "\r\n" + "SenTemp:\t" + SenTemp.ToString();
                    wsList += "\r\n" + "WindSpeed:\t" + WindSpeed.ToString();
                    wsList += "\r\n" + "Humidity:\t\t" + Humidity.ToString();
                    wsList += "\r\n" + "DewPoint:\t" + DewPoint.ToString();
                    wsList += "\r\n" + "DewHeat:\t" + DewHeat.ToString();
                    wsList += "\r\n" + "RainFlag:\t\t" + RainFlag.ToString();
                    wsList += "\r\n" + "WetFlag:\t\t" + WetFlag.ToString();
                    wsList += "\r\n" + "ElapsedTime:\t" + ElapsedSeconds.ToString();
                    wsList += "\r\n" + "LastDataWrite:\t" + LastDataWrite.ToString("hh:mm:ss");
                    wsList += "\r\n" + "Cloudiness:\t" + Cloudiness.ToString();
                    wsList += "\r\n" + "Windiness:\t" + Windiness.ToString();
                    wsList += "\r\n" + "Raininess:\t" + Raininess.ToString();
                    wsList += "\r\n" + "Darkness:\t" + Darkness.ToString();
                    wsList += "\r\n" + "RoofCloseFlag:\t" + RoofCloseFlag.ToString();
                    wsList += "\r\n" + "AlertFlag:\t\t" + AlertFlag.ToString();
                }
            }
            return(wsList);
        }
Ejemplo n.º 2
0
        private void btnGenerate_Click(object sender, RoutedEventArgs e)
        {
            if (cmbCashBank.SelectedItem != null && cmbReportDate.SelectedItem != null)
            {
                ReportDate repDate = cmbReportDate.SelectedItem as ReportDate;
                BankModel  bnk     = cmbCashBank.SelectedItem as BankModel;
                repDate.ReportType = cmbChartType.SelectedValue.ToString();

                if (repDate.DateReport.Equals("BY MONTH"))
                {
                    DateTime searchDate = DateTime.Parse(dateFrom.Text);
                    repDate.MonthFrom = searchDate.Year + "-" + searchDate.Month + "-" + searchDate.Day;

                    searchDate      = DateTime.Parse(dateTo.Text);
                    repDate.MonthTo = searchDate.Year + "-" + searchDate.Month + "-" + searchDate.Day;
                    ReportForm report = new ReportForm(bnk, repDate, "FHBOTTLES");
                    report.ShowDialog();
                }
                else
                {
                    repDate.YearFrom = txtYearFrom.Text + "-01-01";
                    repDate.YearTo   = txtYearTo.Text + "-12-31";
                    ReportForm report = new ReportForm(bnk, repDate, "FHBOTTLES");
                    report.ShowDialog();
                }
            }
        }
Ejemplo n.º 3
0
        private void button2_Click_1(object sender, EventArgs e)
        {
            moveSidePanel(button2);
            ReportDate ssa = new ReportDate();

            addControlsTopanel(ssa);
        }
Ejemplo n.º 4
0
        public ContentResult GetReport(int reportId, ReportDate reportDate, string customer, bool?nonCash)
        {
            var dates = ReporDateRanges.GetDates(reportDate);

            dates.From = DateTime.SpecifyKind(dates.From, DateTimeKind.Utc);
            dates.To   = DateTime.SpecifyKind(dates.To, DateTimeKind.Utc);
            return(GetReportDates(reportId, dates.From, dates.To, customer, nonCash));
        }         // GetReport
Ejemplo n.º 5
0
        /// <summary>
        /// Returns true if InventoryOrder instances are equal
        /// </summary>
        /// <param name="other">Instance of InventoryOrder to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(InventoryOrder other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                     ) &&
                 (
                     Description == other.Description ||
                     Description != null &&
                     Description.Equals(other.Description)
                 ) &&
                 (
                     InventoryVariantName == other.InventoryVariantName ||
                     InventoryVariantName != null &&
                     InventoryVariantName.Equals(other.InventoryVariantName)
                 ) &&
                 (
                     Created == other.Created ||
                     Created != null &&
                     Created.Equals(other.Created)
                 ) &&
                 (
                     ReportDate == other.ReportDate ||
                     ReportDate != null &&
                     ReportDate.Equals(other.ReportDate)
                 ) &&
                 (
                     Creator == other.Creator ||
                     Creator != null &&
                     Creator.Equals(other.Creator)
                 ) &&
                 (
                     Assignees == other.Assignees ||
                     Assignees != null &&
                     Assignees.SequenceEqual(other.Assignees)
                 ) &&
                 (
                     Status == other.Status ||
                     Status != null &&
                     Status.Equals(other.Status)
                 ) &&
                 (
                     HasOnlyUntaggedAssets == other.HasOnlyUntaggedAssets ||
                     HasOnlyUntaggedAssets != null &&
                     HasOnlyUntaggedAssets.Equals(other.HasOnlyUntaggedAssets)
                 ));
        }
Ejemplo n.º 6
0
        public IEnumerable <IEnumerable <string> > GetMonthMeasurements(ReportDate date)
        {
            var from = string.Format("{0}{1}00", date.YearAsString, date.MonthAsString);
            var to   = string.Format("{0}{1}00", date.YearAsString, date.MonthPlusOneAsString);

            var sqlCommand = string.Format("Select datum, Psum_0, Psum_1, Psum_2, Psum_3, Psum_4, Psum_5, Psum_6 from gis where datum >= {0} and datum < {1}", from, to);

            return(this.Select(sqlCommand, ConnectionString.Value));
        }
Ejemplo n.º 7
0
        public IEnumerable <IEnumerable <string> > GetMeasurements(ReportDate date)
        {
            var from = string.Format("{0}{1}{2}0000", date.YearAsString, date.MonthAsString, date.DayAsString);
            var to   = string.Format("{0}{1}{2}0000", date.YearAsString, date.MonthAsString, date.DayPlusOneAsString);

            var sqlCommand = string.Format("Select datum, pac_1, pac_2, pac_3, pac_4, pac_5, pac_6, pac_7 from minutas where datum >= {0} and datum < {1}", from, to);

            return(this.dbConnection.Select(sqlCommand, this.settingsProvider.GetDbConnectionString()));
        }
Ejemplo n.º 8
0
 public DailyStatusReportVM(ITenantDBsDir dir) : base(dir)
 {
     MinDate         = dir.Collections.AllDates().First();
     MaxDate         = dir.Collections.LastPostedDate();
     ReportDate      = MaxDate;
     PreviousDateCmd = R2Command.Relay(() => ReportDate = ReportDate.AddDays(-1),
                                       _ => ReportDate > MinDate, "Previous Day");
     NextDateCmd = R2Command.Relay(() => ReportDate = ReportDate.AddDays(1),
                                   _ => ReportDate < MaxDate, "Next Day");
 }
Ejemplo n.º 9
0
 public PurchasingReport(Parking principalParking)
 {
     InitializeComponent();
     dtpFinishingHour.ResetText();
     dtpStartingHour.ResetText();
     lblTitleTable.Hide();
     pnlReport.Hide();
     MyParking    = principalParking;
     myReportDate = new ReportDate();
 }
Ejemplo n.º 10
0
        public override string ToString()
        {
            string str = ReportDate.ToShortDateString() + " ";

            for (int i = 0; i < _values.Count; ++i)
            {
                str += _values[i].ToString("0.00") + (i + 1 < _values.Count ? " " : string.Empty);
            }

            return(str);
        }
Ejemplo n.º 11
0
        private static ReportDate CreateReportDate(string date)
        {
            var split = date.Split('.');
            int day   = int.Parse(split[0]);
            int month = int.Parse(split[1]);
            int year  = int.Parse(split[2]);

            var reportDate = new ReportDate(year, month, day);

            return(reportDate);
        }
Ejemplo n.º 12
0
        private void loadReportDates()
        {
            ReportDate dateReport = new ReportDate();

            dateReport.DateReport = "BY YEAR";

            cmbReportDate.Items.Add(dateReport);
            dateReport            = new ReportDate();
            dateReport.DateReport = "BY MONTH";
            cmbReportDate.Items.Add(dateReport);
        }
Ejemplo n.º 13
0
        private static string CopyTemplate(string path, ReportDate date, string templateFile, string targetFileName)
        {
            var location  = System.Reflection.Assembly.GetExecutingAssembly().Location;
            var directory = Path.GetDirectoryName(location);

            var templatePath = string.Format("{0}\\Template\\{1}", directory, templateFile);
            var targetPath   = string.Format("{0}\\{1}", path, targetFileName);

            File.Copy(templatePath, targetPath, true);
            return(targetPath);
        }
Ejemplo n.º 14
0
        public bool ArePurchaseHoursInRangeForReport(ReportDate myReportDate,
                                                     DateTime purchaseStartingHour, DateTime purchaseFinishingHour)
        {
            return((purchaseStartingHour.TimeOfDay <= myReportDate.StartingHour.TimeOfDay &&
                    purchaseFinishingHour.TimeOfDay >= myReportDate.StartingHour.TimeOfDay)

                   || (purchaseStartingHour.TimeOfDay <= myReportDate.FinishingHour.TimeOfDay &&
                       purchaseFinishingHour.TimeOfDay >= myReportDate.FinishingHour.TimeOfDay)

                   || (purchaseStartingHour.TimeOfDay >= myReportDate.StartingHour.TimeOfDay &&
                       purchaseFinishingHour.TimeOfDay <= myReportDate.FinishingHour.TimeOfDay));
        }
Ejemplo n.º 15
0
        public void IsChosenSHSameAsFH()
        {
            DateTime startingHour  = DateTime.Today;
            DateTime finishingHour = DateTime.Today;

            startingHour  = startingHour.AddHours(14);
            finishingHour = finishingHour.AddHours(14);

            ReportDate rep = new ReportDate
            {
                StartingHour  = startingHour,
                FinishingHour = finishingHour
            };

            Assert.IsTrue(aParking.IsChosenSHEarlierThanChosenFH(rep));
        }
Ejemplo n.º 16
0
        public void IsChosenSDSameAsFD()
        {
            DateTime startingDate  = DateTime.Today;
            DateTime finishingDate = DateTime.Today;

            startingDate  = startingDate.AddHours(14);
            finishingDate = finishingDate.AddHours(14);

            ReportDate rep = new ReportDate
            {
                StartingDate  = startingDate,
                FinishingDate = finishingDate
            };

            Assert.IsTrue(aParking.IsChosenSDateEarlierThanChosenFDate(rep));
        }
        private List <CompanyPayrollItemSummaryLine> GetCompanyData()
        {
            try
            {
                using (var ctx = new PayrollDB())
                {
                    var startDate = DateTime.Parse(string.Format("{0}/1/{1}", ReportDate.Month, ReportDate.Year));
                    var endDate   =
                        DateTime.Parse(string.Format("{0}/1/{1}", ReportDate.AddMonths(1).Month,
                                                     ReportDate.AddMonths(1).Year));
                    var plst = (from p in ctx.PayrollItems//.Where(x => x.PayrollJobId == CurrentPayrollJob.PayrollJobId)
                                .Where(
                                    pi =>
                                    pi.PayrollJob.EndDate.Month == ReportDate.Month &&
                                    pi.PayrollJob.EndDate.Year == ReportDate.Year)
                                .Include(x => x.PayrollJob.Company.Institution)

                                .OrderByDescending(x => x.IncomeDeduction)
                                .ThenBy(x => x.PayrollSetupItem == null ? x.Priority : x.PayrollSetupItem.Priority)
                                group p by new { p.Name }
                                into g
                                select new CompanyPayrollItemSummaryLine
                    {
                        Payroll_Item = g.Key.Name,
                        Total = g.Sum(p => p.Amount),
                        PayrollItems =
                            g.OrderByDescending(x => x.IncomeDeduction)
                            .ThenBy(x => x.PayrollSetupItem == null ? x.Priority : x.PayrollSetupItem.Priority)
                    }).ToList();
                    if (!plst.Any())
                    {
                        return(null);
                    }
                    plst.ForEach(x => x.PayrollItems.ToList().ForEach(z =>
                    {
                        z.PayrollJobReference.Load();
                        z.PayrollJob.CompanyReference.Load();
                        z.PayrollJob.Company.InstitutionReference.Load();
                    }));
                    return(plst);
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Ejemplo n.º 18
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (Id != null)
         {
             hashCode = hashCode * 59 + Id.GetHashCode();
         }
         if (Description != null)
         {
             hashCode = hashCode * 59 + Description.GetHashCode();
         }
         if (InventoryVariantName != null)
         {
             hashCode = hashCode * 59 + InventoryVariantName.GetHashCode();
         }
         if (Created != null)
         {
             hashCode = hashCode * 59 + Created.GetHashCode();
         }
         if (ReportDate != null)
         {
             hashCode = hashCode * 59 + ReportDate.GetHashCode();
         }
         if (Creator != null)
         {
             hashCode = hashCode * 59 + Creator.GetHashCode();
         }
         if (Assignees != null)
         {
             hashCode = hashCode * 59 + Assignees.GetHashCode();
         }
         if (Status != null)
         {
             hashCode = hashCode * 59 + Status.GetHashCode();
         }
         if (HasOnlyUntaggedAssets != null)
         {
             hashCode = hashCode * 59 + HasOnlyUntaggedAssets.GetHashCode();
         }
         return(hashCode);
     }
 }
Ejemplo n.º 19
0
        public async Task <IActionResult> GetReport(ReportDate date)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var reportString = await _reportManager.BuildReport(date.Year, date.Month);

            var content = Encoding.UTF8.GetBytes(reportString);

            var result = new FileContentResult(content, "application/octet-stream")
            {
                FileDownloadName = "report.txt"
            };

            return(result);
        }
Ejemplo n.º 20
0
        /// <summary>
        /// Returns true if OwnerVerificationPdfViewModel instances are equal
        /// </summary>
        /// <param name="other">Instance of OwnerVerificationPdfViewModel to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(OwnerVerificationPdfViewModel other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     ReportDate == other.ReportDate ||
                     ReportDate.Equals(other.ReportDate)
                     ) && (
                     Title == other.Title ||
                     Title.Equals(other.Title)
                     ) &&
                 (
                     DistrictId == other.DistrictId ||
                     DistrictId.Equals(other.DistrictId)
                 ) &&
                 (
                     MinistryDistrictId == other.MinistryDistrictId ||
                     MinistryDistrictId.Equals(other.MinistryDistrictId)
                 ) &&
                 (
                     DistrictName == other.DistrictName ||
                     DistrictName.Equals(other.DistrictName)
                 ) &&
                 (
                     DistrictAddress == other.DistrictAddress ||
                     DistrictAddress.Equals(other.DistrictAddress)
                 ) &&
                 (
                     DistrictContact == other.DistrictContact ||
                     DistrictContact.Equals(other.DistrictContact)
                 ) &&
                 (
                     Owners == other.Owners ||
                     Owners.Equals(other.Owners)
                 ));
        }
Ejemplo n.º 21
0
        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            // credit: http://stackoverflow.com/a/263416/677735
            unchecked // Overflow is fine, just wrap
            {
                int hash = 41;

                // Suitable nullity checks
                hash = hash * 59 + ReportDate.GetHashCode();
                hash = hash * 59 + Title.GetHashCode();
                hash = hash * 59 + DistrictId.GetHashCode();
                hash = hash * 59 + MinistryDistrictId.GetHashCode();
                hash = hash * 59 + DistrictName.GetHashCode();
                hash = hash * 59 + DistrictAddress.GetHashCode();
                hash = hash * 59 + DistrictContact.GetHashCode();
                hash = hash * 59 + Owners.GetHashCode();

                return(hash);
            }
        }
Ejemplo n.º 22
0
        public void IsPurchaseDateInRangeForReportTrueRFDateAfterPFDate()
        {
            DateTime purchaseDate = DateTime.Today;

            purchaseDate = purchaseDate.AddHours(34);

            DateTime startingDate = DateTime.Today;

            startingDate = startingDate.AddHours(10);
            DateTime finishingDate = DateTime.Today;

            finishingDate = finishingDate.AddHours(58);

            ReportDate rep = new ReportDate
            {
                StartingDate  = startingDate,
                FinishingDate = finishingDate
            };

            Assert.IsTrue(aParking.IsPurchaseDateInRangeForReport(rep, purchaseDate));
        }
Ejemplo n.º 23
0
 public void ComputeEndDate()
 {
     DueDate = ReportDate.AddDays(7);
 }
        public string QueryManPowerRequestRPT(ProductionPlanningReportVM vm)
        {
            List <ReportByDatePhase> datePhaseList = new List <ReportByDatePhase>();
            ReportDate phase = new ReportDate();
            var        date  = Convert.ToDateTime(vm.DateFrom);

            switch (date.DayOfWeek.ToString())
            {
            case "Monday":
                phase.StartDate = date;
                phase.EndDate   = date.AddDays(6);
                break;

            case "Tuesday":
                phase.StartDate = date.AddDays(-1);
                phase.EndDate   = date.AddDays(5);
                break;

            case "Wednesday":
                phase.StartDate = date.AddDays(-2);
                phase.EndDate   = date.AddDays(4);
                break;

            case "Thursday":
                phase.StartDate = date.AddDays(-3);
                phase.EndDate   = date.AddDays(3);
                break;

            case "Friday":
                phase.StartDate = date.AddDays(-4);
                phase.EndDate   = date.AddDays(2);
                break;

            case "Saturday":
                phase.StartDate = date.AddDays(-5);
                phase.EndDate   = date.AddDays(1);
                break;

            case "Sunday":
                phase.StartDate = date.AddDays(-6);
                phase.EndDate   = date;
                break;
            }

            ReportByDatePhase pPreviousPhase = new ReportByDatePhase();

            pPreviousPhase.StartDate = phase.StartDate.AddDays(-14).ToString(FormatConstants.DateTimeFormatStringByDate);
            pPreviousPhase.EndDate   = phase.EndDate.AddDays(-14).ToString(FormatConstants.DateTimeFormatStringByDate);
            datePhaseList.Add(pPreviousPhase);

            ReportByDatePhase previousPhase = new ReportByDatePhase();

            previousPhase.StartDate = phase.StartDate.AddDays(-7).ToString(FormatConstants.DateTimeFormatStringByDate);
            previousPhase.EndDate   = phase.EndDate.AddDays(-7).ToString(FormatConstants.DateTimeFormatStringByDate);
            datePhaseList.Add(previousPhase);

            ReportByDatePhase currentPhase = new ReportByDatePhase();

            currentPhase.StartDate = phase.StartDate.ToString(FormatConstants.DateTimeFormatStringByDate);
            currentPhase.EndDate   = phase.EndDate.ToString(FormatConstants.DateTimeFormatStringByDate);
            datePhaseList.Add(currentPhase);

            ReportByDatePhase nextPhase = new ReportByDatePhase();

            nextPhase.StartDate = phase.StartDate.AddDays(7).ToString(FormatConstants.DateTimeFormatStringByDate);
            nextPhase.EndDate   = phase.EndDate.AddDays(7).ToString(FormatConstants.DateTimeFormatStringByDate);
            datePhaseList.Add(nextPhase);

            ReportByDatePhase nNextPhase = new ReportByDatePhase();

            nNextPhase.StartDate = phase.StartDate.AddDays(14).ToString(FormatConstants.DateTimeFormatStringByDate);
            nNextPhase.EndDate   = phase.EndDate.AddDays(14).ToString(FormatConstants.DateTimeFormatStringByDate);
            datePhaseList.Add(nNextPhase);

            var json = JsonConvert.SerializeObject(datePhaseList);

            return(json);
        }
Ejemplo n.º 25
0
        }         // DownloadReportDates

        public FileResult DownloadReport(int reportId, ReportDate reportDate, string customer, bool?nonCash)
        {
            var dates = ReporDateRanges.GetDates(reportDate);

            return(DownloadReportDates(reportId, dates.From, dates.To, customer, nonCash));
        }         // DownloadReport
Ejemplo n.º 26
0
 public int GetHashCode(Report obj)
 {
     return(ReportId * (ReportDate.GetHashCode()));
 }
Ejemplo n.º 27
0
        private string editTextLine()
        {
            // 2018.01 asakawa 数値がマイナスの場合の出力形式の修正のために一部変更

            string textLine = "";

            // 伝区
            textLine += "0";
            // 年号
            textLine += "1";
            // 売上年月日
            string date = ReportDate.ToShortDateString();

            textLine += util.TruncateByteRight(DHandling.RemoveNoNum(date), 6);             // yyyymmdd →yymmdd
            // 請求年月日
            textLine += util.TruncateByteRight(DHandling.RemoveNoNum(date), 6);             // yyyymmdd →yymmdd
            // 伝票番号 6桁、0Padding
            textLine += util.PaddingInBytes(Convert.ToString(SlipNo), "Number", 6);

            // 得意先コード(業務No)
            textLine += TaskCode;

            // 得意先名
            char[] strChar = TaskName.ToCharArray();
            for (int i = 0; i < strChar.Length; i++)
            {
                if (strChar[i] == ' ')
                {
                    strChar[i] = ' ';
                }
            }
            TaskName = new string( strChar );
            //string taskData = util.FormFixedByteLengthLeft("(" + CostType + ")" + TaskName, 68);
            string taskData = util.FormFixedByteLengthLeft(TaskName, 68);

            textLine += util.TruncateByteLeft(taskData, 40);
            // 先方担当者名
            textLine += util.TruncateByteRight(taskData, 28);
            // 部門コード
            int dIdx = Array.IndexOf(sdKeyArray, (OfficeCode + util.SubstringByte(TaskCode, 0, 1)));

            if (dIdx < 0)
            {
                dIdx = Array.IndexOf(sdKeyArray, (OfficeCode + " "));
            }
            textLine += sDeptArray[dIdx];
            // 担当者コード
            //string pCode = Conv.ResizeMemberCode(MemberCode.TrimEnd(),2);
            textLine += Conv.ResizeMemberCode(LeaderMCode.TrimEnd(), 2);
            // 摘要コード
            textLine += "00";
            // 摘要名
            textLine += util.PaddingInBytes(" ", "Char", 30);
            // 商品コード
            textLine += util.SubstringByte(ItemCode, 0, 4);
            // マスター区分
            textLine += "0";
            // 品名
            if (ItemCode.TrimEnd() == "K999")
            {
                char checkChar = ' ';
                if (Item != "")
                {
                    checkChar = Item[0];
                }
                string kItem = (checkChar == '●') ? Item : kMark + Item;
                textLine += util.FormFixedByteLengthLeft(kItem, 36);
            }
            else
            {
                textLine += util.FormFixedByteLengthLeft(Item, 36);
            }
            //textLine += util.PaddingInBytes(Item, "Char", 36);
            //textLine += util.FormFixedByteLengthLeft(Item, 36);
            // 区
            textLine += "0";
            // 入数
            textLine += "0000";
            // 箱数
            textLine += "00000";
            // 数量
            if (Quantity == 0)
            {
                Quantity = 1;                        // 0では商魂汎用データ作成時にエラーになる
            }
            // 2018.01 asakawa マイナス値の場合の出力形式の修正のために変更
            // textLine += util.PaddingInBytes( Convert.ToString( Quantity ), "Number", 9 );
            if (Quantity < 0)
            {
                textLine += "-";
                decimal qq = Quantity * (-1);
                textLine += util.PaddingInBytes(Convert.ToString(qq), "Number", 8);
            }
            else
            {
                textLine += util.PaddingInBytes(Convert.ToString(Quantity), "Number", 9);
            }
            // 単位
            textLine += util.PaddingInBytes(Unit, "Char", 4);
            // 単価
            // 2018.01 asakawa マイナス値の場合の出力形式の修正のために変更
            // textLine += util.PaddingInBytes( UnitPrice.ToString( "0" ), "Number", 10 );
            if (UnitPrice < 0)
            {
                textLine += "-";
                decimal pp = UnitPrice * (-1);
                // textLine += util.PaddingInBytes(Convert.ToString(pp), "Number", 9); // 小数点以下も出力される
                textLine += util.PaddingInBytes(pp.ToString("0"), "Number", 9);
            }
            else
            {
                textLine += util.PaddingInBytes(UnitPrice.ToString("0"), "Number", 10);
            }
            // 売上金額
            int sales = Convert.ToInt32(Quantity * UnitPrice);

            // 2018.01 asakawa マイナス値の場合の出力形式の修正のために変更
            // textLine += util.PaddingInBytes( Convert.ToString( sales ), "Number", 10 );
            if (sales < 0)
            {
                textLine += "-";
                textLine += util.PaddingInBytes(Convert.ToString(sales * (-1)), "Number", 9);
            }
            else
            {
                textLine += util.PaddingInBytes(Convert.ToString(sales), "Number", 10);
            }
            // 原単価
            textLine += util.PaddingInBytes("0", "Number", 9);
            // 原価額
            textLine += util.PaddingInBytes("0", "Number", 10);
            // 税区分
            textLine += "0";
            // 税込区分
            textLine += "0";
            // 備考区分
            textLine += "1";        //備考区分が0:備考は数字、1:文字1
            // 備考
            textLine += util.PaddingInBytes(" ", "Char", 9);
            // 同時入荷区分
            textLine += "0";

            return(textLine);
        }
Ejemplo n.º 28
0
 public bool IsChosenSHEarlierThanChosenFH(ReportDate myReportDate)
 {
     return(myReportDate.StartingHour.TimeOfDay
            <= myReportDate.FinishingHour.TimeOfDay);
 }
Ejemplo n.º 29
0
 public bool IsChosenSDateEarlierThanChosenFDate(ReportDate myReportDate)
 {
     return(myReportDate.StartingDate.Date
            <= myReportDate.FinishingDate.Date);
 }
Ejemplo n.º 30
0
 public bool IsPurchaseDateInRangeForReport(ReportDate myReportDate, DateTime purchaseDate)
 {
     return(purchaseDate.Date >= myReportDate.StartingDate.Date &&
            purchaseDate.Date <= myReportDate.FinishingDate.Date);
 }