protected void Button1_Click(object sender, EventArgs e)
    {
        int receptionistId = Convert.ToInt32(Session["receptionistId"].ToString());
        string phoneNo = TextBox5.Text;
        string callDate = DateTime.ParseExact(TextBox1.Text, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture).ToString();
        string callTime = TextBox2.Text;
        string callerName = TextBox3.Text;
        int messageFor = Convert.ToInt32(DropDownList1.SelectedValue);
        string message = TextBox4.Text;

        AddPhoneCallMessageBL objAddPhoneCallMessageBL = new AddPhoneCallMessageBL();
        objAddPhoneCallMessageBL.AddPhoneCallMessage(receptionistId, phoneNo, callDate, callTime, callerName, messageFor, message);
        Label6.Text = "Phone Call Record Saved";

        TextBox1.Text = "";
        TextBox2.Text = "";
        TextBox3.Text = "";
        TextBox4.Text = "";
        TextBox5.Text = "";
        DropDownList1.SelectedIndex = 0;
    }
コード例 #2
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        int    receptionistId = Convert.ToInt32(Session["receptionistId"].ToString());
        string phoneNo        = TextBox5.Text;
        string callDate       = DateTime.ParseExact(TextBox1.Text, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture).ToString();
        string callTime       = TextBox2.Text;
        string callerName     = TextBox3.Text;
        int    messageFor     = Convert.ToInt32(DropDownList1.SelectedValue);
        string message        = TextBox4.Text;

        AddPhoneCallMessageBL objAddPhoneCallMessageBL = new AddPhoneCallMessageBL();

        objAddPhoneCallMessageBL.AddPhoneCallMessage(receptionistId, phoneNo, callDate, callTime, callerName, messageFor, message);
        Label6.Text = "Phone Call Record Saved";

        TextBox1.Text = "";
        TextBox2.Text = "";
        TextBox3.Text = "";
        TextBox4.Text = "";
        TextBox5.Text = "";
        DropDownList1.SelectedIndex = 0;
    }