protected void btnLockDate_Click(object sender, EventArgs e) { var lockingTransfer = LockingTransfer; if (lockingTransfer == null) { lockingTransfer = new LockingTransfer(); } lockingTransfer.Date = Date; TransferRequestByDateBLL.LockingTransferSaveOrUpdate(lockingTransfer); ShowSuccess("Locked date successfully"); Response.Redirect(Request.RawUrl); }