protected void InsertButton_Click(object sender, EventArgs e)
        {
            //fixed deposit doesnt allow part withdrawal. The whole amount should be withdrawn
            using (FinanceManagerDataContext db = new FinanceManagerDataContext())
            {
                MemberWithdrawal _memberWithdrawal = new MemberWithdrawal()
                {
                    CreatedBy = HttpContext.Current.User.Identity.Name,
                    DateCreated = DateTime.Now,
                    IsDeleted = false,
                    WithdrawalIssuedByUserName = User.Identity.Name,
                    InvestmentID = Convert.ToInt32(Request.QueryString["invId"]),
                    Narration = "Fixed Deposit withdrawal"
                    ,
                    WithdrawalAmount = Convert.ToDecimal(WithdrawalAmountTextBox.Text),
                    WithdrawnBy = WithdrawalAmountTextBox.Text
                };

                db.MemberWithdrawals.InsertOnSubmit(_memberWithdrawal);
                db.SubmitChanges();

                //audit
                Utils.logAction("Insert", _memberWithdrawal);

                Response.Redirect("FixedDepositInvestmentStatement.aspx?invId=" + Request.QueryString["invId"] + "&gid=" + Request.QueryString["gid"]);
            }
        }
 partial void DeleteMemberWithdrawal(MemberWithdrawal instance);
 partial void UpdateMemberWithdrawal(MemberWithdrawal instance);
 partial void InsertMemberWithdrawal(MemberWithdrawal instance);
		private void detach_MemberWithdrawals(MemberWithdrawal entity)
		{
			this.SendPropertyChanging();
			entity.Investment = null;
		}
		private void attach_MemberWithdrawals(MemberWithdrawal entity)
		{
			this.SendPropertyChanging();
			entity.Member = this;
		}