private List <PurchaseOrder> GetPOList() { PurchaseOrderDAL dal = new PurchaseOrderDAL(); var pos = dal.SearchPO(txtPurchaseId.Text, Utility.GetSelectedText(ddlPurchaseStatus), Utility.GetSelectedText(ddlOrdMan), Utility.GetSelectedText(ddlMachMan), Utility.GetSelectedText(ddlPurchaseMan), Utility.GetSelectedText(ddlApplyPurchaseMan), Utility.GetSelectedText(ddlMachTableMan), Utility.GetSelectedText(ddlApproveMan), !string.IsNullOrEmpty(txtBeginDate.Text) ? DateTime.Parse(txtBeginDate.Text) : DateTime.MinValue, !string.IsNullOrEmpty(txtEndDate.Text) ? DateTime.Parse(txtEndDate.Text) : DateTime.MaxValue); return(pos.ToList()); }