private void tsbExportToExcel_Click(object sender, EventArgs e) { List <List <PoItemContentAndState> > poItemsListList = new List <List <PoItemContentAndState> >(); for (int i = 0; i < poViewControlList.Count; i++) { poItemsListList.Add(poViewControlList[i].GetPoItemsStateList()); } SoPoExcelHelper.SavePoExcel(poList, poItemsListList); }
private void tsbToExcel_Click(object sender, EventArgs e) { List <List <SoItemsContentAndState> > soItemsListList = new List <List <SoItemsContentAndState> >(); for (int i = 0; i < soViewControlList.Count; i++) { soItemsListList.Add(soViewControlList[i].GetItemsStateList()); } SoPoExcelHelper.SaveSOExcel(soList, soItemsListList); }
private void tsbToExcel_Click(object sender, EventArgs e) { List <List <SoItemsContentAndState> > soItemsListList = new List <List <SoItemsContentAndState> >(); for (int i = 0; i < soViewControlList.Count; i++) { soItemsListList.Add(soViewControlList[i].GetItemsStateList()); } if (UserInfo.Job == JobDescription.PurchasersManager || UserInfo.Job == JobDescription.Purchaser) { foreach (So so in soList) { so.contact = ""; if (UserInfo.Job == JobDescription.Purchaser) { so.customerName = ""; } } } SoPoExcelHelper.SaveSOExcel(soList, soItemsListList); }
private void tsbExportToExcel_Click(object sender, EventArgs e) { List <List <PoItemContentAndState> > poItemsListList = new List <List <PoItemContentAndState> >(); for (int i = 0; i < poViewControlList.Count; i++) { poItemsListList.Add(poViewControlList[i].GetPoItemsStateList()); } //if sales or sales Manager, the vendor and contact can not be seen if (UserInfo.Job == JobDescription.Sales || UserInfo.Job == JobDescription.SalesManager) { foreach (po po in poList) { po.vendorName = ""; po.contact = ""; } } SoPoExcelHelper.SavePoExcel(poList, poItemsListList); }