/// <summary> /// 初始化行业资讯 /// </summary> private void InitRpInfo() { var list = EyouSoft.BLL.NewsStructure.BPeerNews.CreateInstance().GetGetPeerNewsList(5, new MQueryPeerNews { IsShowHideNew = false, OrderIndex = 4 }); if (list != null && list.Count > 0) { RpInfos.DataSource = list; RpInfos.DataBind(); } list = null; }
protected void Detail_InfoBind(object sender, EventArgs e) { DataSet dt = new DataSet(); string SKC = this.TextBox_skc.Text.ToString().Trim(); string Size = this.TextBox_Size.Text.ToString().Trim(); if ((Size == "" && SKC == "") || (Size != "" && SKC == "")) { MsgShow("提示", "请输入款式颜色编号"); } else { if (Size == "") { Size = " "; } if (SKC != "") { if (GetCount(SKC) == "0") //drp中检索 款式是否存在 { MsgShow("提示", "输入的款式颜色编号不存在"); } else { int count = 0; string numBer = SKC.Substring(5, 1);//判断款式编号第六位 string[] numBerCompare = new string[8] { "1", "2", "3", "4", "5", "6", "7", "8" }; foreach (string a in numBerCompare) { if (numBer == a) { count++; } } if (count != 0) //判断款式编号第六位 { dt = GetList("sP_SKC_WUKC", SKC, Size, "dlerp"); //ERP中检索 if (dt.Tables[0].Rows.Count == 0) // 判断是否有明细 { //没有明细再去eperp找找 dt = GetList("sP_SKC_WUKC", SKC, Size, "eperp"); } if (dt.Tables[0].Rows.Count == 0) // 判断是否有明细 { MsgShow("提示", "此款式客定需要确认,请与公司相关人员联系!"); } else { int count2 = 0; for (int i = 0; i < dt.Tables[0].Rows.Count; i++) { if (dt.Tables[0].Rows[i][6].ToString() == "面料") { count2++; } } if (count2 == 0) //没有面料 { MsgShow("提示", "此款式客定需要确认,请与公司相关人员联系!"); } else { int count3 = 0; //判断可造件数是否都为0 for (int k = 0; k < dt.Tables[0].Rows.Count; k++) { if (dt.Tables[0].Rows[k][13].ToString() == "0") { count3++; } } if (count3 == 0) // 可造件数都不为0 { MsgShow("提示", "此款式满足定制条件,可以定制!"); } else // 可造件数部分为0 { MsgShow("提示", "此款式客定需要确认,请与公司相关人员联系!"); } RpInfos.DataSource = dt; RpInfos.DataBind(); } } } else { MsgShow("提示", "此款式客定需要确认,请与公司相关人员联系!"); } } } } }