public int Deposit(Iaccount acobj) { int abc = 0; foreach (Iaccount a in alst) { if (a.Cuid == acobj.Cuid && a.Acid == acobj.Acid) { if ((a.Damnt + acobj.Damnt) >= 0) { if (a.Acs != "INACTIVE") { a.Damnt += acobj.Damnt; abc = a.Damnt; } else { return(-2); } } else { return(-1); } } } return(abc); }
public int AddA(Iaccount obj1) { alst.Add(obj1); return(obj1.Acid); }