public static Nullable <DateTime> GetNearestProductExpiryDate(Nullable <int> ProductID) { Nullable <DateTime> NearestExpiryDate = new Nullable <DateTime>(); NearestExpiryDate = ProductExpiryDatesOP.GetNearestProductExpiryDate(ProductID).PRODUCT_EXPIRY_DATE; return(NearestExpiryDate); }
private void btnAddExpiryDate_Click(object sender, EventArgs e) { ProductExpiryDates PExp = new ProductExpiryDates(); PExp.PRODUCT_ID = P.PRODUCT_ID; PExp.PRODUCT_EXPIRY_DATE = dtppExpiryDate.Value.Date; ProductExpiryDatesOP.InsertProductExpiryDate(PExp); this.pRODUCT_EXPIRY_DATESTableAdapter.Fill(this.dsProductExpiryDates.PRODUCT_EXPIRY_DATES, (int)P.PRODUCT_ID); }