private void CombinA2(ref ListView oList, string a1) { Guid id = Guid.Empty; if (Guid.TryParse(cboAppendix2.SelectedValue.ToString(), out id)) { var detailList = ProductDim_DetailsEx.GetListByDimensionId(id); foreach (var detail in detailList) { if (!string.IsNullOrEmpty(detail.APPENDIX2)) { CombinA3(ref oList, a1, detail.APPENDIX2); } } } }
private void CombinA3(ref ListView oList, string a1, string a2) { Guid id = Guid.Empty; if (Guid.TryParse(cboAppendix3.SelectedValue.ToString(), out id)) { var detailList = ProductDim_DetailsEx.GetListByDimensionId(id); foreach (var detail in detailList) { if (!string.IsNullOrEmpty(detail.APPENDIX3)) { AddToList(ref oList, a1, a2, detail.APPENDIX3); } } if (detailList.Count == 0) { AddToList(ref oList, a1, a2, string.Empty); } } }
private void InitialFormWithType() { var detailList = ProductDim_DetailsEx.GetListByDimensionId(this.CombinId); foreach (var detail in detailList) { if (detail.APPENDIX1.Length > 0 && detail.APPENDIX2.Length == 0 && detail.APPENDIX3.Length == 0) { this.AppendixType = ProductHelper.Appendix.Appendix1; } else if (detail.APPENDIX1.Length == 0 && detail.APPENDIX2.Length > 0 && detail.APPENDIX3.Length == 0) { this.AppendixType = ProductHelper.Appendix.Appendix2; } else if (detail.APPENDIX1.Length == 0 && detail.APPENDIX2.Length == 0 && detail.APPENDIX3.Length > 0) { this.AppendixType = ProductHelper.Appendix.Appendix3; } else { this.AppendixType = ProductHelper.Appendix.None; } } }