public string insertSwitch(int emp, int shift, string type)
    {
        ShiftsEmployee       se         = new ShiftsEmployee();
        int                  S          = se.insertSwitch(emp, shift, type);
        JavaScriptSerializer js         = new JavaScriptSerializer();
        string               jsonString = js.Serialize(S);

        return(jsonString);
    }
Example #2
0
    protected void InsertChange(object sender, EventArgs e)
    {
        ShiftsEmployee se     = new ShiftsEmployee();
        int            emp    = Convert.ToInt32((string)Session["userID"]);
        string         temp   = DropDownList1.SelectedValue;
        int            shift  = Convert.ToInt32(temp.Substring(0, 2));
        string         type   = temp.Substring(2);
        int            numEff = se.insertSwitch(emp, shift, type);

        DropDownList1.Items.Clear();
        DropDownList2.Items.Clear();
        DropDownList3.Items.Clear();
        ShiftEmployee();
        Changes();
    }