当前位置: 首页>>代码示例>>C#>>正文


C# DataAccess.SpareInSpareOutgoViewGet方法代码示例

本文整理汇总了C#中bycar.DataAccess.SpareInSpareOutgoViewGet方法的典型用法代码示例。如果您正苦于以下问题:C# DataAccess.SpareInSpareOutgoViewGet方法的具体用法?C# DataAccess.SpareInSpareOutgoViewGet怎么用?C# DataAccess.SpareInSpareOutgoViewGet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在bycar.DataAccess的用法示例。


在下文中一共展示了DataAccess.SpareInSpareOutgoViewGet方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: LoadOfferings

 public decimal LoadOfferings()
 {
     decimal sum = 0;
     int n = 1;
     da = new DataAccess();
     List<SpareInSpareOutgoView> items = da.SpareInSpareOutgoViewGet(this._id);
     foreach (SpareInSpareOutgoView i in items)
     {
         i.num = n;
         sum += i.total_sum;
         n++;
     }
     dgSpares.DataContext = items;
     edtSum.Content = "Сумма: " + sum.ToString();
     return sum;
 }
开发者ID:bashlykevich,项目名称:Bycar,代码行数:16,代码来源:SpareOutgoEditView.xaml.cs

示例2: BuildReportByOutgo

        private void BuildReportByOutgo()
        {
            if (Outgo == null)
                return;
            try
            {
                ReportDocument reportDocument = new ReportDocument();

                StreamReader reader = new StreamReader(new FileStream(@"Templates\SalesCheckReport.xaml", FileMode.Open, FileAccess.Read));
                reportDocument.XamlData = reader.ReadToEnd();
                reportDocument.XamlImagePath = System.IO.Path.Combine(Environment.CurrentDirectory, @"Templates\");
                reader.Close();

                ReportData data = new ReportData();
                decimal ts = 0;
                decimal vs = 0;
                decimal asum = 0;
                DataAccess da = new DataAccess();
                string BCC = da.getBasicCurrencyCode();

                //Income.currencyReference.Load();
                //string CCC = Income.currency.code;

                // Таблица ТОВАРЫ В НАКЛАДНОЙ
                DataTable dt = new DataTable("mtable");

                // описываем столбцы таблицы
                dt.Columns.Add("SpareName", typeof(string));
                dt.Columns.Add("UnitName", typeof(string));
                dt.Columns.Add("Quantity", typeof(string));
                dt.Columns.Add("Price", typeof(string));
                dt.Columns.Add("Amount", typeof(string));
                dt.Columns.Add("VAT", typeof(string));
                dt.Columns.Add("VATAmount", typeof(string));
                dt.Columns.Add("Total", typeof(string));
                decimal TotalAmount = 0;

                // забиваем таблицу данными
                List<ReportOutgo> list = new List<ReportOutgo>();
                list = da.GetReportOutgoes(SpareOutgoId);

                List<SpareInSpareOutgoView> LIST2 = da.SpareInSpareOutgoViewGet(SpareOutgoId);
                try
                {
                    string CompanyName = da.getProfileCurrent().CompanyName;
                    for (int i = 0; i < LIST2.Count; i++)
                    {
                        //decimal Total = list[i].total_sum;
                        //decimal VatSum = Total * list[i].VatRate.Value / 100;
                        //decimal Sum = Total - VatSum;
                        //decimal Price = Sum / list[i].quantity;
                        TotalAmount += list[i].quantity * list[i].PriceOut.Value;

                        //ts += Total;
                        //vs += VatSum;
                        //asum += Sum;

                        dt.Rows.Add(new object[] {
                            list[i].SpareName,
                            list[i].UnitName,
                            list[i].quantity.ToString("0.##"),
                            list[i].PriceOut.Value.ToString("0.##"),
                            (list[i].PriceOut.Value*list[i].quantity).ToString("0.##"),
                            list[i].VatName,
                            0,
                            0
                        });
                    }
                }
                catch (Exception exc)
                {
                    throw exc;
                }
                string str_ts = RSDN.RusCurrency.Str(ts, "BYR");
                string str_vs = RSDN.RusCurrency.Str(vs, "BYR");

                // set constant document values
                //string strDate = Outgo.created_on.Value.GetDateTimeFormats('d')[3];
                string strDate = Outgo.created_on.Value.Day.ToString();
                string mnth = "";
                switch (Outgo.created_on.Value.Month)
                {
                    case 1:
                        mnth = "января";
                        break;

                    case 2:
                        mnth = "февраля";
                        break;

                    case 3:
                        mnth = "марта";
                        break;

                    case 4:
                        mnth = "апреля";
                        break;

                    case 5:
                        mnth = "мая";
//.........这里部分代码省略.........
开发者ID:bashlykevich,项目名称:Bycar,代码行数:101,代码来源:ReportViewSalesCheck.xaml.cs


注:本文中的bycar.DataAccess.SpareInSpareOutgoViewGet方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。