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


C# MasterDataBLL.GetCustomerChanneByCode方法代码示例

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


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

示例1: ImportTxtData


//.........这里部分代码省略.........
                            string[] Customer = Content[i].Split('\t');
                            if (Customer.Length != 14) {
                                logbll.InsertImportLogDetail(logId, i + 1, "Customer数据COUNT错误!");
                                FailCount += 1;
                                continue;
                            }
                            //Customer = Content[i].Replace("\"", "").Split('\t');
                            Boolean active = false;
                            if (Customer[12].ToUpper().IndexOf("CM") >= 0) {
                                active = true;
                            } else if (Customer[12].ToUpper().IndexOf("CZ") >= 0) {
                                active = false;
                            } else {
                                logbll.InsertImportLogDetail(logId, i + 1, "active数据错误!");
                                FailCount += 1;
                                continue;
                            }
                            int CustomerTypeID = 0;
                            int CustomerChannelID = 0;
                            int ProvinceID = 0;
                            int CustomerRegionID = 0;
                            //查询ID

                            MasterData.CustomerTypeDataTable CustomerType = masterdatabll.GetCustomerTypeByName(Customer[5]);
                            if (CustomerType.Rows.Count > 0) {
                                CustomerTypeID = CustomerType[0].CustomerTypeID;
                            } else {

                                logbll.InsertImportLogDetail(logId, i + 1, "未找到Customer Type!");
                                FailCount += 1;
                                continue;
                            }

                            MasterData.CustomerChannelDataTable CustomerChannel = masterdatabll.GetCustomerChanneByCode(Customer[6]);
                            if (CustomerChannel.Rows.Count > 0) {
                                CustomerChannelID = CustomerChannel[0].CustomerChannelID;
                            } else {
                                logbll.InsertImportLogDetail(logId, i + 1, "未找到Customer Channel!");
                                FailCount += 1;
                                continue;
                            }

                            MasterData.ProvinceDataTable Province = masterdatabll.GetProvinceByName(Customer[8]);
                            if (Province.Rows.Count > 0) {
                                ProvinceID = Province[0].ProvinceID;
                            } else {
                                logbll.InsertImportLogDetail(logId, i + 1, "未找到Province!");
                                FailCount += 1;
                                continue;
                            }

                            MasterData.CustomerRegionDataTable CustomerRegion = masterdatabll.GetCustomerRegionByName(Customer[9]);
                            if (CustomerRegion.Rows.Count > 0)
                                CustomerRegionID = CustomerRegion[0].CustomerRegionID;
                            else {
                                logbll.InsertImportLogDetail(logId, i + 1, "未找到Customer Region!");
                                FailCount += 1;
                                continue;
                            }
                            MasterData.CustomerDataTable dtCustomer = masterdatabll.GetCustomerByNo(Customer[0]);
                            if (dtCustomer.Rows.Count > 0) {
                                //Update
                                masterdatabll.UpdateCustomer(dtCustomer[0].CustomerID, Customer[0], Customer[1], Customer[2], Customer[3], Customer[4], Customer[4],
                                    CustomerTypeID, CustomerChannelID, Customer[7], ProvinceID, CustomerRegionID, Customer[10], Customer[11],
                                    "", "", "", "", active, Customer[13]);
                            } else if (active)//未找到数据  并且active 是ture的才做插入
开发者ID:hijoy,项目名称:CPL_ERS,代码行数:67,代码来源:Program.cs


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