private string GetInsertScript(VouchersE vouchersE) { string date = $"{vouchersE.VoucherDate.Year}-{vouchersE.VoucherDate.Month}-{vouchersE.VoucherDate.Day}"; string columns = "VouchersID, VoucherNo, VoucherDate, VouchersTypeID, VoucherDescription, VoucherAmount, CreateUser, CompanyID"; string values = $"'{this.YearCT_textEdit.EditValue.ToString().Trim() + vouchersE.VouchersID}', '{vouchersE.VoucherNo}', '{date}', '{vouchersE.VouchersTypeID}', N'{vouchersE.VoucherDescription}', {vouchersE.VoucherAmount}, '{"Admin"}','{vouchersE.CompanyID}'"; return $@"INSERT INTO VouchersPhatTemp({columns}) VALUES({values})"; }
private void SetFilter_VoucherEDetail(VouchersE vouchersE) { string filter = string.Empty; filter += $"[VouchersID] = '{vouchersE.VouchersID}'"; this.VoucherDetail_gridView.ActiveFilterString = filter; }
private void Voucher_gridView_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e) { // if (!IsS35SourceChanged) return; VouchersE vouchersE = Voucher_gridView.GetFocusedRow().CastTo<VouchersE>();//.CastTo<VouchersE>(); if (vouchersE == null) { return; } SetFilter_VoucherEDetail(vouchersE); }