Exemple #1
0
    public static void CreateNewEmploye(T_Employe p_employe)
    {
        CoEco_BDDataContext BD = new CoEco_BDDataContext();
        int?maxID = 0;

        BD.PS_GetMaxIdEmpolye(ref maxID);
        maxID++;
        if (maxID == null)
        {
            maxID = 1;
        }

        p_employe.idEmploye = (int)maxID;

        BD.T_Employe.InsertOnSubmit(p_employe);
        BD.SubmitChanges();
        BD.Dispose();
    }