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


C# VDMS类代码示例

本文整理汇总了C#中VDMS的典型用法代码示例。如果您正苦于以下问题:C# VDMS类的具体用法?C# VDMS怎么用?C# VDMS使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: ImportExcelData

        public static void ImportExcelData(Stream excel, VDMS.VDMSSetting.SettingData.WarrantySetting setting)
        {
            IExcelDataReader spreadsheet = ExcelReaderFactory.CreateBinaryReader(excel);

            var startRow = setting.StartRow;
            var dateFormat = setting.DateFormat;
            var partCodeCol = setting.PartCode;
            var partNameVNCol = setting.VietnameseName;
            var partNameENCol = setting.EnglishName;
            var motorCodeCol = setting.MotorCode;
            var warrantyTimeCol = setting.WarrantyTime;
            var warrantyLengthCol = setting.WarrantyLength;
            var startDateCol = setting.StartDate;
            var endDateCol = setting.EndDate;

            var rows = spreadsheet.AsDataSet().Tables[0].AsEnumerable();
            var query = from r in rows
                        select new
                        {
                            PartCode = partCodeCol == 0 || partCodeCol > r.ItemArray.Count() ? string.Empty : r.Field<string>(partCodeCol - 1),
                            PartNameVN = partNameVNCol == 0 || partNameVNCol > r.ItemArray.Count() ? string.Empty : r.Field<string>(partNameVNCol - 1),
                            PartNameEN = partNameENCol == 0 || partNameENCol > r.ItemArray.Count() ? string.Empty : r.Field<string>(partNameENCol - 1),
                            MotorCode = motorCodeCol == 0 || motorCodeCol > r.ItemArray.Count() ? string.Empty : r.Field<string>(motorCodeCol - 1),
                            WarrantyTime = warrantyTimeCol == 0 || warrantyTimeCol > r.ItemArray.Count() ? string.Empty : r.Field<string>(warrantyTimeCol - 1),
                            WarrantyLength = warrantyLengthCol == 0 || warrantyLengthCol > r.ItemArray.Count() ? string.Empty : r.Field<string>(warrantyLengthCol - 1),
                            StartDate = startDateCol == 0 || startDateCol > r.ItemArray.Count() ? string.Empty : r.Field<string>(startDateCol - 1),
                            EndDate = endDateCol == 0 || endDateCol > r.ItemArray.Count() ? string.Empty : r.Field<string>(endDateCol - 1),
                        };
            var data = query.Skip(startRow - 1).TakeWhile(v => !string.IsNullOrEmpty(v.PartCode));

            foreach (var item in data)
            {
                long temp;
                int tempInt;

                var newItem = new WarrantyCondition();

                newItem.PartCode = item.PartCode.Trim().ToUpper();
                newItem.PartNameVN = item.PartNameVN;
                newItem.PartNameEN = item.PartNameEN;
                newItem.MotorCode = item.MotorCode;
                newItem.WarrantyLength = long.TryParse(item.WarrantyLength, out temp) ? temp : 0;
                newItem.WarrantyTime = int.TryParse(item.WarrantyTime, out tempInt) ? tempInt : 0;
                newItem.StartDate = DataFormat.DateFromExcel(item.StartDate, dateFormat);
                newItem.StopDate = DataFormat.DateFromExcel(item.EndDate, dateFormat);
                newItem.SessionID = HttpContext.Current.Session.SessionID;

                _importingItems.Add(newItem);
            }
        }
开发者ID:thaond,项目名称:vdms-sym-project,代码行数:50,代码来源:WarrantyConditionDAO.cs

示例2: UpdateReceiveHeader

partial         void UpdateReceiveHeader(VDMS.II.Entity.ReceiveHeader instance);
开发者ID:thaond,项目名称:vdms-sym-project,代码行数:1,代码来源:PartDataContext.cs

示例3: DeleteBonusTransaction

 partial void DeleteBonusTransaction(VDMS.Bonus.Entity.BonusTransaction instance);
开发者ID:thaond,项目名称:vdms-sym-project,代码行数:1,代码来源:BonusDataContext.Designer.cs

示例4: DeleteOrderHeader

 partial void DeleteOrderHeader(VDMS.Bonus.Entity.OrderHeader instance);
开发者ID:thaond,项目名称:vdms-sym-project,代码行数:1,代码来源:BonusDataContext.Designer.cs

示例5: DeleteBonus

 partial void DeleteBonus(VDMS.Bonus.Entity.Bonus instance);
开发者ID:thaond,项目名称:vdms-sym-project,代码行数:1,代码来源:BonusDataContext.Designer.cs

示例6: InsertBonus

 partial void InsertBonus(VDMS.Bonus.Entity.Bonus instance);
开发者ID:thaond,项目名称:vdms-sym-project,代码行数:1,代码来源:BonusDataContext.Designer.cs

示例7: InsertBonusPlanDetail

 partial void InsertBonusPlanDetail(VDMS.Bonus.Entity.BonusPlanDetail instance);
开发者ID:thaond,项目名称:vdms-sym-project,代码行数:1,代码来源:BonusDataContext.Designer.cs

示例8: UpdateBonusSource

 partial void UpdateBonusSource(VDMS.Bonus.Entity.BonusSource instance);
开发者ID:thaond,项目名称:vdms-sym-project,代码行数:1,代码来源:BonusDataContext.Designer.cs

示例9: UpdateV2PPartReplacement

partial         void UpdateV2PPartReplacement(VDMS.II.Entity.V2PPartReplacement instance);
开发者ID:thaond,项目名称:vdms-sym-project,代码行数:1,代码来源:PartDataContext.cs

示例10: UpdateTransferHeader

partial         void UpdateTransferHeader(VDMS.II.Entity.TransferHeader instance);
开发者ID:thaond,项目名称:vdms-sym-project,代码行数:1,代码来源:PartDataContext.cs

示例11: UpdateTransferDetail

partial         void UpdateTransferDetail(VDMS.II.Entity.TransferDetail instance);
开发者ID:thaond,项目名称:vdms-sym-project,代码行数:1,代码来源:PartDataContext.cs

示例12: UpdateTransactionHistory

partial         void UpdateTransactionHistory(VDMS.II.Entity.TransactionHistory instance);
开发者ID:thaond,项目名称:vdms-sym-project,代码行数:1,代码来源:PartDataContext.cs

示例13: UpdateSystemData

partial         void UpdateSystemData(VDMS.II.Entity.SystemData instance);
开发者ID:thaond,项目名称:vdms-sym-project,代码行数:1,代码来源:PartDataContext.cs

示例14: UpdateSalesHeader

partial         void UpdateSalesHeader(VDMS.II.Entity.SalesHeader instance);
开发者ID:thaond,项目名称:vdms-sym-project,代码行数:1,代码来源:PartDataContext.cs

示例15: UpdateSalesDetail

partial         void UpdateSalesDetail(VDMS.II.Entity.SalesDetail instance);
开发者ID:thaond,项目名称:vdms-sym-project,代码行数:1,代码来源:PartDataContext.cs


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