Exemple #1
0
        public static void UpdateEmployee(ASP_ex5.ResourceObj emp)
        {
            ResourceWriter rsxw = new ResourceWriter(path);
            for (int i = 0; i < l.Count; i++)
            {
                if (l[i].key == emp.key)
                {
                    l[i].comment = emp.comment;
                    l[i].key = emp.key;
                    l[i].value = emp.value;

                }
                rsxw.AddResource("obj" + i.ToString(), l[i]);
            }
            rsxw.Close();
        }
Exemple #2
0
        public static void DeleteEmployee(ASP_ex5.ResourceObj emp)
        {
            ResourceWriter rsxw = new ResourceWriter(path);
            for (int i = 0; i < l.Count; i++)
            {
                if (l[i].key != emp.key)
                {
                    rsxw.AddResource("obj" + i.ToString(), l[i]);
                }
            }
            rsxw.Close();

        }