private void btnSearch_Click(object sender, EventArgs e) { using (MerkFinanceEntities context = new MerkFinanceEntities()) result = context.GetInvoiceForAddmission(Convert.ToDateTime(InvoiceCreationDateStart).Date, Convert.ToDateTime(InvoiceCreationDateEnd).Date, (int?)InvoiceType, true, true, false, (bool?)InvoiceIsPaymentEnough, (int?)DoctorID, PatientID != null ? Convert.ToInt32(PatientID) : (int?)null).ToList(); gridControl1.DataSource = result; gridControl1.RefreshDataSource(); }
public AlreadyCreatedInvoicesActions_UC() { InitializeComponent(); CommonViewsActions.SetupSyle(this); CommonViewsActions.SetupGridControl(gridControl1, Resources.LocalizedRes.grd_ReadyInvoicesForActions, false); CommonViewsActions.FillGridlookupEdit(lkeDoctor, Doctor_cu.ItemsList); InvoiceCreationDateStart = DateTime.Now; InvoiceCreationDateEnd = DateTime.Now; using (MerkFinanceEntities context = new MerkFinanceEntities()) result = context.GetInvoiceForAddmission(Convert.ToDateTime(InvoiceCreationDateStart), Convert.ToDateTime(InvoiceCreationDateEnd), (int?)InvoiceType, true, true, false, (bool?)InvoiceIsPaymentEnough, (int?)DoctorID, (int?)PatientID).ToList(); gridControl1.DataSource = result; }