protected void InsertIntoLevel3(int slaid)
    {
        string varemail = "";

        if (radio1Level3.Checked == true)
        {
            objLevel3.After  = false;
            objLevel3.Before = true;
        }
        else
        {
            objLevel3.After  = true;
            objLevel3.Before = false;
        }
        objLevel3.Slaid = slaid;
        for (int i = listLevel3.Items.Count - 1; i >= 0; i--)
        {
            if (listLevel3.Items[i].Selected == true)
            {
                varemail = varemail + listLevel3.Items[i].Text + ",";
            }
        }
        objLevel3.Emailid = varemail;
        objLevel3.Days    = Convert.ToInt16(txtDaysLevel2.Text);
        objLevel3.Hours   = Convert.ToInt16(drpHoursLevel3.SelectedValue);
        objLevel3.Min     = Convert.ToInt16(drpMinLevel3.SelectedValue);

        objLevel3.Insert();
    }
    protected void UpdateLevel3Escalate(int Slaid)
    {
        EscalateLevel3 obj      = new EscalateLevel3();
        string         varemail = "";

        if (radio1Level3.Checked == true)
        {
            objLevel3.After  = false;
            objLevel3.Before = true;
        }
        else
        {
            objLevel3.After  = true;
            objLevel3.Before = false;
        }
        objLevel3.Slaid = Slaid;
        for (int i = listLevel3.Items.Count - 1; i >= 0; i--)
        {
            if (listLevel3.Items[i].Selected == true)
            {
                varemail = varemail + listLevel3.Items[i].Text + ",";
            }
        }
        objLevel3.Days  = Convert.ToInt32(txtDaysLevel3.Text);
        objLevel3.Hours = Convert.ToInt32(drpHoursLevel3.SelectedValue);
        objLevel3.Min   = Convert.ToInt32(drpMinLevel3.SelectedValue);
        obj             = obj.Get_By_Slaid(Slaid);
        if (obj.Slaid != 0)
        {
            if (varemail == "")
            {
                varemail = obj.Emailid;
            }
            objLevel3.Emailid  = varemail;
            objLevel3.Level3id = obj.Level3id;
            objLevel3.Update();
        }
        else
        {
            objLevel3.Emailid = varemail;
            objLevel3.Insert();
        }
    }