public TSDepartmentSource (TSDepartmentsVC tvc,TSSettingsView _settingView, List<TSSettingsItems> data)
		{
			controller = tvc;
			Data = data;
			settingView = _settingView;
			GroupedData = GetEntriesBySectionName ();
		}
		public override void RowSelected (UITableView tableView, Foundation.NSIndexPath indexPath)
		{
			tableView.DeselectRow (indexPath, true);
			foreach (var item in tableView.VisibleCells) {
				var _cell=(TSSettingsTableViewCell)item;
				_cell.TextLabel.TextColor = UIColor.Black;
				}
			var cell = (TSSettingsTableViewCell)tableView.CellAt (indexPath);
			cell.TextLabel.TextColor = UIColor.Orange;
			cell.SelectedBackgroundView.BackgroundColor = UIColor.Clear;
			var imgView = new UIImageView (new CGRect(0,0,20,20));
			imgView.HighlightedImage = new UIImage ("arrow.png");
			//cell.AccessoryView = imgView;


			var changeLoginGroup = GroupedData [indexPath.Section];
			var changeLoginEntry = changeLoginGroup.ElementAt (indexPath.Row);
			if (changeLoginEntry.OnClickAction != null) {
				if (TSPhoneSpec.UserInterfaceIsPhone) {
					if (changeLoginEntry.OnClickAction.Equals ("PushAccountbasic")) {
						controller.NavigationController.PushViewController (new TSAccountBasicView (), true);
					} 
					else if (changeLoginEntry.OnClickAction.Equals ("PushSetupCodes")) {
						controller.NavigationController.PushViewController (new TSSetupCodeVC (), true);
					}
					else if (changeLoginEntry.OnClickAction.Equals ("PushDepartments")) {
						controller.NavigationController.PushViewController (new TSDepartmentsVC (controller), true);
					}
					else if (changeLoginEntry.OnClickAction.Equals ("PushInvite")) {
						controller.NavigationController.PushViewController (new TSInviteAgentVC (), true);
					}
					else if (changeLoginEntry.OnClickAction.Equals ("PushAdvanced")) {
						controller.NavigationController.PushViewController (new TSAdvancedVC (), true);
					}
				} else {
					if (settingVC == null)
						settingVC = new TSSettingsView ();
					if (changeLoginEntry.OnClickAction.Equals ("PushAccountbasic")) {
						//UITableViewCell cell = tableView.CellAt (indexPath);
//						cell.BackgroundColor = UIColor.FromRGB (220, 220, 220);
//						cell.TextLabel.TextColor = UIColor.Orange;
//						controller.SetAccountBasicLayoytIPad ();
						var obj= new TSAccountBasicView();
						controller.AddPartialView(obj.GetAcocuntBasicsView ());
					}
					else if (changeLoginEntry.OnClickAction.Equals ("PushSetupCodes")) {
						//controller.NavigationController.PushViewController (new TSSetupCodeVC (), true);
						var obj= new TSSetupCodeVC();
						controller.AddPartialView(obj.GetSetupView ());
					}
					else if (changeLoginEntry.OnClickAction.Equals ("PushDepartments")) {
						//controller.NavigationController.PushViewController (new TSDepartmentsVC (), true);
						var obj= new TSDepartmentsVC(controller);
						controller.AddPartialView(obj.GetDepartmentView ());
					}
					else if (changeLoginEntry.OnClickAction.Equals ("PushInvite")) {
						//controller.NavigationController.PushViewController (new TSInviteAgentVC (), true);
						var obj= new TSInviteAgentVC();
						controller.AddPartialView(obj.GetInviteAgentView ());
					}
					else if (changeLoginEntry.OnClickAction.Equals ("PushAdvanced")) {
						//controller.NavigationController.PushViewController (new TSAdvancedVC (), true);
						var obj= new TSAdvancedVC();
						controller.AddPartialView(obj.GetAdvanceView ());
					}
				}
			}
		}
		public TSAddDepartmentVC (TSDepartmentsVC _controller, TSSettingsView _settingView=null) : base (UserInterfaceIsPhone ? "TSAddDepartmentVC_iPhone" : "TSAddDepartmentVC_iPad", null)
		{
			controller = _controller;
			settingView = _settingView;
		}