I am working on adding some fields to the cst_account.aspx.cs page. These fields need to be updated. There are not extentiondata, so that method wont work.
They display ok with this code:
writer.Write(" <tr>");
writer.Write(" <td width=\"25%\" align=\"right\" valign=\"middle\">Membership ID</td>");
writer.Write(" <td width=\"75%\" align=\"left\" valign=\"middle\">");
writer.Write(" <input type=\"text\" name=\"NewMemberID\" size=\"14\" maxlength=\"20\" value=\"" + DB.GetSqlS("SELECT membershipid AS S FROM Customer where CustomerID=" + TargetCustomer.CustomerID.ToString()) + "\">");
writer.Write(" </td>");
writer.Write(" </tr>");
writer.Write(" <tr>");
writer.Write(" <td width=\"25%\" align=\"right\" valign=\"middle\">Membership Type</td>");
writer.Write(" <td width=\"75%\" align=\"left\" valign=\"middle\">");
writer.Write(" <input type=\"text\" name=\"NewMemberType\" size=\"14\" maxlength=\"20\" value=\"" + DB.GetSqlS("SELECT membershiptype AS S FROM Customer where CustomerID=" + TargetCustomer.CustomerID.ToString()) + "\">");
writer.Write(" </td>");
writer.Write(" </tr>");
I want to run the following code, from somewhere. I just have not found where or how to make it work. I tried to put it in the cst_account_process.aspx.cs and in the same page. I am not sure i am referring to the input fields correctly. All sql backend fields are string.
String sql = "UPDATE Customer SET " +
"MembershipID = " + DB.SQuote(NewMemberID) + ", " +
"MembershipType = " + DB.SQuote(NewMemberType) +
" WHERE CustomerID = " + ThisCustomer.CustomerID.ToString();
DB.ExecuteSQL(sql);
Any ideas?