private void btnWriteXml_Click(object sender, EventArgs e) { MyCommand command = new MyCommand(); command.CommandName = "InsretCustomer"; command.Database = "MyTestDb"; command.CommandText = "insret into ....."; command.Parameters.Add(new MyCommandParameter { ParamName = "Name", ParamType = "DbType.String" }); command.Parameters.Add(new MyCommandParameter { ParamName = "Address", ParamType = "DbType.String" }); List<MyCommand> list = new List<MyCommand>(1); list.Add(command); XmlHelper.XmlSerializeToFile(list, XmlFileName, Encoding.UTF8); }
private void btnWriteXml_Click(object sender, EventArgs e) { MyCommand command = new MyCommand(); command.CommandName = "InsretCustomer"; command.Database = "MyTestDb"; command.CommandText = "insret into ....."; command.Parameters.Add(new MyCommandParameter { ParamName = "Name", ParamType = "DbType.String" }); command.Parameters.Add(new MyCommandParameter { ParamName = "Address", ParamType = "DbType.String" }); List <MyCommand> list = new List <MyCommand>(1); list.Add(command); XmlHelper.XmlSerializeToFile(list, XmlFileName, Encoding.UTF8); }