All pastes #525304 Raw Edit

Mine

public text v1 · immutable
#525304 ·published 2007-05-31 09:43 UTC
rendered paste body
        private void Save()
        {
            if(txtSum != null)
            {
                user.Notes = txtNotes.Value;            
                rPay.Sum = decimal.Parse(txtSum.Value);
                rPay.UserId = user.id;
                rPay.Date = DateTime.Now;
     
          
            
            if (chkActive.Checked == true)
            {
                user.Active = 1;
            }
            else
            {
                user.Active = 0;
            }

            if (rPay.State() == DataRowState.Detached)
                rPay.Add();
           
            try
            {
                //int i = 0;
                //decimal d = 100 / i;

                manager.Update(domain.Changes(), new string[] { "UserInfo" });
                manager.Update(domain.Changes(), new string[] { "Payments" });

                
                    Response.Redirect("Payments.aspx", true);
                
            }
            catch (Exception ex)
            {
                Page.RegisterStartupScript("start", "<script>window.alert('ok.')</script>");
            }
        }
        }