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


C# DataAccess.InOfferingCreate方法代码示例

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


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

示例1: btnNext_Click

 private void btnNext_Click(object sender, RoutedEventArgs e)
 {
     Stage++;
     if (Stage == 1)
     {
         dgSpares.IsEnabled = true;
         btnNext.Content = "Сохранить";
     }
     else
         if (Stage == 2)
         {
             foreach (SpareInSpareIncomeView sisi in offerings)
             {
                 //sisi.SpareName
                 //sisi.BrandName
                 //sisi.SpareCode
                 //sisi.SpareCodeShatem
                 DataAccess db = new DataAccess();
                 int SpareID = sisi.SpareID.Value;
                 db.InOfferingCreate(sisi.SpareID.Value, sisi.QIn, sisi.PIn.Value, sisi.Markup, sisi.POut.Value, sisi.S.Value, sisi.SpareIncomeID.Value);
                 SpareContainer.Instance.Update(SpareID);
             }
             Close();
         }
 }
开发者ID:bashlykevich,项目名称:Bycar,代码行数:25,代码来源:SpareIncomeSmart.xaml.cs

示例2: getRemains


//.........这里部分代码省略.........
                {
                    decimal P = 0;
                    if (decimal.TryParse(list[i].ChildNodes[4].InnerText, out P))
                    {
                        P = decimal.Parse(list[i].ChildNodes[4].InnerText, ni);
                        da = new DataAccess();
                        spare_in_spare_income offering = new spare_in_spare_income();

                        //[id] - генериурется автоматически
                        //[num]
                        offering.num = 0;

                        //[description]
                        offering.description = "";

                        //[QIn]
                        decimal Q = 0;
                        Q = decimal.Parse(list[i].ChildNodes[3].InnerText, ni);
                        offering.QIn = Q;

                        //[PIn]
                        offering.PIn = P;

                        //[PInBasic]
                        offering.PInBasic = P;

                        //[VatRateID]
                        offering.vat_rate = da.getZeroVatRate();

                        //[Markup]
                        offering.Markup = 0;

                        //[SpareIncomeID] - в зависимости от поля #5
                        string WarehouseMarker = list[i].ChildNodes[5].InnerText;
                        int SpareIncomeID = 61;
                        if (WarehouseMarker.Contains("истина"))
                            SpareIncomeID = 61;
                        else
                            SpareIncomeID = 62;
                        offering.spare_income = da.SpareIncomeGet(SpareIncomeID);

                        //[CurrencyID]
                        offering.CurrencyID = 1;

                        //[S]
                        offering.S = Q * P;

                        //[SBasic]
                        offering.SBasic = Q * P;

                        //[POut]
                        offering.POut = P;

                        //[POutBasic]
                        offering.POutBasic = P;

                        //[QRest]
                        offering.QRest = Q;
                        string mess = "";

                        //===================================================== [SpareID]
                        string SpareCode1C = list[i].ChildNodes[0].InnerText;
                        mess += "1C:[" + SpareCode1C + "] - ";

                        //  search by code1C
                        spare sp = null;
                        sp = da.GetSpare(SpareCode1C);
                        string code = "X";
                        if (sp == null)
                        {
                            mess += "not found! ";

                            // search by spare code
                            code = list[i].ChildNodes[1].InnerText;
                            mess += "CODE:[" + code + "] - ";
                            sp = da.GetSpareByCode(code);
                        }
                        string name = "X";
                        if (sp == null)
                        {
                            mess += "not found! ";

                            // search by spare name
                            name = list[i].ChildNodes[2].InnerText;
                            mess += "NAME:[" + name + "] - ";
                            sp = da.GetSpare(name);
                        }
                        if (sp == null)
                            m1 += SpareCode1C + ", " + code + ", " + name + "\n";
                        else
                            da.InOfferingCreate(offering, sp.id);
                    }
                }
            }
            MessageBox.Show(m1);

            // Закрываем поток
            fs.Close();
            return Message;
        }
开发者ID:bashlykevich,项目名称:Bycar,代码行数:101,代码来源:Office2003XmlTable.cs


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