.2.21, 2.22:
. 2.21.
. 2.22
:
1. NetTrans .
2. , , , , , . .
3. ;
I.
.
Microsoft SQL Server , .
, :
− ;
− /;
− ;
:
SqlCommand cmd = sqlconnect.CreateCommand();
SqlConnection sqlconnect = new SqlConnection(@"Data Source=(GAZEBO-);Integrated Security=True;" + "Initial Catalog=123");
, () , .
/ :
:
cmd.CommandText = "insert into Add_ticket_TP (, [ ], ) values ('" + TextBox1.Text + "','" + TextBox2.Text + "','" + TextBox3.Text + "')";
:
, ;
, ;
;
:
cmd.CommandText = "update Add_ticket_TP (=' ',='' where =#)";
:
, ;
= , ;
;
;
:
GridView1.DataBind();
II.
, , , , .
MS SQL Server , .
, :
− ;
− ;
− .
|
|
:
SqlConnection sqlconnect = new SqlConnection(@"Data Source=(GAZEBO-);Integrated Security=True;" + "Initial Catalog=123");
, () , .
:
cmd.CommandText=select*from users where (id=id);
GridView1.DataBind();
:
, . * - ;
, ;
;
.
, .
<table>
<tr>
<td class="auto-style1">./. </td>
<td>
<asp:RadioButton ID="RadioButton2" runat="server" Text="." TextAlign="Left" OnCheckedChanged="RadioButton2_CheckedChanged" Width="100" /></td>
</tr>
<tr>
<td class="auto-style1"><asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1" ErrorMessage=" " Display="Dynamic">*</asp:RequiredFieldValidator>
</td>
<td>
<asp:TextBox ID="TextBox1" runat="server" Width="794px"></asp:TextBox>
</td>
</tr>
<tr>
<td class="auto-style1"> <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TextBox2" ErrorMessage=" " Display="Dynamic">*</asp:RequiredFieldValidator>
</td>
<td>
<asp:TextBox ID="TextBox2" runat="server" Width="797px"></asp:TextBox>
</td>
</tr>
<tr>
<td class="auto-style1"> <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="TextBox3" ErrorMessage=" " Display="Dynamic">*</asp:RequiredFieldValidator>
</td>
<td>
<asp:TextBox ID="TextBox3" runat="server" Height="228px" Width="796px"></asp:TextBox>
</td>
</tr>
<tr>
<td class="auto-style1"> </td>
<td>
<asp:RadioButton ID="RadioButton3" runat="server" Text="" Checked="True" TextAlign="Left" Width="100" OnCheckedChanged="RadioButton3_CheckedChanged"/>
<asp:RadioButton ID="RadioButton4" runat="server" Text="" TextAlign="Left" Width="150"/>
<asp:RadioButton ID="RadioButton5" runat="server" Text="" TextAlign="Left" Width="150"/>
|
|
<asp:RadioButton ID="RadioButton6" runat="server" Text="" TextAlign="Left" Width="150"/>
<asp:RadioButton ID="RadioButton7" runat="server" Text=" " TextAlign="Left" Width="150"/>
</td>
</tr>
<tr>
<td class="auto-style1" colspan="2" >
<asp:Button ID="Button1" runat="server" Text="" OnClick="Button1_Click" />
</td>
</tr>
<tr>
<td class="auto-style1">
</td>
</tr> </table>
<mailSettings>
<smtp from="[email protected]">
<network host="smtp.mail.ru" userName="[email protected]" password=""/>
</smtp>
</mailSettings>
System.Threading.Tasks.Task.Run(new Action(() =>
{
System.Net.Mail.MailMessage mm = new System.Net.Mail.MailMessage();
foreach (Worker worker in Workers)
{
if (worker == null) continue;
if (string.IsNullOrEmpty(worker.email)) continue;
mm.To.Add(worker.email);
}
if (mm.To.Count == 0) return;
// .
mm.Subject = " NetTrans";
mm.Body = string.Format(" : {0}", InnerNumber);
new System.Net.Mail.SmtpClient().Send(mm);
}));
new EventLogCollection().Create(0, HttpContext.Current.Request.UserHostAddress);
, , , Windows .
Visual Studio Administer Website.