If Val(dr("USE_Amount").ToString) >= Val(txtprice.Text) Then dr.Close() msg = "Ref No : " + ref_no + ". Your mobile no : " + txt_mob.Text + " Talk time : " + txttalk.Text + " Validity : " + txtval.Text cmd = New SqlCommand("update TBL_Banking set USE_Amount=USE_Amount-" + txtprice.Text + " where USE_creditcard='" + txt_credit.Text + "' and USE_pin='" + txt_pwd.Text + "' and USE_uname='" + HiddenField1.Value + "' and USE_Bank='" + ddl_bank.SelectedItem.Text + "'", con) cmd.ExecuteNonQuery() cmd = New SqlCommand("insert into TBL_Recharge values('" + Now.ToString + "','" + txt_mob.Text + "','" + dvendor.SelectedItem.Text + "','" + txt_credit.Text + "','" + ddl_bank.SelectedItem.Text + "'," + txtprice.Text + ",'" + HiddenField1.Value + "','" + msg + "')", con) cmd.ExecuteNonQuery() lbl_msg.Text = "Recharge sucessfully"
MsgBox("Recharge Message Successfully send to mobile no : " + txt_mob.Text)
txt_mob.Text = ""
txt_credit.Text = ""
txt_pwd.Text = ""
txt_pwd.Text = ""
Else
dr.Close()
lbl_msg.Text = "Unable to Recharge..Invalid Balance"
End If
Aucun commentaire:
Enregistrer un commentaire