public void InsertItem(WITHDRAW obj) { defaultDB.ExecuteNonQuery("sp_WITHDRAW_Insert" , obj.CodeId , obj.Amount , obj.Date_Create , obj.Wallet ); }
protected void lbkBtnConfirm_Click(object sender, EventArgs e) { LinkButton btn = (LinkButton)(sender); int ID = int.Parse(btn.CommandArgument); WITHDRAW objWdr = Singleton <WITHDRAW_BC> .Inst.SelectItem(ID); string CodeID = objWdr.CodeId; Decimal Amount = decimal.Parse(objWdr.Amount.ToString()); Singleton <WITHDRAW_BC> .Inst.UpdateTranSactionWithdraw(ID, CodeID, Amount); TNotify.Toastr.Warning(string.Format("Confirmed withdraw {0} BTC for user {1} !", objWdr.Amount, objWdr.username), "Completed", TNotify.NotifyPositions.toast_top_full_width, true); Response.Redirect(Request.Path); }
protected void btnWithDraw_Click(object sender, EventArgs e) { try { decimal withdrawAmount = 0; //check dieu kien if (txtAmount.Text != string.Empty) { withdrawAmount = Convert.ToDecimal(txtAmount.Text); if (withdrawAmount > Convert.ToDecimal(lblCWalletAmt.Text)) { TNotify.Toastr.Warning("Not enought BTC to withdraw !", "Completed", TNotify.NotifyPositions.toast_top_full_width, true); return; } } else { TNotify.Toastr.Warning("Please input amount withdraw !", "Completed", TNotify.NotifyPositions.toast_top_full_width, true); return; } if (txtPin2.Text != Singleton <BITCurrentSession> .Inst.SessionMember.Password_PIN) { TNotify.Toastr.Warning("Wrong transaction password", "Completed", TNotify.NotifyPositions.toast_top_full_width, true); return; } ////insert into withdraw WITHDRAW objWD = new WITHDRAW(); objWD.CodeId = Singleton <BITCurrentSession> .Inst.SessionMember.CodeId; objWD.Date_Create = DateTime.Now; objWD.Amount = withdrawAmount; objWD.Status = 0; objWD.TransactionId = string.Empty; objWD.Wallet = Singleton <BITCurrentSession> .Inst.SessionMember.Wallet; //insert Singleton <WITHDRAW_BC> .Inst.InsertItem(objWD); TNotify.Toastr.Success("Withdraw Completed ", "Completed", TNotify.NotifyPositions.toast_top_full_width, true); Response.Redirect("../Admin/Withdraw.aspx"); } catch { } }
public WITHDRAW SelectItemByCodeId(WITHDRAW code_id) { return(ctl.SelectItemByCodeId(code_id)); }
public void UpdateItem(WITHDRAW obj) { ctl.UpdateItem(obj); }
public void InsertItem(WITHDRAW obj) { ctl.InsertItem(obj); }
public void UpdateItem(WITHDRAW obj) { defaultDB.ExecuteNonQuery("sp_RECEIVE_Update" , obj.ID, obj.CodeId, Decimal.Parse(obj.Amount.ToString()), obj.Date_Create, obj.TransactionId, obj.Status, obj.Wallet); }
public WITHDRAW SelectItemByCodeId(WITHDRAW obj) { return(defaultDB.ExecuteSprocAccessor <WITHDRAW>("sp_RECEIVE_SelectItemByCodeId" , obj.Amount, obj.CodeId, obj.Date_Create).FirstOrDefault()); }