public string GetMSNV() { string[] arrStr = employeeBO.AutoGetMSNV().Split('V'); int i = int.Parse(arrStr[1]); string msnv = ""; int tempWhile = 0; while (tempWhile != 1) { msnv = "NV" + i.ToString("D3"); var check = list.FirstOrDefault(u => u.MSNV == msnv); if (check == null) { tempWhile = 1; } i++; } ; return(msnv); }
public MCEAdd() { InitializeComponent(); employeeBO = employeeBO ?? new EmployeeBO(); msnvBO = employeeBO.AutoGetMSNV(); }