Ejemplo n.º 1
0
    /// <summary>
    /// Shows how to Insert or Create a New Record
    /// </summary>
    private void Insert()
    {
        // first instantiate a new RoleMaster
        RoleMaster objRoleMaster = new RoleMaster();

        // assign values you want inserted
        objRoleMaster.RoleDescription = "Administrator";
        objRoleMaster.CreatedOn       = DateTime.Now;
        objRoleMaster.CreatedBy       = "System";
        objRoleMaster.ModifiedOn      = DateTime.Now;
        objRoleMaster.ModifiedBy      = "abc";

        // finally, insert a new record
        // the insert method returns the newly created primary key
        int newlyCreatedPrimaryKey = objRoleMaster.Insert();
    }