public void Divide() { string err = ValidateAllList4Divide(); if (!string.IsNullOrEmpty(err)) { throw new Exception(err); } List <Pack> packList = DINInList.Select(r => PackBLL.Get4Extract(r, ProductCodeInList.FirstOrDefault())).ToList(); foreach (Pack item in packList) { foreach (var item1 in DivisionList) { Divide(item.ID, item1.Ext, item1.Volume); } } }
public void Extract() { string err = ValidateAllList(); if (!string.IsNullOrEmpty(err)) { throw new Exception(err); } List <Pack> packList = DINInList.Select(r => PackBLL.Get4Extract(r, ProductCodeInList.FirstOrDefault())).ToList(); foreach (Pack item in packList) { foreach (string code in ProductCodeOutList) { //TODO: display all err pack. Extract(item.ID, code); } } }
protected void LinqDataSourceProductIn_Selecting(object sender, LinqDataSourceSelectEventArgs e) { RedBloodDataContext db = new RedBloodDataContext(); string productCode = ProductCodeInList.FirstOrDefault(); if (string.IsNullOrEmpty(productCode)) { e.Cancel = true; } else { string productCodeShort = productCode.Substring(0, productCode.Length - 2); e.Result = db.Products.Where(r => r.Code.Contains(productCodeShort)).Select(r => new { Code = productCode, r.Description }); } }