private void SendData() { for (int i = 0; i < 10; i++) { var container = Master.FindControl("Body"); string[] input = new string[5]; //--Var for (int i2 = 0; i2 <= 4; i2++) //--Var { string tbName = "tbEdit" + i.ToString() + i2.ToString(); var txtBox = container.FindControl(tbName); switch (i2) { case 0: if (String.IsNullOrWhiteSpace(((TextBox)txtBox).Text.ToString())) { goto track1; } else { input[i2] = _business.BeginUpperCase((((TextBox)txtBox).Text.ToString())); } break; case 1: if (String.IsNullOrWhiteSpace(((TextBox)txtBox).Text.ToString())) { input[i2] = ""; } else { input[i2] = (((TextBox)txtBox).Text.ToString()); } break; case 2: if (String.IsNullOrWhiteSpace(((TextBox)txtBox).Text.ToString())) { input[i2] = ""; } else { if (_business.IsValidEmail(((TextBox)txtBox).Text.ToString())) { input[i2] = (((TextBox)txtBox).Text.ToString()); } else { //error--------------------------------------- input[i2] = "error invalid email"; } } break; case 3: if (String.IsNullOrWhiteSpace(((TextBox)txtBox).Text.ToString())) { input[i2] = ""; } else { if (_business.IsValidPhone(((TextBox)txtBox).Text.ToString())) { input[i2] = (((TextBox)txtBox).Text.ToString()); } else { //error--------------------------------------- input[i2] = "error invalid phone"; } } break; case 4: if (String.IsNullOrWhiteSpace(((TextBox)txtBox).Text.ToString())) { input[i2] = ""; } else { if (_business.IsValidPhone(((TextBox)txtBox).Text.ToString())) { input[i2] = (((TextBox)txtBox).Text.ToString()); } else { //error--------------------------------------- input[i2] = "error invalid phone"; } } break; } } UserCode LoginUser = (UserCode)Session["authenticatedUser"]; UserCode user = GetCurrentUser(LoginUser.User_ID); DateTime dt = DateTime.Now; string dateNow = dt.ToString("yyyy-MM-dd"); _business.AddProjectManager(input[0], input[1], input[2], input[3], input[4], user.User_ID.ToString(), dateNow, dateNow); //--Var track1: continue; } }