private void SaveUserData(string tbxImię, string tbxLogin, string tbxNazwisko, bool cbActive , string ddlGroup, int UserIdtoChange, int UserId) { XmlNodeList xnList = XMLHelper.GetDataXML("Users"); DataTable dt = XMLHelper.ConvertXmlNodeListToDataTable(xnList); foreach (DataRow item in dt.Rows) { if (item[0].ToString() == UserIdtoChange.ToString()) { item[1] = ddlGroup; item[2] = tbxImię; item[3] = tbxNazwisko; item[4] = cbActive ? 1 : 0; item[5] = tbxLogin; item[8] = Session["UserLogin"]; item[9] = DateTime.Now; } } dt.TableName = "users"; XDocument xd = XMLHelper.ToXmlDocument(dt); xd.Save(CommonConst.XmlPathTable + "Users.xml"); }