Пример #1
1
        private void buttonInfoMessage_Click(object sender, EventArgs e)
        {

            /**** Create this Store Procedure in the tempdb database first ****
                        Create Proc TestInfoMessage
                        as
                        Print 'Using a Print Statement'
                        RaisError('RaisError in Stored Procedures', 9, 1)
            ****************************************************/

            //1. Make a Connection
            System.Data.OleDb.OleDbConnection objOleCon = new System.Data.OleDb.OleDbConnection();
            objOleCon.ConnectionString = strConnection;
            objOleCon.Open();

            objOleCon.InfoMessage += new System.Data.OleDb.OleDbInfoMessageEventHandler(objOleCon_InfoMessage);

            //2. Issue a Command
            System.Data.OleDb.OleDbCommand objCmd;
            objCmd = new System.Data.OleDb.OleDbCommand("Raiserror('Typical Message Goes Here', 9, 1)", objOleCon);
            objCmd.ExecuteNonQuery();
            objCmd = new System.Data.OleDb.OleDbCommand("Exec TestInfoMessage", objOleCon); //This executes the stored procedure.
            objCmd.ExecuteNonQuery();

            //3. Process the Results
            /** No Results at this time **/

            //4. Clean up code
            objOleCon.Close();
        }
Пример #2
1
        private String[] GetExcelSheetNames(string excelFile, bool blnXlsx = false)
        {
            System.Data.OleDb.OleDbConnection objConn = null;
            System.Data.DataTable dt = null;

            try
            {
                String connString = null;
                if (blnXlsx)
                {
                    connString = "Provider=Microsoft.ACE.OLEDB.12.0;" + "Data Source=" + excelFile + ";Extended Properties=\"Excel 12.0 Xml;HDR=NO;IMEX=1\"";
                }
                else
                {
                    connString = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + excelFile + ";Extended Properties=\"Excel 8.0;HDR=NO;IMEX=1\"";
                }

                objConn = new System.Data.OleDb.OleDbConnection(connString);
                objConn.Open();
                dt = objConn.GetOleDbSchemaTable(System.Data.OleDb.OleDbSchemaGuid.Tables, null);

                if (dt == null)
                {
                    return null;
                }

                String[] excelSheets = new String[dt.Rows.Count];
                int i = 0;

                foreach (DataRow row in dt.Rows)
                {
                    excelSheets[i] = row["TABLE_NAME"].ToString();
                    i += 1;
                }
                return excelSheets;
            }
            catch (Exception ex)
            {
                throw (new Exception("Cannot Read Excel Sheet Names -" + ex.Message));
            }
            finally
            {
                if (objConn != null)
                {
                    objConn.Close();
                    objConn.Dispose();
                }
                if (dt != null)
                {
                    dt.Dispose();
                }
            }
        }
Пример #3
1
        protected void btnGo_Click(object sender, EventArgs e)
        {
            System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbConnection();
            string sql = "";
            System.Data.DataSet ds = new System.Data.DataSet();
            System.Data.OleDb.OleDbDataReader dr;
            System.Data.OleDb.OleDbCommand comm = new System.Data.OleDb.OleDbCommand();
            //http://www.c-sharpcorner.com/UploadFile/dchoksi/transaction02132007020042AM/transaction.aspx
            //get this from connectionstrings.com/access
            conn.ConnectionString = txtConnString.Text;
            conn.Open();
            //here I can talk to my db...
            System.Data.OleDb.OleDbTransaction Trans;
            Trans = conn.BeginTransaction(System.Data.IsolationLevel.Chaos);

            try
            {

                comm.Connection = conn;
                comm.Transaction = Trans;
               // Trans.Begin();

                //Console.WriteLine(conn.State);
                sql = txtSQL.Text;
                comm.CommandText = sql;
                if (sql.ToLower().IndexOf("select") == 0)
                {
                    dr = comm.ExecuteReader();
                    while (dr.Read())
                    {
                        txtresults.Text = dr.GetValue(0).ToString();
                    }
                }
                else
                {
                    txtresults.Text = comm.ExecuteNonQuery().ToString();
                }
                Trans.Commit();
            }
            catch (Exception ex)
            {
                txtresults.Text = ex.Message;
                Trans.Rollback();
            }
            finally
            {

                comm.Dispose();
                conn.Close();
                conn = null;
            }
        }
Пример #4
0
        /// <summary>
        /// 取得 OLEDB 的连接字符串.
        /// 优先启动 ACE 驱动,
        /// 假如 ACE 失败,再尝试启动 JET
        /// 
        /// 该方法可能用不上。
        /// 因为 在 Office 2010 上面,Jet 与 ACE 都能正常运作
        /// 
        /// 唯一需要注意的是, 如果目标机器的操作系统,是64位的话。
        /// 项目需要 编译为 x86, 而不是简单的使用默认的 Any CPU.
        /// </summary>
        /// <param name="excelFileName"></param>
        /// <returns></returns>
        public static string GetOleDbConnectionString(string excelFileName)
        {

            // Office 2007 以及 以下版本使用.
            string jetConnString =
              String.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Extended Properties=Excel 8.0;", excelFileName);

            // xlsx 扩展名 使用.
            string aceConnXlsxString =
              String.Format("Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=\"Excel 12.0 Xml;HDR=YES\"", excelFileName);

            // xls 扩展名 使用.
            string aceConnXlsString =
              String.Format("Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=\"Excel 8.0;HDR=YES\"", excelFileName);


            // 默认非 xlsx
            string aceConnString = aceConnXlsString;


            if (excelFileName.EndsWith(".xlsx", StringComparison.CurrentCultureIgnoreCase))
            {
                // 如果扩展名为 xlsx.
                // 那么需要将 驱动切换为 xlsx 扩展名 的.
                aceConnString = aceConnXlsxString;
            }

            // 尝试使用 ACE. 假如不发生错误的话,使用 ACE 驱动.
            try
            {
                System.Data.OleDb.OleDbConnection cn = new System.Data.OleDb.OleDbConnection(aceConnString);
                cn.Open();
                cn.Close();
                // 使用 ACE
                return aceConnString;
            }
            catch (Exception)
            {
                // 启动 ACE 失败.
            }


            // 尝试使用 Jet. 假如不发生错误的话,使用 Jet 驱动.
            try
            {
                System.Data.OleDb.OleDbConnection cn = new System.Data.OleDb.OleDbConnection(jetConnString);
                cn.Open();
                cn.Close();
                // 使用 Jet
                return jetConnString;
            }
            catch (Exception)
            {
                // 启动 Jet 失败.
            }


            // 假如 ACE 与 JET 都失败了,默认使用 JET.
            return jetConnString;
        }
Пример #5
0
        protected void Application_Start(Object sender, EventArgs e)
        {
            System.Data.DataSet ds;
            System.Data.OleDb.OleDbConnection oleDbConnection1;
            System.Data.OleDb.OleDbDataAdapter daAttendees;
            System.Data.OleDb.OleDbDataAdapter daRooms;
            System.Data.OleDb.OleDbDataAdapter daEvents;

            oleDbConnection1 = new System.Data.OleDb.OleDbConnection();
            oleDbConnection1.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User ID=Admin;Data Source=C:\Inetpub\wwwroot\PCSWebApp3\PCSWebApp3.mdb;Mode=ReadWrite|Share Deny None;Extended Properties="""";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet OLEDB:Database Password="""";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=0;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password="""";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False";
            oleDbConnection1.Open();
            ds = new DataSet();
            daAttendees = new System.Data.OleDb.OleDbDataAdapter(
                "SELECT * FROM Attendees", oleDbConnection1);
            daRooms = new System.Data.OleDb.OleDbDataAdapter(
                "SELECT * FROM Rooms", oleDbConnection1);

            daEvents = new System.Data.OleDb.OleDbDataAdapter(
                "SELECT * FROM Events", oleDbConnection1);
            daAttendees.Fill(ds, "Attendees");
            daRooms.Fill(ds, "Rooms");
            daEvents.Fill(ds, "Events");
            oleDbConnection1.Close();

            Application["ds"] = ds;
        }
 public System.Collections.Generic.List<string> GetColumnNames(string file, string table)
 {
     System.Data.DataTable dataSet = new System.Data.DataTable();
     string connString = "";
     if (Global.filepassword != "")
     {
         if (Path.GetExtension(file).ToString().ToUpper() != ".ACCDB")
             connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + file + ";Jet OLEDB:Database Password="******"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + file + ";Jet OLEDB:Database Password="******".ACCDB")
             connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + file;
         else
             connString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + file + ";Persist Security Info=False;";
     }
     using (System.Data.OleDb.OleDbConnection connection = new System.Data.OleDb.OleDbConnection(connString))
     {
         connection.Open();
         System.Data.OleDb.OleDbCommand Command = new System.Data.OleDb.OleDbCommand("SELECT * FROM " + table, connection);
         using (System.Data.OleDb.OleDbDataAdapter dataAdapter = new System.Data.OleDb.OleDbDataAdapter(Command))
         {
             dataAdapter.Fill(dataSet);
         }
     }
     System.Collections.Generic.List<string> columns = new System.Collections.Generic.List<string>();
     for (int i = 0; i < dataSet.Columns.Count; i++)
     {
         columns.Add(dataSet.Columns[i].ColumnName);
     }
     return columns;
 }
Пример #7
0
 /// <summary>
 /// M�todo necesario para admitir el Dise�ador, no se puede modificar
 /// el contenido del m�todo con el editor de c�digo.
 /// </summary>
 private void InitializeComponent()
 {
     System.Configuration.AppSettingsReader configurationAppSettings = new System.Configuration.AppSettingsReader();
     this.oleDbDataAdapter1 = new System.Data.OleDb.OleDbDataAdapter();
     this.oleDbSelectCommand1 = new System.Data.OleDb.OleDbCommand();
     this.oleDbConnection1 = new System.Data.OleDb.OleDbConnection();
     this.datosInforme1 = new informe_1.datosInforme();
     ((System.ComponentModel.ISupportInitialize)(this.datosInforme1)).BeginInit();
     //
     // oleDbDataAdapter1
     //
     this.oleDbDataAdapter1.SelectCommand = this.oleDbSelectCommand1;
     this.oleDbDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
                                                                                                 new System.Data.Common.DataTableMapping("Table", "Table", new System.Data.Common.DataColumnMapping[] {
                                                                                                                                                                                                          new System.Data.Common.DataColumnMapping("NOMBRE", "NOMBRE")})});
     //
     // oleDbSelectCommand1
     //
     this.oleDbSelectCommand1.CommandText = "SELECT \'\' AS NOMBRE FROM DUAL";
     this.oleDbSelectCommand1.Connection = this.oleDbConnection1;
     //
     // oleDbConnection1
     //
     this.oleDbConnection1.ConnectionString = ((string)(configurationAppSettings.GetValue("cadenaConexion", typeof(string))));
     //
     // datosInforme1
     //
     this.datosInforme1.DataSetName = "datosInforme";
     this.datosInforme1.Locale = new System.Globalization.CultureInfo("es-ES");
     this.datosInforme1.Namespace = "http://www.tempuri.org/datosInforme.xsd";
     this.Load += new System.EventHandler(this.Page_Load);
     ((System.ComponentModel.ISupportInitialize)(this.datosInforme1)).EndInit();
 }
Пример #8
0
 public static System.Data.OleDb.OleDbConnection GetWDSConnection()
 {
     string wds_connection_string = @"Provider=Search.CollatorDSO;Extended Properties='Application=Windows';";
     var wds_connection = new System.Data.OleDb.OleDbConnection(wds_connection_string);
     wds_connection.Open();
     return wds_connection;
 }
Пример #9
0
        // The following methods handles SQL Server, Oledb, Odbc
        public static IDbConnection CreateConnection(EnumProviders provider)
        {
            IDbConnection cnn;

            switch (provider)
            {
                case EnumProviders.SqlServer:
                    cnn = new System.Data.SqlClient.SqlConnection();
                    break;
                case EnumProviders.OleDb:
                    cnn = new System.Data.OleDb.OleDbConnection();
                    break;
                case EnumProviders.Odbc:
                    cnn = new System.Data.Odbc.OdbcConnection();
                    break;
                case EnumProviders.Oracle:
                    throw new NotImplementedException("Provider not implemented");
                    break;
                default:
                    cnn = new System.Data.SqlClient.SqlConnection();
                    break;
            }

            return cnn;
        }
Пример #10
0
 /// <summary>
 /// M�todo necesario para admitir el Dise�ador, no se puede modificar
 /// el contenido del m�todo con el editor de c�digo.
 /// </summary>
 private void InitializeComponent()
 {
     this.oleDbConnection1 = new System.Data.OleDb.OleDbConnection();
     this.oleDbSelectCommand1 = new System.Data.OleDb.OleDbCommand();
     this.oleDbDataAdapter1 = new System.Data.OleDb.OleDbDataAdapter();
     this.dsFicha1 = new ficha_antecedentes_personales.dsFicha();
     ((System.ComponentModel.ISupportInitialize)(this.dsFicha1)).BeginInit();
     //
     // oleDbConnection1
     //
     this.oleDbConnection1.ConnectionString = "Provider=SQLOLEDB;server=edoras;OLE DB Services = -2;uid=protic;pwd=,.protic;init" +
         "ial catalog=protic2";
     //
     // oleDbSelectCommand1
     //
     this.oleDbSelectCommand1.CommandText = @"select '' as nombre, '' as rut, '' as pasaporte, '' as fecha_nac, '' as fono, '' as nacionalidad, '' as Estado_civil, '' as Direccion, '' as comuna, '' as ciudad, '' as region, '' as colegio_egreso, '' as ano_egreso, '' as proced_educ, '' as inst_educ_sup, '' as Carrera, '' as ano_ingr, '' as FinanciaEst, '' as ultimo_post_ncorr, '' as nombre_sost_ec, '' as RUT_sost_ec, '' as fnac_sost_ec, '' as edad_sost, '' as fono_sost_ec, '' as pare_sost_ec, '' as dire_tdesc_sost_ec, '' as comu_sost_ec, '' as ciud_sost_ec, '' as regi_sost_ec";
     this.oleDbSelectCommand1.Connection = this.oleDbConnection1;
     //
     // oleDbDataAdapter1
     //
     this.oleDbDataAdapter1.SelectCommand = this.oleDbSelectCommand1;
     //
     // dsFicha1
     //
     this.dsFicha1.DataSetName = "dsFicha";
     this.dsFicha1.Locale = new System.Globalization.CultureInfo("es-CL");
     this.dsFicha1.Namespace = "http://www.tempuri.org/dsFicha.xsd";
     this.Load += new System.EventHandler(this.Page_Load);
     ((System.ComponentModel.ISupportInitialize)(this.dsFicha1)).EndInit();
 }
Пример #11
0
 /// <summary> Private constructor ... checks system properties for connection 
 /// information
 /// </summary>
 private NormativeDatabase()
 {
     //UPGRADE_ISSUE: Method 'java.lang.System.getProperty' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javalangSystem'"
     _connectionString = ca.uhn.Properties.Settings.Default.ConnectionString;
     _conn = new System.Data.OleDb.OleDbConnection(_connectionString);
     _conn.Open();
 }
Пример #12
0
            public void DBSetup()
            {
                // +++++++++++++++++++++++++++  DBSetup function +++++++++++++++++++++++++++
                // This DBSetup() method instantiates all the DB objects needed to access a DB, 
                // including OleDbDataAdapter, which contains 4 other objects(OlsDbSelectCommand, 
                // oleDbInsertCommand, oleDbUpdateCommand, oleDbDeleteCommand.) And each
                // Command object contains a Connection object and an SQL string object.
                OleDbDataAdapter2 = new System.Data.OleDb.OleDbDataAdapter();
                OleDbSelectCommand2 = new System.Data.OleDb.OleDbCommand();
                OleDbInsertCommand2 = new System.Data.OleDb.OleDbCommand();
                OleDbUpdateCommand2 = new System.Data.OleDb.OleDbCommand();
                OleDbDeleteCommand2 = new System.Data.OleDb.OleDbCommand();
                OleDbConnection2 = new System.Data.OleDb.OleDbConnection();

                OleDbDataAdapter2.DeleteCommand = OleDbDeleteCommand2;
                OleDbDataAdapter2.InsertCommand = OleDbInsertCommand2;
                OleDbDataAdapter2.SelectCommand = OleDbSelectCommand2;
                OleDbDataAdapter2.UpdateCommand = OleDbUpdateCommand2;

                // The highlighted text below should be changed to the location of your own database

                OleDbConnection2.ConnectionString = "Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Reg" + "istry Path =; Jet OLEDB:Database L" +
                "ocking Mode=1;Data Source= C:\\Users\\Trenton MCleod\\Desktop\\RegistrationDB.mdb;J" +
                "et OLEDB:Engine Type=5;Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:System datab" +
                "ase=;Jet OLEDB:SFP=False;persist security info=False;Extended Properties=;Mode=S" +
                "hare Deny None;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Create System Database=False;Jet " +
                "OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repai" +
                "r=False;User ID=Admin;Jet OLEDB:Global Bulk Transactions=1";

            }  //end DBSetup()
Пример #13
0
 public DataTable SelectToDataTable(string sql)
 {
     //set connection
     System.Data.OleDb.OleDbConnection con = new System.Data.OleDb.OleDbConnection();
     con.ConnectionString = connectString;
     //set commandtext
     System.Data.OleDb.OleDbCommand command = new System.Data.OleDb.OleDbCommand();
     command.CommandText = sql;
     command.Connection = con;
     //set adapter
     System.Data.OleDb.OleDbDataAdapter adapter = new System.Data.OleDb.OleDbDataAdapter();
     adapter.SelectCommand = command;
     //creat a datatable
     DataTable dt = new DataTable();
     try
     {
         //open this connection
         con.Open();
         adapter.Fill(dt);
     }
     catch (Exception ex)
     {
         //throw new Exception
         con.Close();
     }
     finally
     {
         //close this connection
         con.Close();
     }
     //return a datatable
     return dt;
 }
Пример #14
0
        /// <summary>
        ///创建excel数据源连接 
        /// </summary>
        /// <param name="strFileName">文件路径名</param>
        /// <param name="DbConn">返回数据源连接</param>
        /// <returns></returns>
        public static bool CreateConnection(string strFileName, ref IDbConnection DbConn)
        {
            bool bolReturn = false;
            string strConnectString = string.Empty;

            if (string.IsNullOrEmpty(strFileName))
            {
                return false;
            }
            if (!System.IO.File.Exists(strFileName))
            {
                return false;
            }
            strConnectString = string.Format("Provider=Microsoft.Jet.OLEDB.4.0; Extended Properties=\"Excel 8.0;HDR=NO;IMEX=1\";Data Source={0};", strFileName);
            try
            {
                //实例化连接
                DbConn = new System.Data.OleDb.OleDbConnection();
                DbConn.ConnectionString = strConnectString;
                DbConn.Open();
                bolReturn = true;
            }
            catch (Exception exp)
            {
                Hy.Common.Utility.Log.OperationalLogManager.AppendMessage(exp.ToString());

            }
            return bolReturn;
        }
        protected void btnInsert_Click(object sender, EventArgs e)
        {
            System.Data.OleDb.OleDbConnection Conn = new System.Data.OleDb.OleDbConnection();
            Conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("app_data/products.mdb");
            Conn.Open();
            //Response.Write(Conn.State);

            string strSQL = "insert into [users] ([username], firstname, lastname, email, [password]) values (?,?,?,?,?)";
            object returnVal;

            System.Data.OleDb.OleDbCommand Comm = new System.Data.OleDb.OleDbCommand();
            Comm.Connection = Conn;

            Comm.CommandText = "select [username] from [users] where [username] = ?";
            Comm.Parameters.AddWithValue("[username]", txtUserName.Text);
            returnVal = Comm.ExecuteScalar();
            if (returnVal == null)
            {
                Comm.Parameters.Clear();
                Comm.CommandText = strSQL;
                Comm.Parameters.AddWithValue("username", txtUserName.Text);
                Comm.Parameters.AddWithValue("firstname", txtFName.Text);
                Comm.Parameters.AddWithValue("lastname", txtLName.Text);
                Comm.Parameters.AddWithValue("email", txtEmail.Text);
                Comm.Parameters.AddWithValue("password", txtPassword.Text);
                Comm.ExecuteNonQuery();
            }
            else {
                Response.Write("Username already exists.");
            }
            Conn.Close();
            Conn = null;
        }
Пример #16
0
        public int AddEvent(String eventName, String eventRoom,
			String eventAttendees, String eventDate)
        {
            System.Data.OleDb.OleDbConnection oleDbConnection1;
            System.Data.OleDb.OleDbDataAdapter daEvents;
            DataSet ds;

            oleDbConnection1 = new System.Data.OleDb.OleDbConnection();
            oleDbConnection1.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User ID=Admin;Data Source=C:\\Inetpub\\wwwroot\\PCSWebApp3\\PCSWebApp3.mdb";
            String oleDbCommand = "INSERT INTO Events (Name, Room, AttendeeList," +
                " EventDate) VALUES ('" + eventName + "', '" +
                eventRoom + "', '" + eventAttendees + "', '" +
                eventDate + "')";
            System.Data.OleDb.OleDbCommand insertCommand =
                new System.Data.OleDb.OleDbCommand(oleDbCommand,
                oleDbConnection1);
            oleDbConnection1.Open();

            int queryResult = insertCommand.ExecuteNonQuery();
            if (queryResult == 1)
            {
                daEvents = new System.Data.OleDb.OleDbDataAdapter(
                    "SELECT * FROM Events", oleDbConnection1);
                ds = (DataSet)Application["ds"];
                ds.Tables["Events"].Clear();
                daEvents.Fill(ds, "Events");
                Application.Lock();
                Application["ds"] = ds;
                Application.UnLock();
                oleDbConnection1.Close();
            }
            return queryResult;
        }
Пример #17
0
        public Form1()
        {
            InitializeComponent();
            comboBox2.Text = "Column";
            comboBox2.Items.Add("Column");
            comboBox2.Items.Add("Lines");
            comboBox2.Items.Add("Pie");
            comboBox2.Items.Add("Bar");
            comboBox2.Items.Add("Funnel");
            comboBox2.Items.Add("PointAndFigure");

            comboBox1.Items.Clear();
            if (System.IO.File.Exists("your_base.mdb"))
            {
                string conStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=your_base.mdb;Jet OLEDB:Engine Type=5";
                System.Data.OleDb.OleDbConnection connectDb = new System.Data.OleDb.OleDbConnection(conStr);
                connectDb.Open();
                DataTable cbTb = connectDb.GetOleDbSchemaTable(System.Data.OleDb.OleDbSchemaGuid.Tables, new object[] { null, null, null, "TABLE" });
                foreach (DataRow row in cbTb.Rows)
                {
                    string tbName = row["TABLE_NAME"].ToString();
                    comboBox1.Items.Add(tbName);
                }
                connectDb.Close();
            }
        }
Пример #18
0
        /// <summary>
        /// Create access database file
        /// </summary>
        public static void create_mdb_file(DataSet ds, string destination, string template)
        {
            if(SqlConvert.ToString(template) == "")
                throw new Err("You must specify the location of a template mdb file inherit from.");
            if(!System.IO.File.Exists(template))
                throw new Err("The specified template file \"" + template + "\" could not be found.");
            if(SqlConvert.ToString(destination) == "")
                throw new Err("You must specify the destination location and filename of the mdb file to create.");

            //COPY THE TEMPLATE AND CREATE DESTINATION FILE
            System.IO.File.Copy(template,destination,true);
            //CONNECT TO THE DESTINATION FILE
            string sconn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + destination + ";";
            System.Data.OleDb.OleDbConnection oconn = new System.Data.OleDb.OleDbConnection(sconn);
            oconn.Open();
            System.Data.OleDb.OleDbCommand ocmd = new System.Data.OleDb.OleDbCommand();
            ocmd.Connection = oconn;
            //WRITE TO THE DESTINATION FILE
            try
            {
                oledb.insert_dataset(ds,ocmd);
            }
            catch(Exception ex)
            {
                //System.Web.HttpContext.Current.Response.Write(ex.ToString());
                General.Debugging.Report.SendError("Error exporting to MS Access", ex.ToString() + "\r\n\r\n\r\n" + ocmd.CommandText);
            }
            finally
            {
                // Close the connection.
                oconn.Close();
            }
        }
Пример #19
0
        public void write_log_file(Form1 f,String type_of_network)
        {
            this.f = f;
            int time = f.time;
            Console.Write("Time in excel : " + time);
            Console.Write("Selected network : " + type_of_network);
            String network_type = make_network_string(type_of_network);
            nodes = Convert.ToString(f.no_of_nodes);
            String connections = make_connections_string();
            if (System.IO.File.Exists("log.xls"))
                file_exists = true;
             //       MyConnection = new System.Data.OleDb.OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Users\\ABHISHEK\\ExcelData1.xls;;Extended Properties=Excel 8.0;");
            MyConnection = new System.Data.OleDb.OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0;Data Source = log.xls;;Extended Properties=Excel 8.0;");
            MyConnection.Open();
            myCommand.Connection = MyConnection;
            if (!file_exists)
            {
                Console.Write("does not exist");
                sql = "CREATE TABLE Simulation (TypeofNetwork String, Nodes int, Packets int,Seeder_Nodes int,Seeder_Packets int,Download_edges int,Upload_edges int,Ratio float,Thresh_Probability float,Nodes_row int,Connections String,Alturists int,Traders int,Parasites int,Time_taken int)";

                myCommand.CommandText = sql;
                myCommand.ExecuteNonQuery();

            }
            sql = "INSERT INTO [Simulation$] (TypeofNetwork, Nodes, Packets,Seeder_Nodes,Seeder_Packets,Download_edges,Upload_edges,Ratio,Thresh_Probability,Nodes_row,Connections,Alturists,Traders,Parasites,Time_taken) values (" + " ' " + network_type + " ' " + "," + nodes + "," + f.no_of_packets.ToString() + "," + f.seeder_nodes.ToString() + "," + f.seeder_packets.ToString() + "," + f.no_of_download_edges.ToString() + "," + f.no_of_upload_edges.ToString() + "," + f.ratio.ToString() + "," + (f.threshold_probability / 100.0).ToString() + "," + f.widthstep.ToString() + "," + "'" + connections +"'" + "," +f.alturists.ToString() + "," + f.traders.ToString() + "," + f.parasites.ToString()+"," +time.ToString()+ ")";

            myCommand.CommandText = sql;
            myCommand.ExecuteNonQuery();
            MyConnection.Close();
        }
Пример #20
0
        public static bool AnalyzeExcel(ExcelXMLLayout layout)
        {
            System.Data.OleDb.OleDbConnection conn = null;
            try
            {
                conn = new System.Data.OleDb.OleDbConnection(MakeConnectionString(layout.solution.path));

                conn.Open();
                System.Data.DataTable table = conn.GetOleDbSchemaTable(
                    System.Data.OleDb.OleDbSchemaGuid.Columns,
                    new object[] { null, null, layout.sheet + "$", null });

                layout.Clear();
                System.Diagnostics.Debug.WriteLine("Start Analyze [" + table.Rows.Count + "]");

                foreach (System.Data.DataRow row in table.Rows)
                {
                    string name = row["Column_Name"].ToString();

                    System.Diagnostics.Debug.WriteLine(name);

                    // 测试数据类型
                    ExcelXMLLayout.KeyType testType = ExcelXMLLayout.KeyType.Unknown;
                    {
                        System.Data.OleDb.OleDbCommand cmd = new System.Data.OleDb.OleDbCommand(
                            string.Format("select [{0}] from [{1}$]", name, layout.sheet), conn
                            );
                        System.Data.OleDb.OleDbDataReader r = cmd.ExecuteReader();
                        while (r.Read())
                        {
                            System.Diagnostics.Debug.WriteLine(r[0].GetType());
                            if (r[0].GetType() == typeof(System.Double))
                            {
                                testType = ExcelXMLLayout.KeyType.Integer;
                                break;
                            }
                            if (testType == ExcelXMLLayout.KeyType.String)
                            {
                                break;
                            }
                            testType = ExcelXMLLayout.KeyType.String;
                        }
                        r.Close();
                        cmd.Dispose();
                    }

                    layout.Add(name, testType);
                }
                table.Dispose();
                conn.Close();

                return true;
            }
            catch (Exception outErr)
            {
                lastError = string.Format("无法分析,Excel 无法打开\r\n{0}", outErr.Message);
            }
            return false;
        }
 private void Form1_Load(object sender, EventArgs e)
 {
     try {
         conexao = new System.Data.OleDb.OleDbConnection
             ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:/temp/Universidade3.mdb");
         conexao.Open();
     } catch (Exception exsql) { }
 }
Пример #22
0
        public Form1()
        {
            InitializeComponent();

            DataTable dtProviderFactorys = DbProviderFactories.GetFactoryClasses();

            DbConnectionStringBuilder dcsBuilder = new DbConnectionStringBuilder();
            dcsBuilder.Add("User ID", "hzzgis");
            dcsBuilder.Add("Password", "hzzgis");
            dcsBuilder.Add("Service Name", "sunz");
            dcsBuilder.Add("Host", "172.16.1.9");
            dcsBuilder.Add("Integrated Security", false);

            string licPath = Application.StartupPath + "\\DDTek.lic";
            if (!System.IO.File.Exists(licPath))
                licPath = CretateDDTekLic.CreateLic();
            dcsBuilder.Add("License Path", licPath);
            //若路径中存在空格,则会在路径名称前加上"\""
            string conStr = dcsBuilder.ConnectionString;
            conStr = conStr.Replace("\"", "");

            DDTek.Oracle.OracleConnection orclConnection = new DDTek.Oracle.OracleConnection(conStr);

            DDTek.Oracle.OracleCommand cmd = new DDTek.Oracle.OracleCommand();
            DDTek.Oracle.OracleDataAdapter adapter = new DDTek.Oracle.OracleDataAdapter();
            adapter.SelectCommand = cmd;
            DbDataAdapter dAdapter = adapter;
            DbCommand dbCommand = dAdapter.SelectCommand;

            orclConnection.Open();

            //Configuration config = new Configuration();

            //ISessionFactory pFactory = config.BuildSessionFactory();
            //ISession pSession= pFactory.OpenSession(orclConnection as IDbConnection);

            //DbProviderFactory factory = DbProviderFactories.GetFactory("System.Data.OracleClient");
            //IDbConnection dbConn = factory.CreateConnection();
            //if (dbConn != null)
            //    MessageBox.Show("Connection Created");
            //Conn.ConnectionString = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" + Server + ")(PORT=" + Port + ")))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=" + Service + ")));user id=" + User + ";password="******";pooling = true;Unicode=True";

            IDbConnection dbConn=new System.Data.OleDb.OleDbConnection();
            string Server = "sunzvm-lc", Port = "1521", Service = "sunz", User = "******", PWD = "hzzgis";
            //dbConn.ConnectionString = "Provider=OraOLEDB.Oracle.1;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" + Server + ")(PORT=" + Port + ")))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=" + Service + ")));user id=" + User + ";password="******";pooling = true;Unicode=True";
            dbConn.ConnectionString = "Provider=MSDAORA.1;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" + Server + ")(PORT=" + Port + ")))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=" + Service + ")));user id=" + User + ";password="******";pooling = true;Unicode=True";

            try
            {
                dbConn.Open();
            }
            catch(Exception exp)
            {
                MessageBox.Show(exp.ToString());
            }
        }
Пример #23
0
 public static DataTable GetDataTableExcel(string strFileName, string Table)
 {
     System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0; Data Source = " + strFileName + "; Extended Properties = \"Excel 8.0;HDR=Yes;IMEX=1\";");
     conn.Open();
     string strQuery = "SELECT * FROM [" + Table + "]";
     System.Data.OleDb.OleDbDataAdapter adapter = new System.Data.OleDb.OleDbDataAdapter(strQuery, conn);
     System.Data.DataSet ds = new System.Data.DataSet();
     adapter.Fill(ds);
     return ds.Tables[0];
 }
Пример #24
0
        public DataBase(string fileName)
        {
            this.FileName = fileName;
            string connStr = BuildExcel2007ConnectionString(fileName, true);
            conn = new System.Data.OleDb.OleDbConnection(connStr);
            conn.Open();

              DataTable tableschema = conn.GetSchema(OdbcMetaDataCollectionNames.Tables);
              DataSet set = tableschema.DataSet;
              TableName = tableschema.Rows[0]["Table_name"].ToString();
        }
Пример #25
0
 //##########################################################
 //#            Changer l'emplacement de la BDD             #
 //##########################################################
 private void Form1_Load()
 {
     this.rq_sql = null;
                                                                   //Changer l'emplacement ou ce trouve votre BDD
     this.cnx = @"Provider = Microsoft.Jet.OLEDB.4.0; Data Source = C:\Users\Orage\Documents\Visual Studio 2015\Projects\AppBaseDeDonnee\AppBaseDeDonnee\MyBDD.mdb";
     this.oCNX = new System.Data.OleDb.OleDbConnection(this.cnx);  
     this.oCMD = null;
     this.oDA = null;
     this.oDS = new DataSet();
     this.m_select();
 }
Пример #26
0
        public DataSet Method1()
        {
            string s = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("Northwind1.mdb") + ";Persist Security Info=False";
            string z = "select * from Клиенты";
            System.Data.OleDb.OleDbConnection olcon = new System.Data.OleDb.OleDbConnection(s);
            System.Data.OleDb.OleDbCommand olcom = new System.Data.OleDb.OleDbCommand(z, olcon);
            System.Data.OleDb.OleDbDataAdapter DA = new System.Data.OleDb.OleDbDataAdapter(olcom);
            System.Data.DataSet DS = new System.Data.DataSet();
            DA.Fill(DS);

            return DS;
        }
        public DataTable GetSheetDataForInsert(string qrySecondPart)
        {
            var conn = new System.Data.OleDb.OleDbConnection(
                String.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Extended Properties='Excel 8.0;HDR=Yes;IMEX=1';", _path));
            DataSet ds = new DataSet();

            var adapter = new System.Data.OleDb.OleDbDataAdapter(
                qrySecondPart, conn);
            adapter.Fill(ds);

            return ds.Tables[0];
        }
Пример #28
0
        public void BuildAxisOrderBitArray()
        {
            if (!File.Exists(EpsgAccessDatabase))
                throw new IgnoreException("Epsg Access Database not found");

            var ba = new BitArray(32768);

            using (var cn = new System.Data.OleDb.OleDbConnection(
                string.Format("Provider=Microsoft.Jet.OLEDB.4.0; Data Source={0};", EpsgAccessDatabase)))
            {
                cn.Open();
                var cmd = cn.CreateCommand();
                cmd.CommandText = Sql;
                using (var dr = cmd.ExecuteReader())
                {
                    if (dr != null)
                    while (dr.Read())
                    {
                        var code = dr.GetInt32(0);
                        if (code > 32767) continue;
                        ba[code] = true;
                    }
                }
            }

            string enc;
            var buffer = new byte[4096];
            ba.CopyTo(buffer, 0);

            #if NET45
            using (var bufferStream = new MemoryStream(buffer))
            {
                using (var compressedStream = new MemoryStream())
                {
                    using (var s = new DeflateStream(compressedStream, CompressionMode.Compress))
                    {
                        bufferStream.CopyTo(s);
                        compressedStream.Flush();
                    }
                    enc = Convert.ToBase64String(compressedStream.ToArray());
                    Console.WriteLine("Compressed");
                    WriteBlocks(enc);
                }
            }
            #endif
            enc = Convert.ToBase64String(buffer);
            Console.WriteLine("\nUncompressed");
            WriteBlocks(enc);

            Console.WriteLine("\nByte array");
            WriteBytes(buffer, 20);
        }
Пример #29
0
        static void Main(string[] args)
        {
            using (var cn = new System.Data.OleDb.OleDbConnection(new Connection().ConnectionString))
            {
                cn.Open();

                //  手抜き:第一引数に以下の文字列を渡すことで処理分岐
                switch (args.FirstOrDefault().ToLower())
                {
                    case "select":
                        SelectAll(cn);
                        SelectWithoutClass(cn);
                        SelectWithClass(cn);
                        break;

                    case "insert":
                        Insert(cn);
                        SelectAll(cn);
                        break;

                    case "update":
                        Update(cn);
                        SelectAll(cn);
                        break;

                    case "commit":
                        RunTransaction(cn, hasError: false);
                        SelectAll(cn);
                        break;

                    case "rollback":
                        RunTransaction(cn, hasError: true);
                        SelectAll(cn);
                        break;

                    case "tableadapter":
                        GetIdentityWithTableAdapter();
                        break;

                    case "identity":
                        SelectAll(cn);
                        GetIdentityWithDapper(cn);
                        SelectAll(cn);
                        break;

                    default:
                        break;
                }

                cn.Close();
            }
        }
Пример #30
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     C1.Win.C1List.Style style1 = new C1.Win.C1List.Style();
     C1.Win.C1List.Style style2 = new C1.Win.C1List.Style();
     C1.Win.C1List.Style style3 = new C1.Win.C1List.Style();
     C1.Win.C1List.Style style4 = new C1.Win.C1List.Style();
     C1.Win.C1List.Style style5 = new C1.Win.C1List.Style();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
     C1.Win.C1List.Style style6  = new C1.Win.C1List.Style();
     C1.Win.C1List.Style style7  = new C1.Win.C1List.Style();
     C1.Win.C1List.Style style8  = new C1.Win.C1List.Style();
     C1.Win.C1List.Style style9  = new C1.Win.C1List.Style();
     C1.Win.C1List.Style style10 = new C1.Win.C1List.Style();
     C1.Win.C1List.Style style11 = new C1.Win.C1List.Style();
     C1.Win.C1List.Style style12 = new C1.Win.C1List.Style();
     C1.Win.C1List.Style style13 = new C1.Win.C1List.Style();
     C1.Win.C1List.Style style14 = new C1.Win.C1List.Style();
     C1.Win.C1List.Style style15 = new C1.Win.C1List.Style();
     C1.Win.C1List.Style style16 = new C1.Win.C1List.Style();
     this.dblOpus             = new C1.Win.C1List.C1List();
     this.dataSet21           = new Tutorial4.DataSet2();
     this.oleDbConnection1    = new System.Data.OleDb.OleDbConnection();
     this.oleDbSelectCommand1 = new System.Data.OleDb.OleDbCommand();
     this.oleDbDataAdapter1   = new System.Data.OleDb.OleDbDataAdapter();
     this.oleDbSelectCommand2 = new System.Data.OleDb.OleDbCommand();
     this.oleDbDataAdapter2   = new System.Data.OleDb.OleDbDataAdapter();
     this.oleDbInsertCommand  = new System.Data.OleDb.OleDbCommand();
     this.dbcCombo            = new C1.Win.C1List.C1Combo();
     this.dataSet11           = new Tutorial4.DataSet1();
     ((System.ComponentModel.ISupportInitialize)(this.dblOpus)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.dataSet21)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.dbcCombo)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.dataSet11)).BeginInit();
     this.SuspendLayout();
     //
     // dblOpus
     //
     this.dblOpus.AddItemSeparator    = ';';
     this.dblOpus.CaptionHeight       = 17;
     this.dblOpus.CaptionStyle        = style1;
     this.dblOpus.ColumnCaptionHeight = 17;
     this.dblOpus.ColumnFooterHeight  = 17;
     this.dblOpus.ColumnWidth         = 100;
     this.dblOpus.DataMember          = "Opus";
     this.dblOpus.DataSource          = this.dataSet21;
     this.dblOpus.DeadAreaBackColor   = System.Drawing.SystemColors.ControlDark;
     this.dblOpus.EvenRowStyle        = style2;
     this.dblOpus.FooterStyle         = style3;
     this.dblOpus.HeadingStyle        = style4;
     this.dblOpus.HighLightRowStyle   = style5;
     this.dblOpus.Images.Add(((System.Drawing.Image)(resources.GetObject("dblOpus.Images"))));
     this.dblOpus.ItemHeight        = 15;
     this.dblOpus.Location          = new System.Drawing.Point(224, 24);
     this.dblOpus.MatchEntryTimeout = ((long)(2000));
     this.dblOpus.Name               = "dblOpus";
     this.dblOpus.OddRowStyle        = style6;
     this.dblOpus.RowDivider.Color   = System.Drawing.Color.DarkGray;
     this.dblOpus.RowDivider.Style   = C1.Win.C1List.LineStyleEnum.None;
     this.dblOpus.RowSubDividerColor = System.Drawing.Color.DarkGray;
     this.dblOpus.SelectedStyle      = style7;
     this.dblOpus.Size               = new System.Drawing.Size(224, 232);
     this.dblOpus.Style              = style8;
     this.dblOpus.TabIndex           = 0;
     this.dblOpus.Text               = "c1List1";
     this.dblOpus.PropBag            = resources.GetString("dblOpus.PropBag");
     //
     // dataSet21
     //
     this.dataSet21.DataSetName = "DataSet2";
     //
     // oleDbConnection1
     //
     this.oleDbConnection1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\"..\\..\\..\\Data\\C1ListDemo.mdb\"";
     //
     // oleDbSelectCommand1
     //
     this.oleDbSelectCommand1.CommandText = "SELECT     [Last]\r\nFROM         Composer";
     this.oleDbSelectCommand1.Connection  = this.oleDbConnection1;
     //
     // oleDbDataAdapter1
     //
     this.oleDbDataAdapter1.InsertCommand = this.oleDbInsertCommand;
     this.oleDbDataAdapter1.SelectCommand = this.oleDbSelectCommand1;
     this.oleDbDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
         new System.Data.Common.DataTableMapping("Table", "Composer", new System.Data.Common.DataColumnMapping[] {
             new System.Data.Common.DataColumnMapping("Last", "Last")
         })
     });
     //
     // oleDbSelectCommand2
     //
     this.oleDbSelectCommand2.CommandText = "SELECT     [Last], Opus\r\nFROM         Opus";
     this.oleDbSelectCommand2.Connection  = this.oleDbConnection1;
     //
     // oleDbDataAdapter2
     //
     this.oleDbDataAdapter2.SelectCommand = this.oleDbSelectCommand2;
     this.oleDbDataAdapter2.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
         new System.Data.Common.DataTableMapping("Table", "Opus", new System.Data.Common.DataColumnMapping[] {
             new System.Data.Common.DataColumnMapping("Last", "Last"),
             new System.Data.Common.DataColumnMapping("Opus", "Opus")
         })
     });
     //
     // oleDbInsertCommand
     //
     this.oleDbInsertCommand.CommandText = "INSERT INTO `Composer` (`Last`) VALUES (?)";
     this.oleDbInsertCommand.Connection  = this.oleDbConnection1;
     this.oleDbInsertCommand.Parameters.AddRange(new System.Data.OleDb.OleDbParameter[] {
         new System.Data.OleDb.OleDbParameter("p1", System.Data.OleDb.OleDbType.VarWChar, 0, "Last")
     });
     //
     // dbcCombo
     //
     this.dbcCombo.AddItemSeparator    = ';';
     this.dbcCombo.Caption             = "";
     this.dbcCombo.CaptionHeight       = 17;
     this.dbcCombo.CaptionStyle        = style9;
     this.dbcCombo.CharacterCasing     = System.Windows.Forms.CharacterCasing.Normal;
     this.dbcCombo.ColumnCaptionHeight = 17;
     this.dbcCombo.ColumnFooterHeight  = 17;
     this.dbcCombo.ColumnHeaders       = false;
     this.dbcCombo.ColumnWidth         = 100;
     this.dbcCombo.ContentHeight       = 15;
     this.dbcCombo.DataMember          = "Composer";
     this.dbcCombo.DataSource          = this.dataSet11;
     this.dbcCombo.DeadAreaBackColor   = System.Drawing.Color.Empty;
     this.dbcCombo.DisplayMember       = "Last";
     this.dbcCombo.EditorBackColor     = System.Drawing.SystemColors.Window;
     this.dbcCombo.EditorFont          = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
     this.dbcCombo.EditorForeColor     = System.Drawing.SystemColors.WindowText;
     this.dbcCombo.EditorHeight        = 15;
     this.dbcCombo.EvenRowStyle        = style10;
     this.dbcCombo.FlatStyle           = C1.Win.C1List.FlatModeEnum.Standard;
     this.dbcCombo.FooterStyle         = style11;
     this.dbcCombo.GapHeight           = 2;
     this.dbcCombo.HeadingStyle        = style12;
     this.dbcCombo.HighLightRowStyle   = style13;
     this.dbcCombo.Images.Add(((System.Drawing.Image)(resources.GetObject("dbcCombo.Images"))));
     this.dbcCombo.ItemHeight        = 15;
     this.dbcCombo.Location          = new System.Drawing.Point(32, 48);
     this.dbcCombo.MatchEntryTimeout = ((long)(100));
     this.dbcCombo.MaxDropDownItems  = ((short)(5));
     this.dbcCombo.MaxLength         = 32767;
     this.dbcCombo.MouseCursor       = System.Windows.Forms.Cursors.Default;
     this.dbcCombo.Name               = "dbcCombo";
     this.dbcCombo.OddRowStyle        = style14;
     this.dbcCombo.RowDivider.Color   = System.Drawing.Color.DarkGray;
     this.dbcCombo.RowDivider.Style   = C1.Win.C1List.LineStyleEnum.None;
     this.dbcCombo.RowSubDividerColor = System.Drawing.Color.DarkGray;
     this.dbcCombo.SelectedStyle      = style15;
     this.dbcCombo.Size               = new System.Drawing.Size(160, 21);
     this.dbcCombo.Style              = style16;
     this.dbcCombo.TabIndex           = 1;
     this.dbcCombo.Text               = "c1Combo1";
     this.dbcCombo.Change            += new C1.Win.C1List.ChangeEventHandler(this.dbcCombo_Change);
     this.dbcCombo.PropBag            = resources.GetString("dbcCombo.PropBag");
     //
     // dataSet11
     //
     this.dataSet11.DataSetName = "DataSet1";
     //
     // Form1
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(480, 293);
     this.Controls.Add(this.dbcCombo);
     this.Controls.Add(this.dblOpus);
     this.Name  = "Form1";
     this.Text  = "C1List .Net Tutorial4";
     this.Load += new System.EventHandler(this.Form1_Load);
     ((System.ComponentModel.ISupportInitialize)(this.dblOpus)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.dataSet21)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.dbcCombo)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.dataSet11)).EndInit();
     this.ResumeLayout(false);
 }
Пример #31
0
        public void SaveScenarioProperties()
        {
            string strTemp1;
            string strTemp2;
            string strSQL  = "";
            bool   bCore   = false;
            string strDesc = "";

            if (this.lstScenario.Visible == true)             //new scenario
            {
                //validate the input
                //Optimization id
                if (this.txtScenarioId.Text.Length == 0)
                {
                    MessageBox.Show("Enter A Unique Optimization scenario Id");
                    this.txtScenarioId.Focus();
                    return;
                }

                //check for duplicate scenario id
                if (this.lstScenario.Items.Count > 0)
                {
                    strTemp2 = this.txtScenarioId.Text.Trim();
                    for (int x = 0; x <= this.lstScenario.Items.Count - 1; x++)
                    {
                        strTemp1 = this.lstScenario.Items[x].ToString().Trim();
                        if (strTemp1.ToUpper() == strTemp2.ToUpper())
                        {
                            MessageBox.Show("Cannot have a duplicate Optimization scenario id");
                            this.txtScenarioId.Focus();
                            return;
                        }
                    }
                }

                //make sure user entered scenario path
                if (this.txtScenarioPath.Text.Length > 0)
                {
                    //create the scenario path if it does not exist and
                    //copy the scenario_results.mdb to it
                    try
                    {
                        if (!System.IO.Directory.Exists(this.txtScenarioPath.Text))
                        {
                            System.IO.Directory.CreateDirectory(this.txtScenarioPath.Text);
                            System.IO.Directory.CreateDirectory(this.txtScenarioPath.Text.ToString() + "\\db");
                            //copy default scenario_results database to the new project directory
                            string strSourceFile = ((frmMain)this.ParentForm.ParentForm).frmProject.uc_project1.m_strProjectDirectory + "\\" + ScenarioType + "\\db\\scenario_results.mdb";
                            string strDestFile   = this.txtScenarioPath.Text + "\\db\\scenario_results.mdb";
                            System.IO.File.Copy(strSourceFile, strDestFile, true);
                        }
                    }
                    catch
                    {
                        MessageBox.Show("Error Creating Folder");
                        return;
                    }
                }
                else
                {
                    MessageBox.Show("Enter A Directory Location To Save Optimization scenario Files");
                    this.txtScenarioPath.Focus();
                    return;
                }



                //copy the project data source values to the scenario data source
                ado_data_access p_ado           = new ado_data_access();
                string          strProjDBDir    = ((frmMain)this.ParentForm.ParentForm).frmProject.uc_project1.m_strProjectDirectory + "\\db";
                string          strProjFile     = "project.mdb";
                StringBuilder   strProjFullPath = new StringBuilder(strProjDBDir);
                strProjFullPath.Append("\\");
                strProjFullPath.Append(strProjFile);
                string strProjConn = p_ado.getMDBConnString(strProjFullPath.ToString(), "admin", "");
                System.Data.OleDb.OleDbConnection p_OleDbProjConn = new System.Data.OleDb.OleDbConnection();
                p_ado.OpenConnection(strProjConn, ref p_OleDbProjConn);


                string        strScenarioDBDir    = ((frmMain)this.ParentForm.ParentForm).frmProject.uc_project1.m_strProjectDirectory + "\\" + ScenarioType + "\\db";
                string        strScenarioFile     = "scenario_" + ScenarioType + "_rule_definitions.mdb";
                StringBuilder strScenarioFullPath = new StringBuilder(strScenarioDBDir);
                strScenarioFullPath.Append("\\");
                strScenarioFullPath.Append(strScenarioFile);
                string strScenarioConn = p_ado.getMDBConnString(strScenarioFullPath.ToString(), "admin", "");
                p_ado.OpenConnection(strScenarioConn);


                if (p_ado.m_intError == 0)
                {
                    if (this.txtDescription.Text.Trim().Length > 0)
                    {
                        strDesc = p_ado.FixString(this.txtDescription.Text.Trim(), "'", "''");
                    }
                    strSQL = "INSERT INTO scenario (scenario_id,description,Path,File) VALUES " + "('" + this.txtScenarioId.Text.Trim() + "'," +
                             "'" + strDesc + "'," +
                             "'" + this.txtScenarioPath.Text.Trim() + "','scenario_" + ScenarioType + "_rule_definitions.mdb');";
                    //"'" + this.txtScenarioMDBFile.Text.Trim() + "');";
                    p_ado.SqlNonQuery(p_ado.m_OleDbConnection, strSQL);

                    p_ado.SqlQueryReader(p_OleDbProjConn, "select * from datasource");
                    if (p_ado.m_intError == 0)
                    {
                        try
                        {
                            while (p_ado.m_OleDbDataReader.Read())
                            {
                                bCore = false;
                                switch (p_ado.m_OleDbDataReader["table_type"].ToString().Trim().ToUpper())
                                {
                                case "PLOT":
                                    bCore = true;
                                    break;

                                case "CONDITION":
                                    bCore = true;
                                    break;

                                //case "FIRE AND FUEL EFFECTS":
                                //	bCore = true;
                                //	break;
                                case "HARVEST COSTS":
                                    bCore = true;
                                    break;

                                case "TREATMENT PRESCRIPTIONS":
                                    bCore = true;
                                    break;

                                case "TREE VOLUMES AND VALUES BY SPECIES AND DIAMETER GROUPS":
                                    bCore = true;
                                    break;

                                case "TRAVEL TIMES":
                                    bCore = true;
                                    break;

                                case "PROCESSING SITES":
                                    bCore = true;
                                    break;

                                case "TREE SPECIES AND DIAMETER GROUPS DOLLAR VALUES":
                                    bCore = true;
                                    break;

                                case "PLOT AND CONDITION RECORD AUDIT":
                                    bCore = true;
                                    break;

                                case "PLOT, CONDITION AND TREATMENT RECORD AUDIT":
                                    bCore = true;
                                    break;

                                default:
                                    break;
                                }
                                if (bCore == true)
                                {
                                    strSQL = "INSERT INTO scenario_datasource (scenario_id,table_type,Path,file,table_name) VALUES " + "('" + this.txtScenarioId.Text.Trim() + "'," +
                                             "'" + p_ado.m_OleDbDataReader["table_type"].ToString().Trim() + "'," +
                                             "'" + p_ado.m_OleDbDataReader["path"].ToString().Trim() + "'," +
                                             "'" + p_ado.m_OleDbDataReader["file"].ToString().Trim() + "'," +
                                             "'" + p_ado.m_OleDbDataReader["table_name"].ToString().Trim() + "');";
                                    p_ado.SqlNonQuery(p_ado.m_OleDbConnection, strSQL);
                                }
                            }
                        }
                        catch (Exception caught)
                        {
                            intError = -1;
                            strError = caught.Message;
                            MessageBox.Show(strError);
                        }
                        if (p_ado.m_intError == 0)
                        {
                            if (ScenarioType.Trim().ToUpper() == "OPTIMIZER")
                            {
                                ((frmOptimizerScenario)ParentForm).uc_datasource1.strScenarioId        = this.txtScenarioId.Text.Trim();
                                ((frmOptimizerScenario)ParentForm).uc_datasource1.strDataSourceMDBFile = ((frmMain)ParentForm.ParentForm).frmProject.uc_project1.txtRootDirectory.Text.Trim() + "\\" + ScenarioType + "\\db\\scenario_" + ScenarioType + "_rule_definitions.mdb";
                                ((frmOptimizerScenario)ParentForm).uc_datasource1.strDataSourceTable   = "scenario_datasource";
                                ((frmOptimizerScenario)ParentForm).uc_datasource1.strProjectDirectory  = ((frmMain)ParentForm.ParentForm).frmProject.uc_project1.txtRootDirectory.Text.Trim();
                            }
                            else
                            {
                                this.ReferenceProcessorScenarioForm.uc_datasource1.strScenarioId        = this.txtScenarioId.Text.Trim();
                                this.ReferenceProcessorScenarioForm.uc_datasource1.strDataSourceMDBFile = ((frmMain)ParentForm.ParentForm).frmProject.uc_project1.txtRootDirectory.Text.Trim() + "\\" + ScenarioType + "\\db\\scenario_" + ScenarioType + "_rule_definitions.mdb";
                                this.ReferenceProcessorScenarioForm.uc_datasource1.strDataSourceTable   = "scenario_datasource";
                                this.ReferenceProcessorScenarioForm.uc_datasource1.strProjectDirectory  = ((frmMain)ParentForm.ParentForm).frmProject.uc_project1.txtRootDirectory.Text.Trim();
                            }
                        }
                        p_ado.m_OleDbDataReader.Close();
                        p_ado.m_OleDbDataReader = null;
                        p_ado.m_OleDbCommand    = null;
                        p_OleDbProjConn.Close();
                        p_OleDbProjConn = null;
                    }
                    if (ScenarioType.Trim().ToUpper() == "OPTIMIZER")
                    {
                        string strTemp = p_ado.FixString("SELECT @@PlotTable@@.* FROM @@PlotTable@@ WHERE @@PlotTable@@.plot_accessible_yn='Y'", "'", "''");
                        strSQL = "INSERT INTO scenario_plot_filter (scenario_id,sql_command,current_yn) VALUES " + "('" + this.txtScenarioId.Text.Trim() + "'," +
                                 "'" + strTemp + "'," +
                                 "'Y');";
                        p_ado.SqlNonQuery(p_ado.m_OleDbConnection, strSQL);

                        strTemp = p_ado.FixString("SELECT @@CondTable@@.* FROM @@CondTable@@", "'", "''");
                        strSQL  = "INSERT INTO scenario_cond_filter (scenario_id,sql_command,current_yn) VALUES " + "('" + this.txtScenarioId.Text.Trim() + "'," +
                                  "'" + strTemp + "'," +
                                  "'Y');";
                        p_ado.SqlNonQuery(p_ado.m_OleDbConnection, strSQL);
                    }
                }
                p_ado.m_OleDbConnection.Close();
                p_ado.m_OleDbConnection = null;
                p_ado = null;


                this.btnCancel.Enabled = false;
                this.btnOpen.Enabled   = true;

                this.lstScenario.Enabled     = true;
                this.txtScenarioId.Visible   = false;
                this.lblNewScenario.Visible  = false;
                this.txtScenarioPath.Enabled = false;
                this.lstScenario.Items.Add(this.txtScenarioId.Text);
                this.lstScenario.SelectedIndex = this.lstScenario.Items.Count - 1;
            }
            else
            {
                ado_data_access p_ado = new ado_data_access();

                System.Data.OleDb.OleDbConnection oConn = new System.Data.OleDb.OleDbConnection();
                string strProjDir     = ((frmMain)this.ParentForm.ParentForm).frmProject.uc_project1.m_strProjectDirectory;
                string strScenarioDir = ((frmMain)this.ParentForm.ParentForm).frmProject.uc_project1.m_strProjectDirectory + "\\" + ScenarioType + "\\db";
                string strFile        = "scenario_" + ScenarioType + "_rule_definitions.mdb";
                if (ScenarioType.Trim().ToUpper() == "OPTIMIZER")
                {
                    ((frmOptimizerScenario)ParentForm).uc_datasource1.strScenarioId        = this.txtScenarioId.Text.Trim();
                    ((frmOptimizerScenario)ParentForm).uc_datasource1.strDataSourceMDBFile = strScenarioDir + "\\scenario_" + ScenarioType + "_rule_definitions.mdb";
                    ((frmOptimizerScenario)ParentForm).uc_datasource1.strDataSourceTable   = "scenario_datasource";
                    ((frmOptimizerScenario)ParentForm).uc_datasource1.strProjectDirectory  = strProjDir;
                }
                else
                {
                    this.ReferenceProcessorScenarioForm.uc_datasource1.strScenarioId        = this.txtScenarioId.Text.Trim();
                    this.ReferenceProcessorScenarioForm.uc_datasource1.strDataSourceMDBFile = strScenarioDir + "\\scenario_" + ScenarioType + "_rule_definitions.mdb";
                    this.ReferenceProcessorScenarioForm.uc_datasource1.strDataSourceTable   = "scenario_datasource";
                    this.ReferenceProcessorScenarioForm.uc_datasource1.strProjectDirectory  = strProjDir;
                }
                StringBuilder strFullPath = new StringBuilder(strScenarioDir);
                strFullPath.Append("\\");
                strFullPath.Append(strFile);
                if (this.txtDescription.Text.Trim().Length > 0)
                {
                    strDesc = p_ado.FixString(this.txtDescription.Text.Trim(), "'", "''");
                }
                string strConn = p_ado.getMDBConnString(strFullPath.ToString(), "admin", "");
                //string strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + strFullPath.ToString() + ";User Id=admin;Password=;";
                strSQL = "UPDATE scenario SET description = '" +
                         strDesc +
                         "' WHERE scenario_id = '" + this.txtScenarioId.Text.ToLower() + "';";
                p_ado.SqlNonQuery(strConn, strSQL);
                p_ado = null;
            }
            if (ScenarioType.Trim().ToUpper() == "OPTIMIZER")
            {
                if (((frmOptimizerScenario)this.ParentForm).m_bScenarioOpen == false)
                {
                    ((frmOptimizerScenario)this.ParentForm).Text = "Core Analysis: Optimization Scenario (" + this.txtScenarioId.Text.Trim() + ")";
                    ((frmOptimizerScenario)this.ParentForm).SetMenu("scenario");
                    ((frmOptimizerScenario)this.ParentForm).m_bScenarioOpen = true;
                    this.lblTitle.Text = "";
                    this.Visible       = false;
                }
            }
            else
            {
                if (this.ReferenceProcessorScenarioForm.m_bScenarioOpen == false)
                {
                    this.ReferenceProcessorScenarioForm.Text            = "Processor: Scenario (" + this.txtScenarioId.Text.Trim() + ")";
                    this.ReferenceProcessorScenarioForm.m_bScenarioOpen = true;
                    this.lblTitle.Text = "";
                    this.Visible       = false;
                }
            }
        }
Пример #32
0
        public static void ActualizaenDBF()
        {
            //string sConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + System.IO.Path.GetDirectoryName(path) + ";Extended Properties=dBASE IV;";
            string sConn     = "Provider = vfpoledb.1;Data Source=" + System.IO.Path.GetDirectoryName(path) + ";Collating Sequence=general";
            string producto  = "";
            string validavta = "";
            // Gets the Calendar instance associated with a CultureInfo.
            CultureInfo myCI  = new CultureInfo("en-US");
            Calendar    myCal = myCI.Calendar;
            // Gets the DTFI properties required by GetWeekOfYear.
            CalendarWeekRule myCWR      = myCI.DateTimeFormat.CalendarWeekRule;
            DayOfWeek        myFirstDOW = myCI.DateTimeFormat.FirstDayOfWeek;

            //validacion de errores
            bool ActSCACODI  = false;
            bool InsSCCCSXN  = false;
            bool InsSCDRSXN  = false;
            bool ActSCACSAL  = false;
            bool ActSCACSALP = false;
            // Datos para hacer rollback
            string codigo1_ant = "";
            string codigo2_ant = "";
            string codigo      = "";

            string[]        datscasal = new string[3];
            List <string[]> scasal    = new List <string[]>();
            List <string[]> scasalp   = new List <string[]>();

            //Valida semanas anteriores
            int min_week = Convert.ToInt32(Hoy.ToString("yyyy") + Convert.ToString(myCal.GetWeekOfYear(Hoy, myCWR, myFirstDOW)).PadLeft(2).Replace(" ", "0"));

            DataTable datos = new DataTable();

            try
            {
                ValidaProductoVentas();

                //Lleno datos iniciales
                datos = ListaVentas();
            }
            catch (Exception ex)
            {
                ActualizaLogVentas("", "Error en Obtención de datos de SLQ Server.", ex.Message, proceso_log);
                return;
            }

            using (System.Data.OleDb.OleDbConnection dbConn = new System.Data.OleDb.OleDbConnection(sConn))
            {
                try
                {
                    // Abro conexión
                    dbConn.Open();
                }
                catch (Exception ex)
                {
                    ActualizaLogVentas("", "Error en encontrar DBF.", ex.Message, proceso_log);
                    return;
                }

                foreach (DataRow venta in datos.Rows)
                {
                    producto = venta["product_id"].ToString();

                    // variables
                    string codigo1 = "";
                    string codigo2 = "";

                    int weekofyear = myCal.GetWeekOfYear(Convert.ToDateTime(venta["fecha_vta"]), myCWR, myFirstDOW);
                    //Valida la menor semana q se está actualizando
                    if (Convert.ToInt32(Convert.ToDateTime(venta["fecha_vta"]).ToString("yyyy") + Convert.ToString(weekofyear).PadLeft(2).Replace(" ", "0")) < min_week)
                    {
                        min_week = Convert.ToInt32(Convert.ToDateTime(venta["fecha_vta"]).ToString("yyyy") + Convert.ToString(weekofyear).PadLeft(2).Replace(" ", "0"));
                    }
                    try
                    {
                        if (validavta != venta["id_venta"].ToString())
                        {
                            // Se Setean en False (Nueva Venta)
                            ActSCACODI  = false;
                            InsSCCCSXN  = false;
                            InsSCDRSXN  = false;
                            ActSCACSAL  = false;
                            ActSCACSALP = false;
                            // se limpian variables para hacer rollback
                            codigo1_ant = "";
                            codigo2_ant = "";
                            scasal.Clear();
                            scasalp.Clear();

                            //**-- CODIGO
                            //-------------------------------------
                            // Obtengo código
                            //-------------------------------------
                            string consulta = "SELECT TAB_CPAR2,TAB_CPAR1 FROM SCACODI WHERE TAB_EMPRE='02' And TAB_TIPO='090' And TAB_CTAB = '004'";
                            System.Data.OleDb.OleDbCommand     con  = new System.Data.OleDb.OleDbCommand(consulta, dbConn);
                            System.Data.OleDb.OleDbDataAdapter cona = new System.Data.OleDb.OleDbDataAdapter(con);
                            DataTable dt = new DataTable();
                            cona.Fill(dt);

                            foreach (DataRow r in dt.Rows)
                            {
                                codigo1_ant = Convert.ToString(r["TAB_CPAR2"]).Trim();
                                codigo2_ant = Convert.ToString(r["TAB_CPAR1"]).Trim();
                                if (Convert.ToString(r["TAB_CPAR2"]).Trim() == Hoy.ToString("yyyy"))
                                {
                                    codigo1 = Convert.ToString(r["TAB_CPAR2"]).Trim();
                                    codigo2 = Convert.ToString(Convert.ToInt32(r["TAB_CPAR1"]) + 1).PadLeft(8).Replace(" ", "0");
                                }
                                else
                                {
                                    codigo1 = Hoy.ToString("yyyy");
                                    codigo2 = Convert.ToString(1).Trim().PadLeft(8).Replace(" ", "0");
                                }
                                codigo = codigo1 + codigo2;
                            }

                            //-------------------------------------
                            // Actualizo datos
                            //-------------------------------------
                            string actualiza = "UPDATE SCACODI SET TAB_CPAR1='" + codigo2 + "',TAB_CPAR2='" + codigo1 + "'  WHERE TAB_EMPRE='" + empresa + "' And TAB_TIPO='090' And TAB_CTAB = '004'";
                            System.Data.OleDb.OleDbCommand act = new System.Data.OleDb.OleDbCommand(actualiza, dbConn);
                            act.ExecuteNonQuery();
                            ActSCACODI = true;

                            //**-- MOVIMIENTO
                            //-------------------------------------
                            // Ingreso datos de Movimiento Cabecera
                            //-------------------------------------
                            string mov_cab = "Insert Into SCCCSXN (CSXN_ALMAC, CSXN_CODIG, CSXN_FSALI, CSXN_CONCE, CSXN_ENTID, CSXN_GGUIA, CSXN_ESTAD, CSXN_TUCAL, CSXN_TUNCA, CSXN_TENTI, CSXN_TDOC1, CSXN_NDOC1, CSXN_TDOC2, CSXN_NDOC2, CSXN_SECCI, CSXN_HSALI, CSXN_PROVE, CSXN_DESTI, CSXN_AORIG, CSXN_OBSER, CSXN_EMPRE, CSXN_CANAL, CSXN_CADEN, CSXN_NMOVC, CSXN_FLASE, CSXN_UUSUA, CSXN_FUACT, CSXN_HUACT, CSXN_FTX, CSXN_FTXAQ, CSXN_TXLX, CSXN_LOG) ";
                            mov_cab += "VALUES ('" + almacen + "','" + codigo + "',CTOD('" + venta["fecha_vta"].ToString() + "'),'" + concepto + "', '" + client + "', '',''," + venta["cant_calzado"].ToString() + "," + venta["cant_no_calzado"].ToString() + ",'','" + venta["tpdoc"].ToString() + "','" + venta["nro_doc"].ToString() + "','" + venta["tp_ped"].ToString() + "','" + venta["cod_ped"].ToString() + "','" + almacen + "','" + venta["hora_vta"].ToString() + "','','','','Venta por E-Commerce Pedido: " + venta["cod_ped"].ToString() + "','" + empresa + "','" + canal + "','" + cadena + "','','','E-COM',CTOD('" + venta["fecha_reg"].ToString() + "'),'" + venta["hora_reg"].ToString() + "','','','','" + Hoy.ToString("yyyy-MM-dd HH:mm:ss") + " E-COMMERCE')";
                            System.Data.OleDb.OleDbCommand mov1 = new System.Data.OleDb.OleDbCommand(mov_cab, dbConn);
                            mov1.ExecuteNonQuery();
                            InsSCCCSXN = true;
                        }

                        //-------------------------------------
                        // Ingreso datos de Movimiento Detalle
                        //-------------------------------------
                        string cadenaMED = "";
                        if (venta["col_med"].ToString().PadLeft(2).Replace(" ", "0") == "00")
                        {
                            cadenaMED = "RSXN_MED00, RSXN_MED01, RSXN_MED02, RSXN_MED03, RSXN_MED04, RSXN_MED05, RSXN_MED06, RSXN_MED07, RSXN_MED08, RSXN_MED09, RSXN_MED10, RSXN_MED11";
                        }
                        else if (venta["col_med"].ToString().PadLeft(2).Replace(" ", "0") == "01")
                        {
                            cadenaMED = "RSXN_MED01, RSXN_MED00, RSXN_MED02, RSXN_MED03, RSXN_MED04, RSXN_MED05, RSXN_MED06, RSXN_MED07, RSXN_MED08, RSXN_MED09, RSXN_MED10, RSXN_MED11";
                        }
                        else if (venta["col_med"].ToString().PadLeft(2).Replace(" ", "0") == "02")
                        {
                            cadenaMED = "RSXN_MED02, RSXN_MED01, RSXN_MED00, RSXN_MED03, RSXN_MED04, RSXN_MED05, RSXN_MED06, RSXN_MED07, RSXN_MED08, RSXN_MED09, RSXN_MED10, RSXN_MED11";
                        }
                        else if (venta["col_med"].ToString().PadLeft(2).Replace(" ", "0") == "03")
                        {
                            cadenaMED = "RSXN_MED03, RSXN_MED01, RSXN_MED02, RSXN_MED00, RSXN_MED04, RSXN_MED05, RSXN_MED06, RSXN_MED07, RSXN_MED08, RSXN_MED09, RSXN_MED10, RSXN_MED11";
                        }
                        else if (venta["col_med"].ToString().PadLeft(2).Replace(" ", "0") == "04")
                        {
                            cadenaMED = "RSXN_MED04, RSXN_MED01, RSXN_MED02, RSXN_MED03, RSXN_MED00, RSXN_MED05, RSXN_MED06, RSXN_MED07, RSXN_MED08, RSXN_MED09, RSXN_MED10, RSXN_MED11";
                        }
                        else if (venta["col_med"].ToString().PadLeft(2).Replace(" ", "0") == "05")
                        {
                            cadenaMED = "RSXN_MED05, RSXN_MED01, RSXN_MED02, RSXN_MED03, RSXN_MED04, RSXN_MED00, RSXN_MED06, RSXN_MED07, RSXN_MED08, RSXN_MED09, RSXN_MED10, RSXN_MED11";
                        }
                        else if (venta["col_med"].ToString().PadLeft(2).Replace(" ", "0") == "06")
                        {
                            cadenaMED = "RSXN_MED06, RSXN_MED01, RSXN_MED02, RSXN_MED03, RSXN_MED04, RSXN_MED05, RSXN_MED00, RSXN_MED07, RSXN_MED08, RSXN_MED09, RSXN_MED10, RSXN_MED11";
                        }
                        else if (venta["col_med"].ToString().PadLeft(2).Replace(" ", "0") == "07")
                        {
                            cadenaMED = "RSXN_MED07, RSXN_MED01, RSXN_MED02, RSXN_MED03, RSXN_MED04, RSXN_MED05, RSXN_MED06, RSXN_MED00, RSXN_MED08, RSXN_MED09, RSXN_MED10, RSXN_MED11";
                        }
                        else if (venta["col_med"].ToString().PadLeft(2).Replace(" ", "0") == "08")
                        {
                            cadenaMED = "RSXN_MED08, RSXN_MED01, RSXN_MED02, RSXN_MED03, RSXN_MED04, RSXN_MED05, RSXN_MED06, RSXN_MED07, RSXN_MED00, RSXN_MED09, RSXN_MED10, RSXN_MED11";
                        }
                        else if (venta["col_med"].ToString().PadLeft(2).Replace(" ", "0") == "09")
                        {
                            cadenaMED = "RSXN_MED09, RSXN_MED01, RSXN_MED02, RSXN_MED03, RSXN_MED04, RSXN_MED05, RSXN_MED06, RSXN_MED07, RSXN_MED08, RSXN_MED00, RSXN_MED10, RSXN_MED11";
                        }
                        else if (venta["col_med"].ToString().PadLeft(2).Replace(" ", "0") == "10")
                        {
                            cadenaMED = "RSXN_MED10, RSXN_MED01, RSXN_MED02, RSXN_MED03, RSXN_MED04, RSXN_MED05, RSXN_MED06, RSXN_MED07, RSXN_MED08, RSXN_MED09, RSXN_MED00, RSXN_MED11";
                        }
                        else if (venta["col_med"].ToString().PadLeft(2).Replace(" ", "0") == "11")
                        {
                            cadenaMED = "RSXN_MED11, RSXN_MED01, RSXN_MED02, RSXN_MED03, RSXN_MED04, RSXN_MED05, RSXN_MED06, RSXN_MED07, RSXN_MED08, RSXN_MED09, RSXN_MED10, RSXN_MED00";
                        }
                        string mov_det = "Insert Into SCDRSXN (RSXN_ALMAC, RSXN_CODIG, RSXN_ARTIC, RSXN_CALID, RSXN_CALDV, RSXN_TOUNI, RSXN_CPACK, RSXN_CODPP, RSXN_PPACK, RSXN_ORDCO, RSXN_GPROV, RSXN_RMED, " + cadenaMED + ", RSXN_FECHA, RSXN_EMPRE, RSXN_SECCI, RSXN_PRECI, RSXN_CODV, RSXN_PREDV, RSXN_COSDV, RSXN_CPORC, RSXN_VPORC, RSXN_FLAGC, RSXN_MERC, RSXN_CATEG, RSXN_SUBCA, RSXN_MARCA, RSXN_MERC3, RSXN_CATE3, RSXN_SUBC3, RSXN_MARC3, RSXN_FTXV, RSXN_FTX) ";
                        mov_det += "VALUES ('" + almacen + "','" + codigo + "','" + producto + "', '" + venta["calidad"].ToString() + "', '', " + Convert.ToString(Convert.ToInt32(venta["cant_calzado"]) + Convert.ToInt32(venta["cant_no_calzado"])) + ",'" + pack + "',''," + cant_pack + ",'','','" + venta["tipo_med"].ToString() + "'," + Convert.ToString(Convert.ToInt32(venta["cant_calzado"]) + Convert.ToInt32(venta["cant_no_calzado"])) + ",0,0,0,0,0,0,0,0,0,0,0,CTOD('" + venta["fecha_vta"].ToString() + "'),'" + empresa + "','" + almacen + "'," + venta["precio"].ToString() + "," + venta["costo"].ToString() + ",0.00,0.00,'',0.00,'" + venta["estandar_consig"].ToString() + "','" + venta["linea"].ToString() + "','" + venta["categ"].ToString() + "','" + venta["subcat"].ToString() + "','" + venta["marca"].ToString() + "','" + venta["rims_linea"].ToString() + "','" + venta["rims_categ"].ToString() + "','" + venta["rims_subcat"].ToString() + "','" + venta["rims_marca"].ToString() + "','','')";
                        System.Data.OleDb.OleDbCommand mov2 = new System.Data.OleDb.OleDbCommand(mov_det, dbConn);
                        mov2.ExecuteNonQuery();
                        InsSCDRSXN = true;


                        //**-- STOCK
                        //-------------------------------------
                        // Busco datos del producto en tabla 1
                        //-------------------------------------

                        string act_stock_pri = "";
                        datscasal[0]  = producto;
                        datscasal[1]  = Convert.ToString(Convert.ToInt32(venta["cant_calzado"]) + Convert.ToInt32(venta["cant_no_calzado"]));
                        datscasal[2]  = venta["col_med"].ToString();
                        act_stock_pri = "UPDATE SCACSAL SET CSAL_STKTO=CSAL_STKTO-" + datscasal[1] + ", CSAL_SALNO = CSAL_SALNO+" + datscasal[1] + ",CSAL_MED" + venta["col_med"].ToString().PadLeft(2).Replace(" ", "0") + "=CSAL_MED" + venta["col_med"].ToString().PadLeft(2).Replace(" ", "0") + "-" + datscasal[1] + " WHERE CSAL_EMPRE ='" + empresa + "' And CSAL_ANO = '" + Convert.ToDateTime(venta["fecha_vta"]).ToString("yyyy") + "' And CSAL_SEMAN = '" + weekofyear.ToString().PadLeft(2).Replace(" ", "0") + "' And CSAL_ALMAC = '" + almacen + "' And CSAL_CALID = '" + calidad + "' And CSAL_ARTIC='" + producto + "'";
                        // Se ejecuta sentencia
                        System.Data.OleDb.OleDbCommand act_stk1 = new System.Data.OleDb.OleDbCommand(act_stock_pri, dbConn);
                        act_stk1.ExecuteNonQuery();
                        scasal.Add(datscasal);
                        ActSCACSAL = true;


                        string act_stock_seg = "";
                        datscasal[0]  = producto;
                        datscasal[1]  = Convert.ToString(Convert.ToInt32(venta["cant_calzado"]) + Convert.ToInt32(venta["cant_no_calzado"]));
                        datscasal[2]  = venta["col_med"].ToString();
                        act_stock_seg = "UPDATE SCACSALP SET CSAL_STKTO=CSAL_STKTO-" + datscasal[1] + ", CSAL_SALNO = CSAL_SALNO+" + datscasal[1] + ",CSAL_MED" + venta["col_med"].ToString().PadLeft(2).Replace(" ", "0") + "=CSAL_MED" + venta["col_med"].ToString().PadLeft(2).Replace(" ", "0") + "-" + datscasal[1] + " WHERE CSAL_EMPRE ='" + empresa + "' And CSAL_ANO = '" + Convert.ToDateTime(venta["fecha_vta"]).ToString("yyyy") + "' And CSAL_SEMAN = '" + weekofyear.ToString().PadLeft(2).Replace(" ", "0") + "' And CSAL_ALMAC = '" + almacen + "' And CSAL_CALID = '" + calidad + "' And CSAL_ARTIC='" + producto + "' And CSAL_CPACK='" + pack + "'";                                // Se ejecuta sentencia
                        System.Data.OleDb.OleDbCommand act_stk2 = new System.Data.OleDb.OleDbCommand(act_stock_seg, dbConn);
                        act_stk2.ExecuteNonQuery();
                        scasalp.Add(datscasal);
                        ActSCACSALP = true;
                        // Termina de Actualizar y actualiza en la BD P = PROCESADO
                        ActualizaVentas(venta["id_venta"].ToString(), "P");
                    }
                    catch (Exception ex)
                    {
                        // RollBack Manual

                        /*if (ActSCACODI)
                         * {
                         *  string actualiza_rb = "UPDATE SCACODI SET TAB_CPAR1='" + codigo2_ant + "',TAB_CPAR2='" + codigo1_ant + "' WHERE TAB_EMPRE='"+empresa+"' And TAB_TIPO='090' And TAB_CTAB = '004'";
                         *  System.Data.OleDb.OleDbCommand act_rb = new System.Data.OleDb.OleDbCommand(actualiza_rb, dbConn);
                         *  act_rb.ExecuteNonQuery();
                         * }*/
                        if (InsSCCCSXN)
                        {
                            string mov_cab_rb = "DELETE FROM SCCCSXN WHERE CSXN_ALMAC='" + almacen + "' And CSXN_CODIG='" + codigo + "'";
                            System.Data.OleDb.OleDbCommand mov1_rb = new System.Data.OleDb.OleDbCommand(mov_cab_rb, dbConn);
                            mov1_rb.ExecuteNonQuery();
                        }
                        if (InsSCDRSXN)
                        {
                            string mov_det_rb = "DELETE FROM SCDRSXN WHERE RSXN_ALMAC='" + almacen + "' And RSXN_CODIG='" + codigo + "'";
                            System.Data.OleDb.OleDbCommand mov2_rb = new System.Data.OleDb.OleDbCommand(mov_det_rb, dbConn);
                            mov2_rb.ExecuteNonQuery();
                        }
                        if (ActSCACSAL)
                        {
                            foreach (string[] dat_rb in scasal)
                            {
                                string act_stock_pri_rb = "UPDATE SCACSAL SET CSAL_STKTO=CSAL_STKTO+" + dat_rb[1].ToString() + ", CSAL_SALNO=CSAL_SALNO-" + dat_rb[1].ToString() + ", CSAL_MED" + dat_rb[2].ToString().PadLeft(2).Replace(" ", "0") + "=CSAL_MED" + dat_rb[2].ToString().PadLeft(2).Replace(" ", "0") + "-" + dat_rb[1].ToString() + " WHERE CSAL_ANO = '" + Hoy.ToString("yyyy") + "' And CSAL_SEMAN = '" + weekofyear.ToString().PadLeft(2).Replace(" ", "0") + "' And CSAL_ALMAC = '" + almacen + "' And CSAL_ARTIC='" + dat_rb[0].ToString() + "' And CSAL_CALID = '" + calidad + "' And CSAL_EMPRE ='" + empresa + "'";
                                System.Data.OleDb.OleDbCommand act_stk1_rb = new System.Data.OleDb.OleDbCommand(act_stock_pri_rb, dbConn);
                                act_stk1_rb.ExecuteNonQuery();
                            }
                        }
                        if (ActSCACSALP)
                        {
                            foreach (string[] dat_rb in scasalp)
                            {
                                string act_stock_seg_rb = "UPDATE SCACSAL SET CSAL_STKTO=CSAL_STKTO+" + dat_rb[1].ToString() + ", CSAL_SALNO=CSAL_SALNO-" + dat_rb[1].ToString() + ", CSAL_MED" + dat_rb[2].ToString().PadLeft(2).Replace(" ", "0") + "=CSAL_MED" + dat_rb[2].ToString().PadLeft(2).Replace(" ", "0") + "-" + dat_rb[1].ToString() + " WHERE CSAL_ANO = '" + Hoy.ToString("yyyy") + "' And CSAL_SEMAN = '" + weekofyear.ToString().PadLeft(2).Replace(" ", "0") + "' And CSAL_ALMAC = '" + almacen + "' And CSAL_ARTIC='" + dat_rb[0].ToString() + "' And CSAL_CALID = '" + calidad + "' And CSAL_EMPRE ='" + empresa + "' And CSAL_CPACK='" + pack + "'";
                                System.Data.OleDb.OleDbCommand act_stk2_rb = new System.Data.OleDb.OleDbCommand(act_stock_seg_rb, dbConn);
                                act_stk2_rb.ExecuteNonQuery();
                            }
                        }
                        // Se realiza RollBack del Estado en la BD si es necesario "" ROLLBACK
                        ActualizaVentas(venta["id_venta"].ToString(), "");
                        ActualizaLogVentas(venta["id_venta"].ToString(), "Error en Actualización de DBF.", ex.Message, proceso_log);
                    }
                    validavta = venta["id_venta"].ToString();
                }// fin foreach
                try
                {
                    //Se termina transacción y cerramos conexión
                    if (min_week < Convert.ToInt32(Hoy.ToString("yyyy") + Convert.ToString(myCal.GetWeekOfYear(Hoy, myCWR, myFirstDOW)).PadLeft(2).Replace(" ", "0")))
                    {
                        Envia_correo();
                    }
                    dbConn.Close();
                }
                catch (Exception ex)
                {
                    ActualizaLogVentas("", "Error en Cierre de Conexión a DBF.", ex.Message, proceso_log);
                    //tran.Rollback();
                    //throw ex;
                }
            }// fin using
        }
Пример #33
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
     Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor gridColumnDescriptor1 = new Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor();
     Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor gridColumnDescriptor2 = new Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor();
     Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor gridColumnDescriptor3 = new Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor();
     Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor gridColumnDescriptor4 = new Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor();
     Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor gridColumnDescriptor5 = new Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor();
     Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor gridColumnDescriptor6 = new Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor();
     Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor gridColumnDescriptor7 = new Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor();
     this.dataset11           = new Grouping_GGC.Dataset1();
     this.oleDbDataAdapter1   = new System.Data.OleDb.OleDbDataAdapter();
     this.oleDbDeleteCommand1 = new System.Data.OleDb.OleDbCommand();
     this.oleDbConnection1    = new System.Data.OleDb.OleDbConnection();
     this.oleDbInsertCommand1 = new System.Data.OleDb.OleDbCommand();
     this.oleDbSelectCommand1 = new System.Data.OleDb.OleDbCommand();
     this.oleDbUpdateCommand1 = new System.Data.OleDb.OleDbCommand();
     this.panel1 = new System.Windows.Forms.Panel();
     this.gridGroupingControl1 = new Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControl();
     this.propertyGrid1        = new System.Windows.Forms.PropertyGrid();
     ((System.ComponentModel.ISupportInitialize)(this.dataset11)).BeginInit();
     this.panel1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.gridGroupingControl1)).BeginInit();
     this.SuspendLayout();
     //
     // dataset11
     //
     this.dataset11.DataSetName             = "Dataset1";
     this.dataset11.Locale                  = new System.Globalization.CultureInfo("en-US");
     this.dataset11.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
     //
     // oleDbDataAdapter1
     //
     this.oleDbDataAdapter1.DeleteCommand = this.oleDbDeleteCommand1;
     this.oleDbDataAdapter1.InsertCommand = this.oleDbInsertCommand1;
     this.oleDbDataAdapter1.SelectCommand = this.oleDbSelectCommand1;
     this.oleDbDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
         new System.Data.Common.DataTableMapping("Table", "Employees", new System.Data.Common.DataColumnMapping[] {
             new System.Data.Common.DataColumnMapping("EmployeeID", "EmployeeID"),
             new System.Data.Common.DataColumnMapping("LastName", "LastName"),
             new System.Data.Common.DataColumnMapping("FirstName", "FirstName"),
             new System.Data.Common.DataColumnMapping("Title", "Title"),
             new System.Data.Common.DataColumnMapping("Address", "Address"),
             new System.Data.Common.DataColumnMapping("City", "City"),
             new System.Data.Common.DataColumnMapping("Country", "Country")
         })
     });
     this.oleDbDataAdapter1.UpdateCommand = this.oleDbUpdateCommand1;
     //
     // oleDbDeleteCommand1
     //
     this.oleDbDeleteCommand1.CommandText = resources.GetString("oleDbDeleteCommand1.CommandText");
     this.oleDbDeleteCommand1.Connection  = this.oleDbConnection1;
     this.oleDbDeleteCommand1.Parameters.AddRange(new System.Data.OleDb.OleDbParameter[] {
         new System.Data.OleDb.OleDbParameter("Original_EmployeeID", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "EmployeeID", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_Address", System.Data.OleDb.OleDbType.VarWChar, 60, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "Address", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_Address1", System.Data.OleDb.OleDbType.VarWChar, 60, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "Address", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_City", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "City", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_City1", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "City", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_Country", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "Country", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_Country1", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "Country", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_FirstName", System.Data.OleDb.OleDbType.VarWChar, 10, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "FirstName", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_LastName", System.Data.OleDb.OleDbType.VarWChar, 20, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "LastName", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_Title", System.Data.OleDb.OleDbType.VarWChar, 30, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "Title", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_Title1", System.Data.OleDb.OleDbType.VarWChar, 30, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "Title", System.Data.DataRowVersion.Original, null)
     });
     //
     // oleDbConnection1
     //
     this.oleDbConnection1.ConnectionString = resources.GetString("oleDbConnection1.ConnectionString");
     //
     // oleDbInsertCommand1
     //
     this.oleDbInsertCommand1.CommandText = "INSERT INTO Employees(LastName, FirstName, Title, Address, City, Country) VALUES " +
                                            "(?, ?, ?, ?, ?, ?)";
     this.oleDbInsertCommand1.Connection = this.oleDbConnection1;
     this.oleDbInsertCommand1.Parameters.AddRange(new System.Data.OleDb.OleDbParameter[] {
         new System.Data.OleDb.OleDbParameter("LastName", System.Data.OleDb.OleDbType.VarWChar, 20, "LastName"),
         new System.Data.OleDb.OleDbParameter("FirstName", System.Data.OleDb.OleDbType.VarWChar, 10, "FirstName"),
         new System.Data.OleDb.OleDbParameter("Title", System.Data.OleDb.OleDbType.VarWChar, 30, "Title"),
         new System.Data.OleDb.OleDbParameter("Address", System.Data.OleDb.OleDbType.VarWChar, 60, "Address"),
         new System.Data.OleDb.OleDbParameter("City", System.Data.OleDb.OleDbType.VarWChar, 15, "City"),
         new System.Data.OleDb.OleDbParameter("Country", System.Data.OleDb.OleDbType.VarWChar, 15, "Country")
     });
     //
     // oleDbSelectCommand1
     //
     this.oleDbSelectCommand1.CommandText = "SELECT EmployeeID, LastName, FirstName, Title, Address, City, Country FROM Employ" +
                                            "ees";
     this.oleDbSelectCommand1.Connection = this.oleDbConnection1;
     //
     // oleDbUpdateCommand1
     //
     this.oleDbUpdateCommand1.CommandText = resources.GetString("oleDbUpdateCommand1.CommandText");
     this.oleDbUpdateCommand1.Connection  = this.oleDbConnection1;
     this.oleDbUpdateCommand1.Parameters.AddRange(new System.Data.OleDb.OleDbParameter[] {
         new System.Data.OleDb.OleDbParameter("LastName", System.Data.OleDb.OleDbType.VarWChar, 20, "LastName"),
         new System.Data.OleDb.OleDbParameter("FirstName", System.Data.OleDb.OleDbType.VarWChar, 10, "FirstName"),
         new System.Data.OleDb.OleDbParameter("Title", System.Data.OleDb.OleDbType.VarWChar, 30, "Title"),
         new System.Data.OleDb.OleDbParameter("Address", System.Data.OleDb.OleDbType.VarWChar, 60, "Address"),
         new System.Data.OleDb.OleDbParameter("City", System.Data.OleDb.OleDbType.VarWChar, 15, "City"),
         new System.Data.OleDb.OleDbParameter("Country", System.Data.OleDb.OleDbType.VarWChar, 15, "Country"),
         new System.Data.OleDb.OleDbParameter("Original_EmployeeID", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "EmployeeID", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_Address", System.Data.OleDb.OleDbType.VarWChar, 60, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "Address", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_Address1", System.Data.OleDb.OleDbType.VarWChar, 60, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "Address", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_City", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "City", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_City1", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "City", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_Country", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "Country", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_Country1", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "Country", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_FirstName", System.Data.OleDb.OleDbType.VarWChar, 10, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "FirstName", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_LastName", System.Data.OleDb.OleDbType.VarWChar, 20, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "LastName", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_Title", System.Data.OleDb.OleDbType.VarWChar, 30, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "Title", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_Title1", System.Data.OleDb.OleDbType.VarWChar, 30, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "Title", System.Data.DataRowVersion.Original, null)
     });
     //
     // panel1
     //
     this.panel1.Controls.Add(this.gridGroupingControl1);
     this.panel1.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.panel1.Location = new System.Drawing.Point(0, 0);
     this.panel1.Name     = "panel1";
     this.panel1.Size     = new System.Drawing.Size(813, 443);
     this.panel1.TabIndex = 0;
     //
     // gridGroupingControl1
     //
     this.gridGroupingControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                               | System.Windows.Forms.AnchorStyles.Left)
                                                                              | System.Windows.Forms.AnchorStyles.Right)));
     this.gridGroupingControl1.BackColor = System.Drawing.SystemColors.Window;
     this.gridGroupingControl1.ChildGroupOptions.ShowAddNewRecordBeforeDetails = false;
     this.gridGroupingControl1.DataSource    = this.dataset11.Employees;
     this.gridGroupingControl1.FreezeCaption = false;
     this.gridGroupingControl1.Location      = new System.Drawing.Point(0, 3);
     this.gridGroupingControl1.Name          = "gridGroupingControl1";
     this.gridGroupingControl1.NestedTableGroupOptions.ShowAddNewRecordBeforeDetails = false;
     this.gridGroupingControl1.ShowGroupDropArea = true;
     this.gridGroupingControl1.Size             = new System.Drawing.Size(585, 437);
     this.gridGroupingControl1.TabIndex         = 2;
     gridColumnDescriptor1.HeaderImage          = null;
     gridColumnDescriptor1.HeaderImageAlignment = Syncfusion.Windows.Forms.Grid.Grouping.HeaderImageAlignment.Left;
     gridColumnDescriptor1.HeaderText           = "Employee ID";
     gridColumnDescriptor1.MappingName          = "EmployeeID";
     gridColumnDescriptor1.SerializedImageArray = "";
     gridColumnDescriptor2.HeaderImage          = null;
     gridColumnDescriptor2.HeaderImageAlignment = Syncfusion.Windows.Forms.Grid.Grouping.HeaderImageAlignment.Left;
     gridColumnDescriptor2.HeaderText           = "Last Name";
     gridColumnDescriptor2.MappingName          = "LastName";
     gridColumnDescriptor2.SerializedImageArray = "";
     gridColumnDescriptor3.HeaderImage          = null;
     gridColumnDescriptor3.HeaderImageAlignment = Syncfusion.Windows.Forms.Grid.Grouping.HeaderImageAlignment.Left;
     gridColumnDescriptor3.HeaderText           = "First Name";
     gridColumnDescriptor3.MappingName          = "FirstName";
     gridColumnDescriptor3.SerializedImageArray = "";
     gridColumnDescriptor4.HeaderImage          = null;
     gridColumnDescriptor4.HeaderImageAlignment = Syncfusion.Windows.Forms.Grid.Grouping.HeaderImageAlignment.Left;
     gridColumnDescriptor4.MappingName          = "Title";
     gridColumnDescriptor4.SerializedImageArray = "";
     gridColumnDescriptor5.HeaderImage          = null;
     gridColumnDescriptor5.HeaderImageAlignment = Syncfusion.Windows.Forms.Grid.Grouping.HeaderImageAlignment.Left;
     gridColumnDescriptor5.MappingName          = "Address";
     gridColumnDescriptor5.SerializedImageArray = "";
     gridColumnDescriptor6.HeaderImage          = null;
     gridColumnDescriptor6.HeaderImageAlignment = Syncfusion.Windows.Forms.Grid.Grouping.HeaderImageAlignment.Left;
     gridColumnDescriptor6.MappingName          = "City";
     gridColumnDescriptor6.SerializedImageArray = "";
     gridColumnDescriptor7.HeaderImage          = null;
     gridColumnDescriptor7.HeaderImageAlignment = Syncfusion.Windows.Forms.Grid.Grouping.HeaderImageAlignment.Left;
     gridColumnDescriptor7.MappingName          = "Country";
     gridColumnDescriptor7.SerializedImageArray = "";
     this.gridGroupingControl1.TableDescriptor.Columns.AddRange(new Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor[] {
         gridColumnDescriptor1,
         gridColumnDescriptor2,
         gridColumnDescriptor3,
         gridColumnDescriptor4,
         gridColumnDescriptor5,
         gridColumnDescriptor6,
         gridColumnDescriptor7
     });
     this.gridGroupingControl1.Text = "gridGroupingControl1";
     this.gridGroupingControl1.TopLevelGroupOptions.ShowAddNewRecordBeforeDetails = false;
     //
     // propertyGrid1
     //
     this.propertyGrid1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                       | System.Windows.Forms.AnchorStyles.Right)));
     this.propertyGrid1.BackColor = System.Drawing.Color.White;
     this.propertyGrid1.CommandsDisabledLinkColor = System.Drawing.Color.White;
     this.propertyGrid1.Font          = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.propertyGrid1.HelpBackColor = System.Drawing.Color.White;
     this.propertyGrid1.LineColor     = System.Drawing.Color.White;
     this.propertyGrid1.Location      = new System.Drawing.Point(591, 0);
     this.propertyGrid1.Name          = "propertyGrid1";
     this.propertyGrid1.Size          = new System.Drawing.Size(222, 443);
     this.propertyGrid1.TabIndex      = 3;
     //
     // Form1
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.ClientSize          = new System.Drawing.Size(813, 443);
     this.Controls.Add(this.propertyGrid1);
     this.Controls.Add(this.panel1);
     this.MinimumSize = new System.Drawing.Size(800, 500);
     this.Name        = "Form1";
     this.Text        = "Multi Column Grouping ";
     ((System.ComponentModel.ISupportInitialize)(this.dataset11)).EndInit();
     this.panel1.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.gridGroupingControl1)).EndInit();
     this.ResumeLayout(false);
 }
Пример #34
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
     this.c1TrueDBGrid1       = new C1.Win.C1TrueDBGrid.C1TrueDBGrid();
     this.dataSet11           = new ToggleGroupRows.DataSet1();
     this.oleDbDataAdapter1   = new System.Data.OleDb.OleDbDataAdapter();
     this.oleDbInsertCommand1 = new System.Data.OleDb.OleDbCommand();
     this.oleDbConnection1    = new System.Data.OleDb.OleDbConnection();
     this.oleDbSelectCommand1 = new System.Data.OleDb.OleDbCommand();
     this.groupBox1           = new System.Windows.Forms.GroupBox();
     this.radioButton4        = new System.Windows.Forms.RadioButton();
     this.radioButton3        = new System.Windows.Forms.RadioButton();
     this.radioButton2        = new System.Windows.Forms.RadioButton();
     this.radioButton1        = new System.Windows.Forms.RadioButton();
     ((System.ComponentModel.ISupportInitialize)(this.c1TrueDBGrid1)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.dataSet11)).BeginInit();
     this.groupBox1.SuspendLayout();
     this.SuspendLayout();
     //
     // c1TrueDBGrid1
     //
     this.c1TrueDBGrid1.DataSource = this.dataSet11.Orders;
     this.c1TrueDBGrid1.DataView   = C1.Win.C1TrueDBGrid.DataViewEnum.GroupBy;
     this.c1TrueDBGrid1.Images.Add(((System.Drawing.Image)(resources.GetObject("c1TrueDBGrid1.Images"))));
     this.c1TrueDBGrid1.Location                         = new System.Drawing.Point(16, 16);
     this.c1TrueDBGrid1.Name                             = "c1TrueDBGrid1";
     this.c1TrueDBGrid1.PreviewInfo.Location             = new System.Drawing.Point(0, 0);
     this.c1TrueDBGrid1.PreviewInfo.Size                 = new System.Drawing.Size(0, 0);
     this.c1TrueDBGrid1.PreviewInfo.ZoomFactor           = 75D;
     this.c1TrueDBGrid1.PrintInfo.MeasurementDevice      = C1.Win.C1TrueDBGrid.PrintInfo.MeasurementDeviceEnum.Screen;
     this.c1TrueDBGrid1.PrintInfo.MeasurementPrinterName = null;
     this.c1TrueDBGrid1.PrintInfo.PageSettings           = ((System.Drawing.Printing.PageSettings)(resources.GetObject("c1TrueDBGrid1.PrintInfo.PageSettings")));
     this.c1TrueDBGrid1.Size                             = new System.Drawing.Size(536, 217);
     this.c1TrueDBGrid1.TabIndex                         = 0;
     this.c1TrueDBGrid1.Text                             = "c1TrueDBGrid1";
     this.c1TrueDBGrid1.RowColChange                    += new C1.Win.C1TrueDBGrid.RowColChangeEventHandler(this.c1TrueDBGrid1_RowColChange);
     this.c1TrueDBGrid1.PropBag                          = resources.GetString("c1TrueDBGrid1.PropBag");
     //
     // dataSet11
     //
     this.dataSet11.DataSetName             = "DataSet1";
     this.dataSet11.Locale                  = new System.Globalization.CultureInfo("en-US");
     this.dataSet11.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
     //
     // oleDbDataAdapter1
     //
     this.oleDbDataAdapter1.InsertCommand = this.oleDbInsertCommand1;
     this.oleDbDataAdapter1.SelectCommand = this.oleDbSelectCommand1;
     this.oleDbDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
         new System.Data.Common.DataTableMapping("Table", "Orders", new System.Data.Common.DataColumnMapping[] {
             new System.Data.Common.DataColumnMapping("OrderID", "OrderID"),
             new System.Data.Common.DataColumnMapping("CustomerID", "CustomerID"),
             new System.Data.Common.DataColumnMapping("EmployeeID", "EmployeeID"),
             new System.Data.Common.DataColumnMapping("OrderDate", "OrderDate"),
             new System.Data.Common.DataColumnMapping("RequiredDate", "RequiredDate"),
             new System.Data.Common.DataColumnMapping("ShippedDate", "ShippedDate"),
             new System.Data.Common.DataColumnMapping("ShipVia", "ShipVia"),
             new System.Data.Common.DataColumnMapping("Freight", "Freight"),
             new System.Data.Common.DataColumnMapping("ShipName", "ShipName"),
             new System.Data.Common.DataColumnMapping("ShipAddress", "ShipAddress"),
             new System.Data.Common.DataColumnMapping("ShipCity", "ShipCity"),
             new System.Data.Common.DataColumnMapping("ShipRegion", "ShipRegion"),
             new System.Data.Common.DataColumnMapping("ShipPostalCode", "ShipPostalCode"),
             new System.Data.Common.DataColumnMapping("ShipCountry", "ShipCountry")
         })
     });
     //
     // oleDbInsertCommand1
     //
     this.oleDbInsertCommand1.CommandText = resources.GetString("oleDbInsertCommand1.CommandText");
     this.oleDbInsertCommand1.Connection  = this.oleDbConnection1;
     this.oleDbInsertCommand1.Parameters.AddRange(new System.Data.OleDb.OleDbParameter[] {
         new System.Data.OleDb.OleDbParameter("CustomerID", System.Data.OleDb.OleDbType.VarWChar, 5, "CustomerID"),
         new System.Data.OleDb.OleDbParameter("EmployeeID", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(10)), ((byte)(0)), "EmployeeID", System.Data.DataRowVersion.Current, null),
         new System.Data.OleDb.OleDbParameter("Freight", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((byte)(19)), ((byte)(0)), "Freight", System.Data.DataRowVersion.Current, null),
         new System.Data.OleDb.OleDbParameter("OrderDate", System.Data.OleDb.OleDbType.DBDate, 0, "OrderDate"),
         new System.Data.OleDb.OleDbParameter("OrderID", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(10)), ((byte)(0)), "OrderID", System.Data.DataRowVersion.Current, null),
         new System.Data.OleDb.OleDbParameter("RequiredDate", System.Data.OleDb.OleDbType.DBDate, 0, "RequiredDate"),
         new System.Data.OleDb.OleDbParameter("ShipAddress", System.Data.OleDb.OleDbType.VarWChar, 60, "ShipAddress"),
         new System.Data.OleDb.OleDbParameter("ShipCity", System.Data.OleDb.OleDbType.VarWChar, 15, "ShipCity"),
         new System.Data.OleDb.OleDbParameter("ShipCountry", System.Data.OleDb.OleDbType.VarWChar, 15, "ShipCountry"),
         new System.Data.OleDb.OleDbParameter("ShipName", System.Data.OleDb.OleDbType.VarWChar, 40, "ShipName"),
         new System.Data.OleDb.OleDbParameter("ShippedDate", System.Data.OleDb.OleDbType.DBDate, 0, "ShippedDate"),
         new System.Data.OleDb.OleDbParameter("ShipPostalCode", System.Data.OleDb.OleDbType.VarWChar, 10, "ShipPostalCode"),
         new System.Data.OleDb.OleDbParameter("ShipRegion", System.Data.OleDb.OleDbType.VarWChar, 15, "ShipRegion"),
         new System.Data.OleDb.OleDbParameter("ShipVia", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(10)), ((byte)(0)), "ShipVia", System.Data.DataRowVersion.Current, null)
     });
     //
     // oleDbConnection1
     //
     this.oleDbConnection1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Program Files\\ComponentOne Studio" +
                                              ".NET 2.0\\Common\\C1Nwind.mdb;";
     //
     // oleDbSelectCommand1
     //
     this.oleDbSelectCommand1.CommandText = "SELECT CustomerID, EmployeeID, Freight, OrderDate, OrderID, RequiredDate, ShipAdd" +
                                            "ress, ShipCity, ShipCountry, ShipName, ShippedDate, ShipPostalCode, ShipRegion, " +
                                            "ShipVia FROM Orders";
     this.oleDbSelectCommand1.Connection = this.oleDbConnection1;
     //
     // groupBox1
     //
     this.groupBox1.Controls.Add(this.radioButton4);
     this.groupBox1.Controls.Add(this.radioButton3);
     this.groupBox1.Controls.Add(this.radioButton2);
     this.groupBox1.Controls.Add(this.radioButton1);
     this.groupBox1.Location = new System.Drawing.Point(576, 24);
     this.groupBox1.Name     = "groupBox1";
     this.groupBox1.Size     = new System.Drawing.Size(168, 168);
     this.groupBox1.TabIndex = 1;
     this.groupBox1.TabStop  = false;
     this.groupBox1.Text     = "groupBox1";
     //
     // radioButton4
     //
     this.radioButton4.Location        = new System.Drawing.Point(16, 120);
     this.radioButton4.Name            = "radioButton4";
     this.radioButton4.Size            = new System.Drawing.Size(136, 24);
     this.radioButton4.TabIndex        = 3;
     this.radioButton4.Text            = "Collapse All";
     this.radioButton4.CheckedChanged += new System.EventHandler(this.radioButton4_CheckedChanged);
     //
     // radioButton3
     //
     this.radioButton3.Location        = new System.Drawing.Point(16, 88);
     this.radioButton3.Name            = "radioButton3";
     this.radioButton3.Size            = new System.Drawing.Size(136, 24);
     this.radioButton3.TabIndex        = 2;
     this.radioButton3.Text            = "Expand All";
     this.radioButton3.CheckedChanged += new System.EventHandler(this.radioButton3_CheckedChanged);
     //
     // radioButton2
     //
     this.radioButton2.Checked         = true;
     this.radioButton2.Location        = new System.Drawing.Point(16, 48);
     this.radioButton2.Name            = "radioButton2";
     this.radioButton2.Size            = new System.Drawing.Size(144, 32);
     this.radioButton2.TabIndex        = 1;
     this.radioButton2.TabStop         = true;
     this.radioButton2.Text            = "Collapse Group row";
     this.radioButton2.CheckedChanged += new System.EventHandler(this.radioButton2_CheckedChanged);
     //
     // radioButton1
     //
     this.radioButton1.Location        = new System.Drawing.Point(16, 24);
     this.radioButton1.Name            = "radioButton1";
     this.radioButton1.Size            = new System.Drawing.Size(144, 24);
     this.radioButton1.TabIndex        = 0;
     this.radioButton1.Text            = "Expand Group row";
     this.radioButton1.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
     //
     // Form1
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(760, 266);
     this.Controls.Add(this.groupBox1);
     this.Controls.Add(this.c1TrueDBGrid1);
     this.Name  = "Form1";
     this.Text  = "Form1";
     this.Load += new System.EventHandler(this.Form1_Load);
     ((System.ComponentModel.ISupportInitialize)(this.c1TrueDBGrid1)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.dataSet11)).EndInit();
     this.groupBox1.ResumeLayout(false);
     this.ResumeLayout(false);
 }
Пример #35
0
        private static SharpMap.Map InitializeMapOsmWithXls(float angle)
        {
            var map = new SharpMap.Map();

            var tileLayer = new SharpMap.Layers.TileAsyncLayer(
                KnownTileSources.Create(KnownTileSource.OpenStreetMap), "TileLayer - OSM with XLS");

            map.BackgroundLayer.Add(tileLayer);

            //Get data from excel
            var xlsPath = string.Format(XlsConnectionString, System.IO.Directory.GetCurrentDirectory(), "GeoData\\Cities.xls", Properties.Settings.Default.OleDbProvider);
            var ds      = new System.Data.DataSet("XLS");

            using (var cn = new System.Data.OleDb.OleDbConnection(xlsPath))
            {
                cn.Open();
                using (var da = new System.Data.OleDb.OleDbDataAdapter(new System.Data.OleDb.OleDbCommand("SELECT * FROM [Cities$]", cn)))
                    da.Fill(ds);
            }

            //The SRS for this datasource is EPSG:4326, therefore we need to transfrom it to OSM projection
            var ctf      = new ProjNet.CoordinateSystems.Transformations.CoordinateTransformationFactory();
            var cf       = new ProjNet.CoordinateSystems.CoordinateSystemFactory();
            var epsg4326 = cf.CreateFromWkt("GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994328,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]]");
            var epsg3857 = cf.CreateFromWkt("PROJCS[\"Popular Visualisation CRS / Mercator\", GEOGCS[\"Popular Visualisation CRS\", DATUM[\"Popular Visualisation Datum\", SPHEROID[\"Popular Visualisation Sphere\", 6378137, 0, AUTHORITY[\"EPSG\",\"7059\"]], TOWGS84[0, 0, 0, 0, 0, 0, 0], AUTHORITY[\"EPSG\",\"6055\"]],PRIMEM[\"Greenwich\", 0, AUTHORITY[\"EPSG\", \"8901\"]], UNIT[\"degree\", 0.0174532925199433, AUTHORITY[\"EPSG\", \"9102\"]], AXIS[\"E\", EAST], AXIS[\"N\", NORTH], AUTHORITY[\"EPSG\",\"4055\"]], PROJECTION[\"Mercator\"], PARAMETER[\"False_Easting\", 0], PARAMETER[\"False_Northing\", 0], PARAMETER[\"Central_Meridian\", 0], PARAMETER[\"Latitude_of_origin\", 0], UNIT[\"metre\", 1, AUTHORITY[\"EPSG\", \"9001\"]], AXIS[\"East\", EAST], AXIS[\"North\", NORTH], AUTHORITY[\"EPSG\",\"3857\"]]");
            var ct       = ctf.CreateFromCoordinateSystems(epsg4326, epsg3857);

            foreach (System.Data.DataRow row in ds.Tables[0].Rows)
            {
                if (row["X"] == DBNull.Value || row["Y"] == DBNull.Value)
                {
                    continue;
                }
                var coords = new[] { Convert.ToDouble(row["X"]), Convert.ToDouble(row["Y"]) };
                coords   = ct.MathTransform.Transform(coords);
                row["X"] = coords[0];
                row["Y"] = coords[1];
            }

            //Add Rotation Column
            ds.Tables[0].Columns.Add("Rotation", typeof(float));
            foreach (System.Data.DataRow row in ds.Tables[0].Rows)
            {
                row["Rotation"] = -angle;
            }

            //Set up provider
            var xlsProvider = new SharpMap.Data.Providers.DataTablePoint(ds.Tables[0], "OID", "X", "Y");
            var xlsLayer    = new SharpMap.Layers.VectorLayer("XLS", xlsProvider)
            {
                Style = { Symbol = SharpMap.Styles.VectorStyle.DefaultSymbol }
            };

            //Add layer to map
            map.Layers.Add(xlsLayer);
            var xlsLabelLayer = new SharpMap.Layers.LabelLayer("XLSLabel")
            {
                DataSource     = xlsProvider,
                LabelColumn    = "Name",
                PriorityColumn = "Population",
                Style          =
                {
                    CollisionBuffer    = new System.Drawing.SizeF(2f, 2f),
                    CollisionDetection = true
                },
                LabelFilter =
                    SharpMap.Rendering.LabelCollisionDetection.ThoroughCollisionDetection
            };

            xlsLabelLayer.Theme = new SharpMap.Rendering.Thematics.FontSizeTheme(xlsLabelLayer, map)
            {
                FontSizeScale = 1000f
            };

            map.Layers.Add(xlsLabelLayer);

            map.ZoomToBox(tileLayer.Envelope);

            return(map);
        }
Пример #36
0
 public System.Data.OleDb.OleDbCommand PrepareCall(System.Data.OleDb.OleDbConnection connection, string sql)
 {
     System.Data.OleDb.OleDbCommand command = this.CreateStatement(connection);
     command.CommandText = sql;
     return(command);
 }
Пример #37
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     C1.Win.C1List.Style style1 = new C1.Win.C1List.Style();
     C1.Win.C1List.Style style2 = new C1.Win.C1List.Style();
     C1.Win.C1List.Style style3 = new C1.Win.C1List.Style();
     C1.Win.C1List.Style style4 = new C1.Win.C1List.Style();
     C1.Win.C1List.Style style5 = new C1.Win.C1List.Style();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
     C1.Win.C1List.Style style6 = new C1.Win.C1List.Style();
     C1.Win.C1List.Style style7 = new C1.Win.C1List.Style();
     C1.Win.C1List.Style style8 = new C1.Win.C1List.Style();
     this.C1List1             = new C1.Win.C1List.C1List();
     this.oleDbSelectCommand1 = new System.Data.OleDb.OleDbCommand();
     this.oleDbDataAdapter1   = new System.Data.OleDb.OleDbDataAdapter();
     this.oleDbConnection1    = new System.Data.OleDb.OleDbConnection();
     this.dsCustomer1         = new Tutorial15.DsCustomer();
     ((System.ComponentModel.ISupportInitialize)(this.C1List1)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.dsCustomer1)).BeginInit();
     this.SuspendLayout();
     //
     // C1List1
     //
     this.C1List1.AddItemSeparator    = ';';
     this.C1List1.CaptionHeight       = 17;
     this.C1List1.CaptionStyle        = style1;
     this.C1List1.ColumnCaptionHeight = 17;
     this.C1List1.ColumnFooterHeight  = 17;
     this.C1List1.ColumnWidth         = 100;
     this.C1List1.DataMember          = "Customer";
     this.C1List1.DataSource          = this.dsCustomer1;
     this.C1List1.DeadAreaBackColor   = System.Drawing.SystemColors.ControlDark;
     this.C1List1.EvenRowStyle        = style2;
     this.C1List1.FooterStyle         = style3;
     this.C1List1.HeadingStyle        = style4;
     this.C1List1.HighLightRowStyle   = style5;
     this.C1List1.Images.Add(((System.Drawing.Image)(resources.GetObject("C1List1.Images"))));
     this.C1List1.ItemHeight        = 15;
     this.C1List1.Location          = new System.Drawing.Point(32, 24);
     this.C1List1.MatchEntryTimeout = ((long)(2000));
     this.C1List1.Name               = "C1List1";
     this.C1List1.OddRowStyle        = style6;
     this.C1List1.RowDivider.Color   = System.Drawing.Color.DarkGray;
     this.C1List1.RowDivider.Style   = C1.Win.C1List.LineStyleEnum.None;
     this.C1List1.RowSubDividerColor = System.Drawing.Color.DarkGray;
     this.C1List1.SelectedStyle      = style7;
     this.C1List1.Size               = new System.Drawing.Size(432, 320);
     this.C1List1.Style              = style8;
     this.C1List1.TabIndex           = 0;
     this.C1List1.Text               = "C1List1";
     this.C1List1.OwnerDrawCell     += new C1.Win.C1List.OwnerDrawCellEventHandler(this.C1List1_OwnerDrawCell);
     this.C1List1.PropBag            = resources.GetString("C1List1.PropBag");
     //
     // oleDbSelectCommand1
     //
     this.oleDbSelectCommand1.CommandText = "SELECT     Customer.*\r\nFROM         Customer";
     this.oleDbSelectCommand1.Connection  = this.oleDbConnection1;
     //
     // oleDbDataAdapter1
     //
     this.oleDbDataAdapter1.SelectCommand = this.oleDbSelectCommand1;
     this.oleDbDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
         new System.Data.Common.DataTableMapping("Table", "Customer", new System.Data.Common.DataColumnMapping[] {
             new System.Data.Common.DataColumnMapping("UserCode", "UserCode"),
             new System.Data.Common.DataColumnMapping("LastName", "LastName"),
             new System.Data.Common.DataColumnMapping("FirstName", "FirstName"),
             new System.Data.Common.DataColumnMapping("Company", "Company"),
             new System.Data.Common.DataColumnMapping("Contacted", "Contacted"),
             new System.Data.Common.DataColumnMapping("Phone", "Phone")
         })
     });
     //
     // oleDbConnection1
     //
     this.oleDbConnection1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\"..\\..\\..\\Data\\C1ListDemo.mdb\"";
     //
     // dsCustomer1
     //
     this.dsCustomer1.DataSetName = "DsCustomer";
     //
     // Form1
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(504, 381);
     this.Controls.Add(this.C1List1);
     this.Name  = "Form1";
     this.Text  = "C1List .Net Tutorial15";
     this.Load += new System.EventHandler(this.Form1_Load);
     ((System.ComponentModel.ISupportInitialize)(this.C1List1)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.dsCustomer1)).EndInit();
     this.ResumeLayout(false);
 }
Пример #38
0
 private void deleteuser_Load(object sender, EventArgs e)
 {
     System.Data.OleDb.OleDbConnection connection = new System.Data.OleDb.OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=F:\ASD\ase 2\user Database.accdb");
     connection.Open();
     string query = "SELECT ID, username, [password] FROM Customers";
 }
Пример #39
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
     this.Label3 = new System.Windows.Forms.Label();
     this.Label2 = new System.Windows.Forms.Label();
     this.Label1 = new System.Windows.Forms.Label();
     this.label5 = new System.Windows.Forms.Label();
     this.label6 = new System.Windows.Forms.Label();
     this.label7 = new System.Windows.Forms.Label();
     this.OleDbUpdateCommand1 = new System.Data.OleDb.OleDbCommand();
     this.OleDbConnection1    = new System.Data.OleDb.OleDbConnection();
     this.OleDbInsertCommand1 = new System.Data.OleDb.OleDbCommand();
     this.OleDbDataAdapter1   = new System.Data.OleDb.OleDbDataAdapter();
     this.OleDbDeleteCommand1 = new System.Data.OleDb.OleDbCommand();
     this.OleDbSelectCommand1 = new System.Data.OleDb.OleDbCommand();
     this.OleDbDataAdapter2   = new System.Data.OleDb.OleDbDataAdapter();
     this.OleDbInsertCommand2 = new System.Data.OleDb.OleDbCommand();
     this.OleDbSelectCommand2 = new System.Data.OleDb.OleDbCommand();
     this.DsTutor131          = new Tutor13.DataSet1();
     this.C1TrueDBGrid1       = new C1.Win.C1TrueDBGrid.C1TrueDBGrid();
     this.C1TrueDBGrid2       = new C1.Win.C1TrueDBGrid.C1TrueDBGrid();
     ((System.ComponentModel.ISupportInitialize)(this.DsTutor131)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.C1TrueDBGrid1)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.C1TrueDBGrid2)).BeginInit();
     this.SuspendLayout();
     //
     // Label3
     //
     this.Label3.Location  = new System.Drawing.Point(-82, -39);
     this.Label3.Name      = "Label3";
     this.Label3.Size      = new System.Drawing.Size(456, 25);
     this.Label3.TabIndex  = 9;
     this.Label3.Text      = "Drag a row from the top grid and drop it on the bottom grid";
     this.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // Label2
     //
     this.Label2.Location = new System.Drawing.Point(-82, 169);
     this.Label2.Name     = "Label2";
     this.Label2.TabIndex = 8;
     this.Label2.Text     = "To here:";
     //
     // Label1
     //
     this.Label1.Location = new System.Drawing.Point(-82, -7);
     this.Label1.Name     = "Label1";
     this.Label1.TabIndex = 7;
     this.Label1.Text     = "Drag from here:";
     //
     // label5
     //
     this.label5.Location  = new System.Drawing.Point(16, 8);
     this.label5.Name      = "label5";
     this.label5.Size      = new System.Drawing.Size(456, 23);
     this.label5.TabIndex  = 15;
     this.label5.Text      = "Drag a row from the top grid and drop it on the bottom grid";
     this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // label6
     //
     this.label6.Location = new System.Drawing.Point(16, 216);
     this.label6.Name     = "label6";
     this.label6.TabIndex = 14;
     this.label6.Text     = "To here:";
     //
     // label7
     //
     this.label7.Location = new System.Drawing.Point(16, 40);
     this.label7.Name     = "label7";
     this.label7.TabIndex = 13;
     this.label7.Text     = "Drag from here:";
     //
     // OleDbUpdateCommand1
     //
     this.OleDbUpdateCommand1.CommandText = @"UPDATE Customer SET Company = ?, Contacted = ?, CustType = ?, FirstName = ?, LastName = ?, Phone = ?, UserCode = ? WHERE (UserCode = ?) AND (Company = ? OR ? IS NULL AND Company IS NULL) AND (Contacted = ? OR ? IS NULL AND Contacted IS NULL) AND (CustType = ? OR ? IS NULL AND CustType IS NULL) AND (FirstName = ? OR ? IS NULL AND FirstName IS NULL) AND (LastName = ? OR ? IS NULL AND LastName IS NULL) AND (Phone = ? OR ? IS NULL AND Phone IS NULL)";
     this.OleDbUpdateCommand1.Connection  = this.OleDbConnection1;
     this.OleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Company", System.Data.OleDb.OleDbType.VarWChar, 30, "Company"));
     this.OleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Contacted", System.Data.OleDb.OleDbType.DBDate, 0, "Contacted"));
     this.OleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("CustType", System.Data.OleDb.OleDbType.SmallInt, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(5)), ((System.Byte)(0)), "CustType", System.Data.DataRowVersion.Current, null));
     this.OleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("FirstName", System.Data.OleDb.OleDbType.VarWChar, 10, "FirstName"));
     this.OleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("LastName", System.Data.OleDb.OleDbType.VarWChar, 15, "LastName"));
     this.OleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Phone", System.Data.OleDb.OleDbType.Double, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(15)), ((System.Byte)(0)), "Phone", System.Data.DataRowVersion.Current, null));
     this.OleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("UserCode", System.Data.OleDb.OleDbType.VarWChar, 4, "UserCode"));
     this.OleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_UserCode", System.Data.OleDb.OleDbType.VarWChar, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "UserCode", System.Data.DataRowVersion.Original, null));
     this.OleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_Company", System.Data.OleDb.OleDbType.VarWChar, 30, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "Company", System.Data.DataRowVersion.Original, null));
     this.OleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_Company1", System.Data.OleDb.OleDbType.VarWChar, 30, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "Company", System.Data.DataRowVersion.Original, null));
     this.OleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_Contacted", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "Contacted", System.Data.DataRowVersion.Original, null));
     this.OleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_Contacted1", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "Contacted", System.Data.DataRowVersion.Original, null));
     this.OleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_CustType", System.Data.OleDb.OleDbType.SmallInt, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(5)), ((System.Byte)(0)), "CustType", System.Data.DataRowVersion.Original, null));
     this.OleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_CustType1", System.Data.OleDb.OleDbType.SmallInt, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(5)), ((System.Byte)(0)), "CustType", System.Data.DataRowVersion.Original, null));
     this.OleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_FirstName", System.Data.OleDb.OleDbType.VarWChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "FirstName", System.Data.DataRowVersion.Original, null));
     this.OleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_FirstName1", System.Data.OleDb.OleDbType.VarWChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "FirstName", System.Data.DataRowVersion.Original, null));
     this.OleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_LastName", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "LastName", System.Data.DataRowVersion.Original, null));
     this.OleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_LastName1", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "LastName", System.Data.DataRowVersion.Original, null));
     this.OleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_Phone", System.Data.OleDb.OleDbType.Double, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(15)), ((System.Byte)(0)), "Phone", System.Data.DataRowVersion.Original, null));
     this.OleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_Phone1", System.Data.OleDb.OleDbType.Double, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(15)), ((System.Byte)(0)), "Phone", System.Data.DataRowVersion.Original, null));
     //
     // OleDbConnection1
     //
     this.OleDbConnection1.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User ID=Admin;Data Source=C:\Program Files\ComponentOne Studio.NET 2.0\Common\TDBGDemo.mdb;Mode=Share Deny None;Extended Properties="""";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet OLEDB:Database Password="""";Jet OLEDB:Engine Type=4;Jet OLEDB:Database Locking Mode=0;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password="""";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False";
     //
     // OleDbInsertCommand1
     //
     this.OleDbInsertCommand1.CommandText = "INSERT INTO Customer(Company, Contacted, CustType, FirstName, LastName, Phone, U" +
                                            "serCode) VALUES (?, ?, ?, ?, ?, ?, ?)";
     this.OleDbInsertCommand1.Connection = this.OleDbConnection1;
     this.OleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Company", System.Data.OleDb.OleDbType.VarWChar, 30, "Company"));
     this.OleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Contacted", System.Data.OleDb.OleDbType.DBDate, 0, "Contacted"));
     this.OleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("CustType", System.Data.OleDb.OleDbType.SmallInt, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(5)), ((System.Byte)(0)), "CustType", System.Data.DataRowVersion.Current, null));
     this.OleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("FirstName", System.Data.OleDb.OleDbType.VarWChar, 10, "FirstName"));
     this.OleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("LastName", System.Data.OleDb.OleDbType.VarWChar, 15, "LastName"));
     this.OleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Phone", System.Data.OleDb.OleDbType.Double, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(15)), ((System.Byte)(0)), "Phone", System.Data.DataRowVersion.Current, null));
     this.OleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("UserCode", System.Data.OleDb.OleDbType.VarWChar, 4, "UserCode"));
     //
     // OleDbDataAdapter1
     //
     this.OleDbDataAdapter1.DeleteCommand = this.OleDbDeleteCommand1;
     this.OleDbDataAdapter1.InsertCommand = this.OleDbInsertCommand1;
     this.OleDbDataAdapter1.SelectCommand = this.OleDbSelectCommand1;
     this.OleDbDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
         new System.Data.Common.DataTableMapping("Table", "Customer", new System.Data.Common.DataColumnMapping[] {
             new System.Data.Common.DataColumnMapping("UserCode", "UserCode"),
             new System.Data.Common.DataColumnMapping("LastName", "LastName"),
             new System.Data.Common.DataColumnMapping("FirstName", "FirstName"),
             new System.Data.Common.DataColumnMapping("Company", "Company"),
             new System.Data.Common.DataColumnMapping("Contacted", "Contacted"),
             new System.Data.Common.DataColumnMapping("Phone", "Phone"),
             new System.Data.Common.DataColumnMapping("CustType", "CustType")
         })
     });
     this.OleDbDataAdapter1.UpdateCommand = this.OleDbUpdateCommand1;
     //
     // OleDbDeleteCommand1
     //
     this.OleDbDeleteCommand1.CommandText = @"DELETE FROM Customer WHERE (UserCode = ?) AND (Company = ? OR ? IS NULL AND Company IS NULL) AND (Contacted = ? OR ? IS NULL AND Contacted IS NULL) AND (CustType = ? OR ? IS NULL AND CustType IS NULL) AND (FirstName = ? OR ? IS NULL AND FirstName IS NULL) AND (LastName = ? OR ? IS NULL AND LastName IS NULL) AND (Phone = ? OR ? IS NULL AND Phone IS NULL)";
     this.OleDbDeleteCommand1.Connection  = this.OleDbConnection1;
     this.OleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_UserCode", System.Data.OleDb.OleDbType.VarWChar, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "UserCode", System.Data.DataRowVersion.Original, null));
     this.OleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_Company", System.Data.OleDb.OleDbType.VarWChar, 30, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "Company", System.Data.DataRowVersion.Original, null));
     this.OleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_Company1", System.Data.OleDb.OleDbType.VarWChar, 30, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "Company", System.Data.DataRowVersion.Original, null));
     this.OleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_Contacted", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "Contacted", System.Data.DataRowVersion.Original, null));
     this.OleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_Contacted1", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "Contacted", System.Data.DataRowVersion.Original, null));
     this.OleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_CustType", System.Data.OleDb.OleDbType.SmallInt, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(5)), ((System.Byte)(0)), "CustType", System.Data.DataRowVersion.Original, null));
     this.OleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_CustType1", System.Data.OleDb.OleDbType.SmallInt, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(5)), ((System.Byte)(0)), "CustType", System.Data.DataRowVersion.Original, null));
     this.OleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_FirstName", System.Data.OleDb.OleDbType.VarWChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "FirstName", System.Data.DataRowVersion.Original, null));
     this.OleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_FirstName1", System.Data.OleDb.OleDbType.VarWChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "FirstName", System.Data.DataRowVersion.Original, null));
     this.OleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_LastName", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "LastName", System.Data.DataRowVersion.Original, null));
     this.OleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_LastName1", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "LastName", System.Data.DataRowVersion.Original, null));
     this.OleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_Phone", System.Data.OleDb.OleDbType.Double, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(15)), ((System.Byte)(0)), "Phone", System.Data.DataRowVersion.Original, null));
     this.OleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_Phone1", System.Data.OleDb.OleDbType.Double, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(15)), ((System.Byte)(0)), "Phone", System.Data.DataRowVersion.Original, null));
     //
     // OleDbSelectCommand1
     //
     this.OleDbSelectCommand1.CommandText = "SELECT Company, Contacted, CustType, FirstName, LastName, Phone, UserCode FROM Cu" +
                                            "stomer";
     this.OleDbSelectCommand1.Connection = this.OleDbConnection1;
     //
     // OleDbDataAdapter2
     //
     this.OleDbDataAdapter2.InsertCommand = this.OleDbInsertCommand2;
     this.OleDbDataAdapter2.SelectCommand = this.OleDbSelectCommand2;
     this.OleDbDataAdapter2.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
         new System.Data.Common.DataTableMapping("Table", "CallList", new System.Data.Common.DataColumnMapping[] {
             new System.Data.Common.DataColumnMapping("Customer", "Customer"),
             new System.Data.Common.DataColumnMapping("Phone", "Phone"),
             new System.Data.Common.DataColumnMapping("CallDate", "CallDate")
         })
     });
     //
     // OleDbInsertCommand2
     //
     this.OleDbInsertCommand2.CommandText = "INSERT INTO CallList(CallDate, Customer, Phone) VALUES (?, ?, ?)";
     this.OleDbInsertCommand2.Connection  = this.OleDbConnection1;
     this.OleDbInsertCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("CallDate", System.Data.OleDb.OleDbType.DBDate, 0, "CallDate"));
     this.OleDbInsertCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Customer", System.Data.OleDb.OleDbType.VarWChar, 55, "Customer"));
     this.OleDbInsertCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Phone", System.Data.OleDb.OleDbType.Double, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(15)), ((System.Byte)(0)), "Phone", System.Data.DataRowVersion.Current, null));
     //
     // OleDbSelectCommand2
     //
     this.OleDbSelectCommand2.CommandText = "SELECT CallDate, Customer, Phone FROM CallList";
     this.OleDbSelectCommand2.Connection  = this.OleDbConnection1;
     //
     // DsTutor131
     //
     this.DsTutor131.DataSetName = "DataSet1";
     this.DsTutor131.Locale      = new System.Globalization.CultureInfo("en-US");
     this.DsTutor131.Namespace   = "http://www.tempuri.org/DataSet1.xsd";
     //
     // C1TrueDBGrid1
     //
     this.C1TrueDBGrid1.AllowDrag         = true;
     this.C1TrueDBGrid1.Caption           = "C1TrueDBGrid.Net";
     this.C1TrueDBGrid1.CaptionHeight     = 17;
     this.C1TrueDBGrid1.DataMember        = "Customer";
     this.C1TrueDBGrid1.DataSource        = this.DsTutor131;
     this.C1TrueDBGrid1.ExtendRightColumn = true;
     this.C1TrueDBGrid1.GroupByCaption    = "Drag a column header here to group by that column";
     this.C1TrueDBGrid1.Images.Add(((System.Drawing.Bitmap)(resources.GetObject("resource.Images"))));
     this.C1TrueDBGrid1.Location               = new System.Drawing.Point(16, 64);
     this.C1TrueDBGrid1.MarqueeStyle           = C1.Win.C1TrueDBGrid.MarqueeEnum.SolidCellBorder;
     this.C1TrueDBGrid1.MultiSelect            = C1.Win.C1TrueDBGrid.MultiSelectEnum.Simple;
     this.C1TrueDBGrid1.Name                   = "C1TrueDBGrid1";
     this.C1TrueDBGrid1.PreviewInfo.Location   = new System.Drawing.Point(0, 0);
     this.C1TrueDBGrid1.PreviewInfo.Size       = new System.Drawing.Size(0, 0);
     this.C1TrueDBGrid1.PreviewInfo.ZoomFactor = 75;
     this.C1TrueDBGrid1.RecordSelectorWidth    = 17;
     this.C1TrueDBGrid1.RowDivider.Color       = System.Drawing.Color.DarkGray;
     this.C1TrueDBGrid1.RowDivider.Style       = C1.Win.C1TrueDBGrid.LineStyleEnum.Single;
     this.C1TrueDBGrid1.RowHeight              = 15;
     this.C1TrueDBGrid1.RowSubDividerColor     = System.Drawing.Color.DarkGray;
     this.C1TrueDBGrid1.Size                   = new System.Drawing.Size(456, 144);
     this.C1TrueDBGrid1.TabIndex               = 17;
     this.C1TrueDBGrid1.Text                   = "C1TrueDBGrid1";
     this.C1TrueDBGrid1.MouseMove             += new System.Windows.Forms.MouseEventHandler(this.C1TrueDBGrid1_MouseMove);
     this.C1TrueDBGrid1.MouseDown             += new System.Windows.Forms.MouseEventHandler(this.C1TrueDBGrid1_MouseDown);
     this.C1TrueDBGrid1.PropBag                = "<?xml version=\"1.0\"?><Blob><DataCols><C1DataColumn Level=\"0\" Caption=\"FirstName\" " +
                                                 "DataField=\"FirstName\"><ValueItems /><GroupInfo /></C1DataColumn><C1DataColumn Le" +
                                                 "vel=\"0\" Caption=\"LastName\" DataField=\"LastName\"><ValueItems /><GroupInfo /></C1D" +
                                                 "ataColumn><C1DataColumn Level=\"0\" Caption=\"Company\" DataField=\"Company\"><ValueIt" +
                                                 "ems /><GroupInfo /></C1DataColumn><C1DataColumn Level=\"0\" Caption=\"Phone\" DataFi" +
                                                 "eld=\"Phone\" NumberFormat=\"(###)###-####\"><ValueItems /><GroupInfo /></C1DataColu" +
                                                 "mn></DataCols><Styles type=\"C1.Win.C1TrueDBGrid.Design.ContextWrapper\"><Data>Sty" +
                                                 "le50{}Style51{}Caption{AlignHorz:Center;}Style27{AlignHorz:Near;}Normal{}Style25" +
                                                 "{}Style24{}Editor{}Style48{}Style18{AlignHorz:Far;}Style19{AlignHorz:Far;}Style1" +
                                                 "4{AlignHorz:Near;}Style15{AlignHorz:Near;}Style16{}Style17{}Style10{AlignHorz:Ne" +
                                                 "ar;}Style11{}OddRow{}Style13{}Style43{}Style44{}Style45{}Style46{}Style47{}Style" +
                                                 "12{}Style29{}Style28{}HighlightRow{ForeColor:HighlightText;BackColor:Highlight;}" +
                                                 "Style26{AlignHorz:Near;}RecordSelector{AlignImage:Center;}Footer{}Style23{AlignH" +
                                                 "orz:Far;}Style22{AlignHorz:Far;}Style21{}Style20{}Group{BackColor:ControlDark;Bo" +
                                                 "rder:None,,0, 0, 0, 0;AlignVert:Center;}Inactive{ForeColor:InactiveCaptionText;B" +
                                                 "ackColor:InactiveCaption;}EvenRow{BackColor:Aqua;}Heading{Wrap:True;AlignVert:Ce" +
                                                 "nter;Border:Raised,,1, 1, 1, 1;ForeColor:ControlText;BackColor:Control;}Style49{" +
                                                 "}Style3{}Style7{}Style6{}Style1{}Style5{}Style41{}Style40{}Style8{}FilterBar{}St" +
                                                 "yle42{}Selected{ForeColor:HighlightText;BackColor:Highlight;}Style4{}Style9{}Sty" +
                                                 "le38{AlignHorz:Near;}Style39{AlignHorz:Near;}Style36{}Style37{}Style34{AlignHorz" +
                                                 ":Far;}Style35{AlignHorz:Far;}Style32{}Style33{}Style30{AlignHorz:Near;}Style31{A" +
                                                 "lignHorz:Near;}Style2{}</Data></Styles><Splits><C1.Win.C1TrueDBGrid.MergeView Na" +
                                                 "me=\"\" CaptionHeight=\"17\" ColumnCaptionHeight=\"17\" ColumnFooterHeight=\"17\" Extend" +
                                                 "RightColumn=\"True\" MarqueeStyle=\"SolidCellBorder\" RecordSelectorWidth=\"17\" DefRe" +
                                                 "cSelWidth=\"17\" VerticalScrollGroup=\"1\" HorizontalScrollGroup=\"1\"><ClientRect>0, " +
                                                 "17, 452, 123</ClientRect><BorderSide>0</BorderSide><CaptionStyle parent=\"Style2\"" +
                                                 " me=\"Style10\" /><EditorStyle parent=\"Editor\" me=\"Style5\" /><EvenRowStyle parent=" +
                                                 "\"EvenRow\" me=\"Style8\" /><FilterBarStyle parent=\"FilterBar\" me=\"Style13\" /><Foote" +
                                                 "rStyle parent=\"Footer\" me=\"Style3\" /><GroupStyle parent=\"Group\" me=\"Style12\" /><" +
                                                 "HeadingStyle parent=\"Heading\" me=\"Style2\" /><HighLightRowStyle parent=\"Highlight" +
                                                 "Row\" me=\"Style7\" /><InactiveStyle parent=\"Inactive\" me=\"Style4\" /><OddRowStyle p" +
                                                 "arent=\"OddRow\" me=\"Style9\" /><RecordSelectorStyle parent=\"RecordSelector\" me=\"St" +
                                                 "yle11\" /><SelectedStyle parent=\"Selected\" me=\"Style6\" /><Style parent=\"Normal\" m" +
                                                 "e=\"Style1\" /><internalCols><C1DisplayColumn><HeadingStyle parent=\"Style2\" me=\"St" +
                                                 "yle30\" /><Style parent=\"Style1\" me=\"Style31\" /><FooterStyle parent=\"Style3\" me=\"" +
                                                 "Style32\" /><EditorStyle parent=\"Style5\" me=\"Style33\" /><GroupHeaderStyle parent=" +
                                                 "\"Style1\" me=\"Style45\" /><GroupFooterStyle parent=\"Style1\" me=\"Style44\" /><Visibl" +
                                                 "e>True</Visible><ColumnDivider>DarkGray,Single</ColumnDivider><Height>15</Height" +
                                                 "><DCIdx>1</DCIdx></C1DisplayColumn><C1DisplayColumn><HeadingStyle parent=\"Style2" +
                                                 "\" me=\"Style26\" /><Style parent=\"Style1\" me=\"Style27\" /><FooterStyle parent=\"Styl" +
                                                 "e3\" me=\"Style28\" /><EditorStyle parent=\"Style5\" me=\"Style29\" /><GroupHeaderStyle" +
                                                 " parent=\"Style1\" me=\"Style47\" /><GroupFooterStyle parent=\"Style1\" me=\"Style46\" /" +
                                                 "><Visible>True</Visible><ColumnDivider>DarkGray,Single</ColumnDivider><Height>15" +
                                                 "</Height><DCIdx>0</DCIdx></C1DisplayColumn><C1DisplayColumn><HeadingStyle parent" +
                                                 "=\"Style2\" me=\"Style14\" /><Style parent=\"Style1\" me=\"Style15\" /><FooterStyle pare" +
                                                 "nt=\"Style3\" me=\"Style16\" /><EditorStyle parent=\"Style5\" me=\"Style17\" /><GroupHea" +
                                                 "derStyle parent=\"Style1\" me=\"Style49\" /><GroupFooterStyle parent=\"Style1\" me=\"St" +
                                                 "yle48\" /><Visible>True</Visible><ColumnDivider>DarkGray,Single</ColumnDivider><H" +
                                                 "eight>15</Height><DCIdx>2</DCIdx></C1DisplayColumn><C1DisplayColumn><HeadingStyl" +
                                                 "e parent=\"Style2\" me=\"Style34\" /><Style parent=\"Style1\" me=\"Style35\" /><FooterSt" +
                                                 "yle parent=\"Style3\" me=\"Style36\" /><EditorStyle parent=\"Style5\" me=\"Style37\" /><" +
                                                 "GroupHeaderStyle parent=\"Style1\" me=\"Style51\" /><GroupFooterStyle parent=\"Style1" +
                                                 "\" me=\"Style50\" /><Visible>True</Visible><ColumnDivider>DarkGray,Single</ColumnDi" +
                                                 "vider><Height>15</Height><DCIdx>3</DCIdx></C1DisplayColumn></internalCols></C1.W" +
                                                 "in.C1TrueDBGrid.MergeView></Splits><NamedStyles><Style parent=\"\" me=\"Normal\" /><" +
                                                 "Style parent=\"Normal\" me=\"Heading\" /><Style parent=\"Heading\" me=\"Footer\" /><Styl" +
                                                 "e parent=\"Heading\" me=\"Caption\" /><Style parent=\"Heading\" me=\"Inactive\" /><Style" +
                                                 " parent=\"Normal\" me=\"Selected\" /><Style parent=\"Normal\" me=\"Editor\" /><Style par" +
                                                 "ent=\"Normal\" me=\"HighlightRow\" /><Style parent=\"Normal\" me=\"EvenRow\" /><Style pa" +
                                                 "rent=\"Normal\" me=\"OddRow\" /><Style parent=\"Heading\" me=\"RecordSelector\" /><Style" +
                                                 " parent=\"Normal\" me=\"FilterBar\" /><Style parent=\"Caption\" me=\"Group\" /></NamedSt" +
                                                 "yles><vertSplits>1</vertSplits><horzSplits>1</horzSplits><Layout>Modified</Layou" +
                                                 "t><DefaultRecSelWidth>17</DefaultRecSelWidth><ClientArea>0, 0, 452, 140</ClientA" +
                                                 "rea><PrintPageHeaderStyle parent=\"\" me=\"Style42\" /><PrintPageFooterStyle parent=" +
                                                 "\"\" me=\"Style43\" /></Blob>";
     //
     // C1TrueDBGrid2
     //
     this.C1TrueDBGrid2.AllowDrop         = true;
     this.C1TrueDBGrid2.CaptionHeight     = 17;
     this.C1TrueDBGrid2.DataMember        = "CallList";
     this.C1TrueDBGrid2.DataSource        = this.DsTutor131;
     this.C1TrueDBGrid2.ExtendRightColumn = true;
     this.C1TrueDBGrid2.GroupByCaption    = "Drag a column header here to group by that column";
     this.C1TrueDBGrid2.Images.Add(((System.Drawing.Bitmap)(resources.GetObject("resource.Images1"))));
     this.C1TrueDBGrid2.Location               = new System.Drawing.Point(16, 240);
     this.C1TrueDBGrid2.MarqueeStyle           = C1.Win.C1TrueDBGrid.MarqueeEnum.DottedCellBorder;
     this.C1TrueDBGrid2.Name                   = "C1TrueDBGrid2";
     this.C1TrueDBGrid2.PreviewInfo.Location   = new System.Drawing.Point(0, 0);
     this.C1TrueDBGrid2.PreviewInfo.Size       = new System.Drawing.Size(0, 0);
     this.C1TrueDBGrid2.PreviewInfo.ZoomFactor = 75;
     this.C1TrueDBGrid2.RecordSelectorWidth    = 17;
     this.C1TrueDBGrid2.RowDivider.Color       = System.Drawing.Color.DarkGray;
     this.C1TrueDBGrid2.RowDivider.Style       = C1.Win.C1TrueDBGrid.LineStyleEnum.Single;
     this.C1TrueDBGrid2.RowHeight              = 15;
     this.C1TrueDBGrid2.RowSubDividerColor     = System.Drawing.Color.DarkGray;
     this.C1TrueDBGrid2.Size                   = new System.Drawing.Size(456, 104);
     this.C1TrueDBGrid2.TabIndex               = 18;
     this.C1TrueDBGrid2.Text                   = "C1TrueDBGrid2";
     this.C1TrueDBGrid2.DragEnter             += new System.Windows.Forms.DragEventHandler(this.C1TrueDBGrid2_DragEnter);
     this.C1TrueDBGrid2.DragDrop              += new System.Windows.Forms.DragEventHandler(this.C1TrueDBGrid2_DragDrop);
     this.C1TrueDBGrid2.PropBag                = "<?xml version=\"1.0\"?><Blob><DataCols><C1DataColumn Level=\"0\" Caption=\"Customer\" D" +
                                                 "ataField=\"Customer\"><ValueItems /><GroupInfo /></C1DataColumn><C1DataColumn Leve" +
                                                 "l=\"0\" Caption=\"Phone\" DataField=\"Phone\" NumberFormat=\"(###)###-####\"><ValueItems" +
                                                 " /><GroupInfo /></C1DataColumn><C1DataColumn Level=\"0\" Caption=\"CallDate\" DataFi" +
                                                 "eld=\"CallDate\"><ValueItems /><GroupInfo /></C1DataColumn></DataCols><Styles type" +
                                                 "=\"C1.Win.C1TrueDBGrid.Design.ContextWrapper\"><Data>Caption{AlignHorz:Center;}Sty" +
                                                 "le27{}Normal{}Style25{}Selected{ForeColor:HighlightText;BackColor:Highlight;}Edi" +
                                                 "tor{}Style18{AlignHorz:Far;}Style19{AlignHorz:Far;}Style14{AlignHorz:Near;}Style" +
                                                 "15{AlignHorz:Near;}Style16{}Style17{}Style10{AlignHorz:Near;}Style11{}OddRow{}St" +
                                                 "yle13{}Style12{}Style32{}Style33{}Style31{}Footer{}Style29{}Style28{}HighlightRo" +
                                                 "w{ForeColor:HighlightText;BackColor:Highlight;}Style26{}RecordSelector{AlignImag" +
                                                 "e:Center;}Style24{}Style23{AlignHorz:Far;}Style22{AlignHorz:Far;}Style21{}Style2" +
                                                 "0{}Inactive{ForeColor:InactiveCaptionText;BackColor:InactiveCaption;}EvenRow{Bac" +
                                                 "kColor:Aqua;}Heading{Wrap:True;AlignVert:Center;Border:Raised,,1, 1, 1, 1;ForeCo" +
                                                 "lor:ControlText;BackColor:White;}FilterBar{}Style4{}Style9{}Style8{}Style5{}Grou" +
                                                 "p{BackColor:ControlDark;Border:None,,0, 0, 0, 0;AlignVert:Center;}Style7{}Style6" +
                                                 "{}Style1{}Style30{}Style3{}Style2{}</Data></Styles><Splits><C1.Win.C1TrueDBGrid." +
                                                 "MergeView Name=\"\" CaptionHeight=\"17\" ColumnCaptionHeight=\"17\" ColumnFooterHeight" +
                                                 "=\"17\" ExtendRightColumn=\"True\" MarqueeStyle=\"DottedCellBorder\" RecordSelectorWid" +
                                                 "th=\"17\" DefRecSelWidth=\"17\" VerticalScrollGroup=\"1\" HorizontalScrollGroup=\"1\"><C" +
                                                 "lientRect>0, 0, 452, 100</ClientRect><BorderSide>0</BorderSide><CaptionStyle par" +
                                                 "ent=\"Style2\" me=\"Style10\" /><EditorStyle parent=\"Editor\" me=\"Style5\" /><EvenRowS" +
                                                 "tyle parent=\"EvenRow\" me=\"Style8\" /><FilterBarStyle parent=\"FilterBar\" me=\"Style" +
                                                 "13\" /><FooterStyle parent=\"Footer\" me=\"Style3\" /><GroupStyle parent=\"Group\" me=\"" +
                                                 "Style12\" /><HeadingStyle parent=\"Heading\" me=\"Style2\" /><HighLightRowStyle paren" +
                                                 "t=\"HighlightRow\" me=\"Style7\" /><InactiveStyle parent=\"Inactive\" me=\"Style4\" /><O" +
                                                 "ddRowStyle parent=\"OddRow\" me=\"Style9\" /><RecordSelectorStyle parent=\"RecordSele" +
                                                 "ctor\" me=\"Style11\" /><SelectedStyle parent=\"Selected\" me=\"Style6\" /><Style paren" +
                                                 "t=\"Normal\" me=\"Style1\" /><internalCols><C1DisplayColumn><HeadingStyle parent=\"St" +
                                                 "yle2\" me=\"Style14\" /><Style parent=\"Style1\" me=\"Style15\" /><FooterStyle parent=\"" +
                                                 "Style3\" me=\"Style16\" /><EditorStyle parent=\"Style5\" me=\"Style17\" /><GroupHeaderS" +
                                                 "tyle parent=\"Style1\" me=\"Style29\" /><GroupFooterStyle parent=\"Style1\" me=\"Style2" +
                                                 "8\" /><Visible>True</Visible><ColumnDivider>DarkGray,Single</ColumnDivider><Heigh" +
                                                 "t>15</Height><DCIdx>0</DCIdx></C1DisplayColumn><C1DisplayColumn><HeadingStyle pa" +
                                                 "rent=\"Style2\" me=\"Style18\" /><Style parent=\"Style1\" me=\"Style19\" /><FooterStyle " +
                                                 "parent=\"Style3\" me=\"Style20\" /><EditorStyle parent=\"Style5\" me=\"Style21\" /><Grou" +
                                                 "pHeaderStyle parent=\"Style1\" me=\"Style31\" /><GroupFooterStyle parent=\"Style1\" me" +
                                                 "=\"Style30\" /><Visible>True</Visible><ColumnDivider>DarkGray,Single</ColumnDivide" +
                                                 "r><Height>15</Height><DCIdx>1</DCIdx></C1DisplayColumn><C1DisplayColumn><Heading" +
                                                 "Style parent=\"Style2\" me=\"Style22\" /><Style parent=\"Style1\" me=\"Style23\" /><Foot" +
                                                 "erStyle parent=\"Style3\" me=\"Style24\" /><EditorStyle parent=\"Style5\" me=\"Style25\"" +
                                                 " /><GroupHeaderStyle parent=\"Style1\" me=\"Style33\" /><GroupFooterStyle parent=\"St" +
                                                 "yle1\" me=\"Style32\" /><Visible>True</Visible><ColumnDivider>DarkGray,Single</Colu" +
                                                 "mnDivider><Height>15</Height><DCIdx>2</DCIdx></C1DisplayColumn></internalCols></" +
                                                 "C1.Win.C1TrueDBGrid.MergeView></Splits><NamedStyles><Style parent=\"\" me=\"Normal\"" +
                                                 " /><Style parent=\"Normal\" me=\"Heading\" /><Style parent=\"Heading\" me=\"Footer\" /><" +
                                                 "Style parent=\"Heading\" me=\"Caption\" /><Style parent=\"Heading\" me=\"Inactive\" /><S" +
                                                 "tyle parent=\"Normal\" me=\"Selected\" /><Style parent=\"Normal\" me=\"Editor\" /><Style" +
                                                 " parent=\"Normal\" me=\"HighlightRow\" /><Style parent=\"Normal\" me=\"EvenRow\" /><Styl" +
                                                 "e parent=\"Normal\" me=\"OddRow\" /><Style parent=\"Heading\" me=\"RecordSelector\" /><S" +
                                                 "tyle parent=\"Normal\" me=\"FilterBar\" /><Style parent=\"Caption\" me=\"Group\" /></Nam" +
                                                 "edStyles><vertSplits>1</vertSplits><horzSplits>1</horzSplits><Layout>Modified</L" +
                                                 "ayout><DefaultRecSelWidth>17</DefaultRecSelWidth><ClientArea>0, 0, 452, 100</Cli" +
                                                 "entArea><PrintPageHeaderStyle parent=\"\" me=\"Style26\" /><PrintPageFooterStyle par" +
                                                 "ent=\"\" me=\"Style27\" /></Blob>";
     //
     // Form1
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(496, 366);
     this.Controls.AddRange(new System.Windows.Forms.Control[] {
         this.C1TrueDBGrid2,
         this.C1TrueDBGrid1,
         this.label5,
         this.label6,
         this.label7,
         this.Label3,
         this.Label2,
         this.Label1
     });
     this.Name  = "Form1";
     this.Text  = "Tutorial 13";
     this.Load += new System.EventHandler(this.Form1_Load);
     ((System.ComponentModel.ISupportInitialize)(this.DsTutor131)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.C1TrueDBGrid1)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.C1TrueDBGrid2)).EndInit();
     this.ResumeLayout(false);
 }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.oleDbDataAdapter1   = new System.Data.OleDb.OleDbDataAdapter();
     this.oleDbSelectCommand1 = new System.Data.OleDb.OleDbCommand();
     this.oleDbInsertCommand1 = new System.Data.OleDb.OleDbCommand();
     this.oleDbUpdateCommand1 = new System.Data.OleDb.OleDbCommand();
     this.oleDbDeleteCommand1 = new System.Data.OleDb.OleDbCommand();
     this.oleDbConnection1    = new System.Data.OleDb.OleDbConnection();
     this.dsCategories1       = new CSharpBook.dsCategories();
     ((System.ComponentModel.ISupportInitialize)(this.dsCategories1)).BeginInit();
     //
     // oleDbDataAdapter1
     //
     this.oleDbDataAdapter1.DeleteCommand = this.oleDbDeleteCommand1;
     this.oleDbDataAdapter1.InsertCommand = this.oleDbInsertCommand1;
     this.oleDbDataAdapter1.SelectCommand = this.oleDbSelectCommand1;
     this.oleDbDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
         new System.Data.Common.DataTableMapping("Table", "Categories", new System.Data.Common.DataColumnMapping[] {
             new System.Data.Common.DataColumnMapping("CategoryID", "CategoryID"),
             new System.Data.Common.DataColumnMapping("CategoryName", "CategoryName")
         })
     });
     this.oleDbDataAdapter1.UpdateCommand = this.oleDbUpdateCommand1;
     //
     // oleDbSelectCommand1
     //
     this.oleDbSelectCommand1.CommandText = "SELECT CategoryID, CategoryName FROM Categories";
     this.oleDbSelectCommand1.Connection  = this.oleDbConnection1;
     //
     // oleDbInsertCommand1
     //
     this.oleDbInsertCommand1.CommandText = "INSERT INTO Categories(CategoryName) VALUES (?)";
     this.oleDbInsertCommand1.Connection  = this.oleDbConnection1;
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("CategoryName", System.Data.OleDb.OleDbType.VarWChar, 15, "CategoryName"));
     //
     // oleDbUpdateCommand1
     //
     this.oleDbUpdateCommand1.CommandText = "UPDATE Categories SET CategoryName = ? WHERE (CategoryID = ?) AND (CategoryName =" +
                                            " ?)";
     this.oleDbUpdateCommand1.Connection = this.oleDbConnection1;
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("CategoryName", System.Data.OleDb.OleDbType.VarWChar, 15, "CategoryName"));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_CategoryID", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(10)), ((System.Byte)(0)), "CategoryID", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_CategoryName", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "CategoryName", System.Data.DataRowVersion.Original, null));
     //
     // oleDbDeleteCommand1
     //
     this.oleDbDeleteCommand1.CommandText = "DELETE FROM Categories WHERE (CategoryID = ?) AND (CategoryName = ?)";
     this.oleDbDeleteCommand1.Connection  = this.oleDbConnection1;
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_CategoryID", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(10)), ((System.Byte)(0)), "CategoryID", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_CategoryName", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "CategoryName", System.Data.DataRowVersion.Original, null));
     //
     // oleDbConnection1
     //
     this.oleDbConnection1.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User ID=Admin;Data Source=C:\Inetpub\wwwroot\CSharpBook\nwind.mdb;Mode=Share Deny None;Extended Properties="""";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet OLEDB:Database Password="""";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password="""";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False";
     //
     // dsCategories1
     //
     this.dsCategories1.DataSetName = "dsCategories";
     this.dsCategories1.Locale      = new System.Globalization.CultureInfo("en-US");
     this.dsCategories1.Namespace   = "http://www.tempuri.org/dsCategories.xsd";
     this.Load += new System.EventHandler(this.Page_Load);
     ((System.ComponentModel.ISupportInitialize)(this.dsCategories1)).EndInit();
 }
Пример #41
0
        // Dim ExcelConnectionStr As String

        public oExcel(string dbPath)
        {
            string ExcelConnectionStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + dbPath + ";Extended Properties=Excel 8.0;";

            con = new System.Data.OleDb.OleDbConnection(ExcelConnectionStr);
        }
Пример #42
0
 /// <summary>
 /// Método necesario para admitir el Diseñador, no se puede modificar
 /// el contenido del método con el editor de código.
 /// </summary>
 private void InitializeComponent()
 {
     System.Configuration.AppSettingsReader configurationAppSettings = new System.Configuration.AppSettingsReader();
     this.oleDbConnection1    = new System.Data.OleDb.OleDbConnection();
     this.oleDbDataAdapter1   = new System.Data.OleDb.OleDbDataAdapter();
     this.oleDbSelectCommand1 = new System.Data.OleDb.OleDbCommand();
     this.dataSet11           = new comp_ingreso.DataSet1();
     this.oleDbDataAdapter2   = new System.Data.OleDb.OleDbDataAdapter();
     this.oleDbSelectCommand2 = new System.Data.OleDb.OleDbCommand();
     this.oleDbDataAdapter3   = new System.Data.OleDb.OleDbDataAdapter();
     this.oleDbSelectCommand3 = new System.Data.OleDb.OleDbCommand();
     this.oleDbDataAdapter4   = new System.Data.OleDb.OleDbDataAdapter();
     this.oleDbSelectCommand4 = new System.Data.OleDb.OleDbCommand();
     this.oleDbConnection2    = new System.Data.OleDb.OleDbConnection();
     this.oleDbSelectCommand5 = new System.Data.OleDb.OleDbCommand();
     this.oleDbInsertCommand1 = new System.Data.OleDb.OleDbCommand();
     this.oleDbUpdateCommand1 = new System.Data.OleDb.OleDbCommand();
     this.oleDbDeleteCommand1 = new System.Data.OleDb.OleDbCommand();
     this.oleDbDataAdapter5   = new System.Data.OleDb.OleDbDataAdapter();
     ((System.ComponentModel.ISupportInitialize)(this.dataSet11)).BeginInit();
     //
     // oleDbConnection1
     //
     this.oleDbConnection1.ConnectionString = ((string)(configurationAppSettings.GetValue("cadenaConexion", typeof(string))));
     //
     // oleDbDataAdapter1
     //
     this.oleDbDataAdapter1.SelectCommand = this.oleDbSelectCommand1;
     this.oleDbDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
         new System.Data.Common.DataTableMapping("Table", "T_Contrato", new System.Data.Common.DataColumnMapping[] {
             new System.Data.Common.DataColumnMapping("NUMERO_HOJA", "NUMERO_HOJA"),
             new System.Data.Common.DataColumnMapping("NOMBRE_HOJA", "NOMBRE_HOJA"),
             new System.Data.Common.DataColumnMapping("CONT_NCORR", "CONT_NCORR"),
             new System.Data.Common.DataColumnMapping("F_CONTRATO", "F_CONTRATO"),
             new System.Data.Common.DataColumnMapping("AUDI_TUSUARIO", "AUDI_TUSUARIO"),
             new System.Data.Common.DataColumnMapping("ANO_INGRESO", "ANO_INGRESO"),
             new System.Data.Common.DataColumnMapping("CARRERA", "CARRERA"),
             new System.Data.Common.DataColumnMapping("RUT_ALUMNO", "RUT_ALUMNO"),
             new System.Data.Common.DataColumnMapping("PATERNO_ALUMNO", "PATERNO_ALUMNO"),
             new System.Data.Common.DataColumnMapping("MATERNO_ALUMNO", "MATERNO_ALUMNO"),
             new System.Data.Common.DataColumnMapping("NOMBRES_ALUMNO", "NOMBRES_ALUMNO"),
             new System.Data.Common.DataColumnMapping("DIRECCION_ALUMNO", "DIRECCION_ALUMNO"),
             new System.Data.Common.DataColumnMapping("CIUDAD_ALUMNO", "CIUDAD_ALUMNO"),
             new System.Data.Common.DataColumnMapping("COMUNA_ALUMNO", "COMUNA_ALUMNO"),
             new System.Data.Common.DataColumnMapping("FONO_ALUMNO", "FONO_ALUMNO"),
             new System.Data.Common.DataColumnMapping("RUT_APODERADO", "RUT_APODERADO"),
             new System.Data.Common.DataColumnMapping("PATERNO_APODERADO", "PATERNO_APODERADO"),
             new System.Data.Common.DataColumnMapping("MATERNO_APODERADO", "MATERNO_APODERADO"),
             new System.Data.Common.DataColumnMapping("NOMBRES_APODERADO", "NOMBRES_APODERADO"),
             new System.Data.Common.DataColumnMapping("DIRECCION_APODERADO", "DIRECCION_APODERADO"),
             new System.Data.Common.DataColumnMapping("CIUDAD_APODERADO", "CIUDAD_APODERADO"),
             new System.Data.Common.DataColumnMapping("COMUNA_APODERADO", "COMUNA_APODERADO"),
             new System.Data.Common.DataColumnMapping("FONO_APODERADO", "FONO_APODERADO"),
             new System.Data.Common.DataColumnMapping("IGAS_TCODIGO", "IGAS_TCODIGO"),
             new System.Data.Common.DataColumnMapping("CCOS_TCODIGO", "CCOS_TCODIGO"),
             new System.Data.Common.DataColumnMapping("TIPO_IMPRESION", "TIPO_IMPRESION")
         })
     });
     //
     // oleDbSelectCommand1
     //
     this.oleDbSelectCommand1.CommandText = @"SELECT '' AS NUMERO_HOJA, '' AS NOMBRE_HOJA, '' AS CONT_NCORR, '' AS F_CONTRATO, '' AS AUDI_TUSUARIO, '' AS ANO_INGRESO, '' AS CARRERA, '' AS RUT_ALUMNO, '' AS PATERNO_ALUMNO, '' AS MATERNO_ALUMNO, '' AS NOMBRES_ALUMNO, '' AS DIRECCION_ALUMNO, '' AS CIUDAD_ALUMNO, '' AS COMUNA_ALUMNO, '' AS FONO_ALUMNO, '' AS RUT_APODERADO, '' AS PATERNO_APODERADO, '' AS MATERNO_APODERADO, '' AS NOMBRES_APODERADO, '' AS DIRECCION_APODERADO, '' AS CIUDAD_APODERADO, '' AS COMUNA_APODERADO, '' AS FONO_APODERADO, '' AS igas_tcodigo, '' AS CCOS_TCODIGO, '' AS tipo_impresion";
     this.oleDbSelectCommand1.Connection  = this.oleDbConnection1;
     //
     // dataSet11
     //
     this.dataSet11.DataSetName = "DataSet1";
     this.dataSet11.Locale      = new System.Globalization.CultureInfo("es-CL");
     this.dataSet11.Namespace   = "http://www.tempuri.org/DataSet1.xsd";
     //
     // oleDbDataAdapter2
     //
     this.oleDbDataAdapter2.SelectCommand = this.oleDbSelectCommand2;
     this.oleDbDataAdapter2.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
         new System.Data.Common.DataTableMapping("Table", "T_Beneficios", new System.Data.Common.DataColumnMapping[] {
             new System.Data.Common.DataColumnMapping("COMP_NDOCTO", "COMP_NDOCTO"),
             new System.Data.Common.DataColumnMapping("TCOM_CCOD", "TCOM_CCOD"),
             new System.Data.Common.DataColumnMapping("ITEM", "ITEM"),
             new System.Data.Common.DataColumnMapping("FECHA_BENEFICIO", "FECHA_BENEFICIO"),
             new System.Data.Common.DataColumnMapping("MONTO", "MONTO"),
             new System.Data.Common.DataColumnMapping("PORCENTAJE", "PORCENTAJE")
         })
     });
     //
     // oleDbSelectCommand2
     //
     this.oleDbSelectCommand2.CommandText = "SELECT \'\' AS COMP_NDOCTO, \'\' AS TCOM_CCOD, \'\' AS ITEM, \'\' AS FECHA_BENEFICIO, \'\' " +
                                            "AS MONTO, \'\' AS PORCENTAJE";
     this.oleDbSelectCommand2.Connection = this.oleDbConnection1;
     //
     // oleDbDataAdapter3
     //
     this.oleDbDataAdapter3.SelectCommand = this.oleDbSelectCommand3;
     this.oleDbDataAdapter3.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
         new System.Data.Common.DataTableMapping("Table", "T_Cuotas", new System.Data.Common.DataColumnMapping[] {
             new System.Data.Common.DataColumnMapping("CONT_NCORR", "CONT_NCORR"),
             new System.Data.Common.DataColumnMapping("INGR_NCORR", "INGR_NCORR"),
             new System.Data.Common.DataColumnMapping("F_EMISION", "F_EMISION"),
             new System.Data.Common.DataColumnMapping("MONTO", "MONTO"),
             new System.Data.Common.DataColumnMapping("DING_NDOCTO", "DING_NDOCTO"),
             new System.Data.Common.DataColumnMapping("TIPO_DOC", "TIPO_DOC"),
             new System.Data.Common.DataColumnMapping("BANCO", "BANCO"),
             new System.Data.Common.DataColumnMapping("PLAZA", "PLAZA"),
             new System.Data.Common.DataColumnMapping("F_VENCIMIENTO", "F_VENCIMIENTO")
         })
     });
     //
     // oleDbSelectCommand3
     //
     this.oleDbSelectCommand3.CommandText = "SELECT \'\' AS CONT_NCORR, \'\' AS INGR_NCORR, \'\' AS F_EMISION, \'\' AS MONTO, \'\' AS DI" +
                                            "NG_NDOCTO, \'\' AS TIPO_DOC, \'\' AS BANCO, \'\' AS PLAZA, \'\' AS F_VENCIMIENTO";
     this.oleDbSelectCommand3.Connection = this.oleDbConnection1;
     //
     // oleDbDataAdapter4
     //
     this.oleDbDataAdapter4.SelectCommand = this.oleDbSelectCommand4;
     this.oleDbDataAdapter4.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
         new System.Data.Common.DataTableMapping("Table", "T_Folio_Ref", new System.Data.Common.DataColumnMapping[] {
             new System.Data.Common.DataColumnMapping("CONT_NCORR", "CONT_NCORR"),
             new System.Data.Common.DataColumnMapping("INGR_NFOLIO_REFERENCIA", "INGR_NFOLIO_REFERENCIA")
         })
     });
     //
     // oleDbSelectCommand4
     //
     this.oleDbSelectCommand4.CommandText = "SELECT \'\' AS CONT_NCORR, \'\' AS INGR_NFOLIO_REFERENCIA, \'\' AS ingr_ncorrelativo_ca" +
                                            "ja";
     this.oleDbSelectCommand4.Connection = this.oleDbConnection1;
     //
     // oleDbConnection2
     //
     this.oleDbConnection2.ConnectionString = "Provider=SQLOLEDB;server=edoras;OLE DB Services = -2;uid=protic;pwd=,.protic;init" +
                                              "ial catalog=protic";
     //
     // oleDbSelectCommand5
     //
     this.oleDbSelectCommand5.CommandText = "SELECT \'\' AS RUT, \'\' AS NOMBRE";
     this.oleDbSelectCommand5.Connection  = this.oleDbConnection1;
     //
     // oleDbDataAdapter5
     //
     this.oleDbDataAdapter5.DeleteCommand = this.oleDbDeleteCommand1;
     this.oleDbDataAdapter5.InsertCommand = this.oleDbInsertCommand1;
     this.oleDbDataAdapter5.SelectCommand = this.oleDbSelectCommand5;
     this.oleDbDataAdapter5.UpdateCommand = this.oleDbUpdateCommand1;
     this.Load += new System.EventHandler(this.Page_Load);
     ((System.ComponentModel.ISupportInitialize)(this.dataSet11)).EndInit();
 }
Пример #43
0
        /// <summary>   Creates source code for a single data type in the HL7 normative database. </summary>
        ///
        /// <exception cref="IOException">  Thrown when an IO failure occurred. </exception>
        ///
        /// <param name="targetDirectory">  the directory into which the file will be written. </param>
        /// <param name="dataType">         Type of the data. </param>
        /// <param name="version">          the HL7 version of the intended data type. </param>
        ///
        /// ### <param name="datatype"> the name (e.g. ST, ID, etc.) of the data type to be created. </param>

        public static void make(System.IO.FileInfo targetDirectory, System.String dataType, System.String version)
        {
            Console.WriteLine(" Writing " + targetDirectory.FullName + dataType);
            //make sure that targetDirectory is a directory ...
            if (!System.IO.Directory.Exists(targetDirectory.FullName))
            {
                throw new System.IO.IOException("Can't create file in " + targetDirectory + " - it is not a directory.");
            }

            //get any components for this data type
            System.Data.OleDb.OleDbConnection conn = NormativeDatabase.Instance.Connection;
            System.Data.OleDb.OleDbCommand    stmt = SupportClass.TransactionManager.manager.CreateStatement(conn);
            System.Text.StringBuilder         sql  = new System.Text.StringBuilder();
            //this query is adapted from the XML SIG informative document
            sql.Append(
                "SELECT HL7DataStructures.data_structure, HL7DataStructureComponents.seq_no, HL7DataStructures.description, HL7DataStructureComponents.table_id,  ");
            sql.Append(
                "HL7Components.description, HL7Components.table_id, HL7Components.data_type_code, HL7Components.data_structure ");
            sql.Append(
                "FROM HL7Versions LEFT JOIN (HL7DataStructures LEFT JOIN (HL7DataStructureComponents LEFT JOIN HL7Components ");
            sql.Append("ON HL7DataStructureComponents.comp_no = HL7Components.comp_no AND ");
            sql.Append("HL7DataStructureComponents.version_id = HL7Components.version_id) ");
            sql.Append("ON HL7DataStructures.version_id = HL7DataStructureComponents.version_id ");
            sql.Append("AND HL7DataStructures.data_structure = HL7DataStructureComponents.data_structure) ");
            sql.Append("ON HL7DataStructures.version_id = HL7Versions.version_id ");
            sql.Append("WHERE HL7DataStructures.data_structure = '");
            sql.Append(dataType);
            sql.Append("' AND HL7Versions.hl7_version = '");
            sql.Append(version);
            sql.Append("' ORDER BY HL7DataStructureComponents.seq_no");
            System.Data.OleDb.OleDbCommand temp_OleDbCommand;
            temp_OleDbCommand             = stmt;
            temp_OleDbCommand.CommandText = sql.ToString();
            System.Data.OleDb.OleDbDataReader rs = temp_OleDbCommand.ExecuteReader();

            System.Collections.ArrayList dataTypes    = new System.Collections.ArrayList(20);
            System.Collections.ArrayList descriptions = new System.Collections.ArrayList(20);
            System.Collections.ArrayList tables       = new System.Collections.ArrayList(20);
            System.String description = null;
            while (rs.Read())
            {
                if (description == null)
                {
                    description = System.Convert.ToString(rs[3 - 1]);
                }

                System.String de = System.Convert.ToString(rs[5 - 1]);
                System.String dt = System.Convert.ToString(rs[8 - 1]);
                int           ta = -1;
                if (!rs.IsDBNull(4 - 1))
                {
                    ta = rs.GetInt32(4 - 1);
                }
                //trim all CE_x to CE
                if (dt != null)
                {
                    if (dt.StartsWith("CE"))
                    {
                        dt = "CE";
                    }
                }
                //System.out.println("Component: " + de + "  Data Type: " + dt);  //for debugging
                dataTypes.Add(dt);
                descriptions.Add(de);
                tables.Add(ta);
            }
            if (dataType.ToUpper().Equals("TS"))
            {
                dataTypes[0] = "TSComponentOne";
            }

            rs.Close();
            stmt.Dispose();
            NormativeDatabase.Instance.returnConnection(conn);

            //if there is only one component make a Primitive, otherwise make a Composite
            System.String source = null;
            if (dataTypes.Count == 1)
            {
                if (dataType.Equals("FT") || dataType.Equals("ST") || dataType.Equals("TX") || dataType.Equals("NM") ||
                    dataType.Equals("SI") || dataType.Equals("TN") || dataType.Equals("GTS"))
                {
                    source = makePrimitive(dataType, description, version);
                }
                else
                {
                    source = null; //note: IS, ID, DT, DTM, and TM are coded manually
                }
            }
            else if (dataTypes.Count > 1)
            {
                int numComponents = dataTypes.Count;
                //copy data into arrays ...
                System.String[] type  = new System.String[numComponents];
                System.String[] desc  = new System.String[numComponents];
                int[]           table = new int[numComponents];
                for (int i = 0; i < numComponents; i++)
                {
                    type[i]  = ((System.String)dataTypes[i]);
                    desc[i]  = ((System.String)descriptions[i]);
                    table[i] = ((System.Int32)tables[i]);
                }
                source = makeComposite(dataType, description, type, desc, table, version);
            }
            else
            {
                //no components?
                //throw new DataTypeException("The data type " + dataType + " could not be found");
                Console.WriteLine("No components for " + dataType);
            }
            //System.out.println(source);

            //write to file ...
            if (source != null)
            {
                System.String targetFile = targetDirectory + "/" + dataType + ".cs";
                using (System.IO.StreamWriter writer = new System.IO.StreamWriter(targetFile))
                {
                    writer.Write(source);
                    writer.Write("}"); //End namespace
                }
            }
            else
            {
                Console.WriteLine("No Source for " + dataType);
            }
        }
Пример #44
0
 /// <summary>
 /// Método necesario para admitir el Diseñador, no se puede modificar
 /// el contenido del método con el editor de código.
 /// </summary>
 private void InitializeComponent()
 {
     this.oleDbDataAdapter1   = new System.Data.OleDb.OleDbDataAdapter();
     this.oleDbSelectCommand1 = new System.Data.OleDb.OleDbCommand();
     this.oleDbConnection1    = new System.Data.OleDb.OleDbConnection();
     this.datosContrato1      = new imprimir_contrato_1.datosContrato();
     ((System.ComponentModel.ISupportInitialize)(this.datosContrato1)).BeginInit();
     //
     // oleDbDataAdapter1
     //
     this.oleDbDataAdapter1.SelectCommand = this.oleDbSelectCommand1;
     this.oleDbDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
         new System.Data.Common.DataTableMapping("Table", "contrato", new System.Data.Common.DataColumnMapping[] {
             new System.Data.Common.DataColumnMapping("text_antiguo", "text_antiguo"),
             new System.Data.Common.DataColumnMapping("jorn_tdesc", "jorn_tdesc"),
             new System.Data.Common.DataColumnMapping("emailp", "emailp"),
             new System.Data.Common.DataColumnMapping("eciv_tdescp", "eciv_tdescp"),
             new System.Data.Common.DataColumnMapping("pais_tdescp", "pais_tdescp"),
             new System.Data.Common.DataColumnMapping("pers_tprofesionp", "pers_tprofesionp"),
             new System.Data.Common.DataColumnMapping("emailppc", "emailppc"),
             new System.Data.Common.DataColumnMapping("eciv_tdescppc", "eciv_tdescppc"),
             new System.Data.Common.DataColumnMapping("pais_tdescppc", "pais_tdescppc"),
             new System.Data.Common.DataColumnMapping("pers_tprofesionppc", "pers_tprofesionppc"),
             new System.Data.Common.DataColumnMapping("nro_informe", "nro_informe"),
             new System.Data.Common.DataColumnMapping("NRO_INFORME1", "NRO_INFORME1"),
             new System.Data.Common.DataColumnMapping("NOMBRE_INFORME", "NOMBRE_INFORME"),
             new System.Data.Common.DataColumnMapping("NRO_CONTRATO", "NRO_CONTRATO"),
             new System.Data.Common.DataColumnMapping("DD_HOY", "DD_HOY"),
             new System.Data.Common.DataColumnMapping("MM_HOY", "MM_HOY"),
             new System.Data.Common.DataColumnMapping("YY_HOY", "YY_HOY"),
             new System.Data.Common.DataColumnMapping("PERIODO_ACADEMICO", "PERIODO_ACADEMICO"),
             new System.Data.Common.DataColumnMapping("NOMBRE_REPRESENTANTE", "NOMBRE_REPRESENTANTE"),
             new System.Data.Common.DataColumnMapping("NOMBRE_INSTITUCION", "NOMBRE_INSTITUCION"),
             new System.Data.Common.DataColumnMapping("RUT_INSTITUCION", "RUT_INSTITUCION"),
             new System.Data.Common.DataColumnMapping("RUT_POSTULANTE", "RUT_POSTULANTE"),
             new System.Data.Common.DataColumnMapping("EDAD", "EDAD"),
             new System.Data.Common.DataColumnMapping("NOMBRE_ALUMNO", "NOMBRE_ALUMNO"),
             new System.Data.Common.DataColumnMapping("CARRERA", "CARRERA"),
             new System.Data.Common.DataColumnMapping("RUT_CODEUDOR", "RUT_CODEUDOR"),
             new System.Data.Common.DataColumnMapping("NOMBRE_CODEUDOR", "NOMBRE_CODEUDOR"),
             new System.Data.Common.DataColumnMapping("PROFESION", "PROFESION"),
             new System.Data.Common.DataColumnMapping("DIRECCION", "DIRECCION"),
             new System.Data.Common.DataColumnMapping("CIUDAD", "CIUDAD"),
             new System.Data.Common.DataColumnMapping("COMUNA", "COMUNA"),
             new System.Data.Common.DataColumnMapping("TIPO_DOCUMENTO", "TIPO_DOCUMENTO"),
             new System.Data.Common.DataColumnMapping("DOCUMENTO", "DOCUMENTO"),
             new System.Data.Common.DataColumnMapping("NOMBRE_BANCO", "NOMBRE_BANCO"),
             new System.Data.Common.DataColumnMapping("VALOR_DOCTO", "VALOR_DOCTO"),
             new System.Data.Common.DataColumnMapping("NRO_DOCTO", "NRO_DOCTO"),
             new System.Data.Common.DataColumnMapping("FECHA_VENCIMIENTO", "FECHA_VENCIMIENTO"),
             new System.Data.Common.DataColumnMapping("TOTAL_M", "TOTAL_M"),
             new System.Data.Common.DataColumnMapping("TOTAL_A", "TOTAL_A"),
             new System.Data.Common.DataColumnMapping("DIRECCION_ALUMNO", "DIRECCION_ALUMNO"),
             new System.Data.Common.DataColumnMapping("COMUNA_ALUMNO", "COMUNA_ALUMNO"),
             new System.Data.Common.DataColumnMapping("texto", "texto"),
             new System.Data.Common.DataColumnMapping("CIUDAD_ALUMNO", "CIUDAD_ALUMNO")
         })
     });
     this.oleDbDataAdapter1.RowUpdated += new System.Data.OleDb.OleDbRowUpdatedEventHandler(this.oleDbDataAdapter1_RowUpdated_1);
     //
     // oleDbSelectCommand1
     //
     this.oleDbSelectCommand1.CommandText = @"SELECT '' AS text_antiguo, '' AS jorn_tdesc, '' AS emailp, '' AS eciv_tdescp, '' AS pais_tdescp, ' ' AS pers_tprofesionp, '' AS emailppc, '' AS eciv_tdescppc, '' AS pais_tdescppc, '' AS pers_tprofesionppc, 0 AS nro_informe, '' AS NOMBRE_INFORME, '' AS NRO_CONTRATO, '' AS DD_HOY, '' AS MM_HOY, '' AS YY_HOY, '' AS NOMBRE_INSTITUCION, '' AS PERIODO_ACADEMICO, '' AS RUT_INSTITUCION, '' AS NOMBRE_REPRESENTANTE, '' AS RUT_POSTULANTE, '' AS EDAD, '' AS NOMBRE_ALUMNO, '' AS CARRERA, '' AS RUT_CODEUDOR, '' AS NOMBRE_CODEUDOR, '' AS PROFESION, '' AS DIRECCION, '' AS DIRECCION_ALUMNO, '' AS CIUDAD, '' AS COMUNA, '' AS CIUDAD_ALUMNO, '' AS COMUNA_ALUMNO, '' AS TIPO_DOCUMENTO, '' AS DOCUMENTO, '' AS NOMBRE_BANCO, '' AS VALOR_DOCTO, '' AS NRO_DOCTO, '' AS FECHA_VENCIMIENTO, '' AS TOTAL_M, '' AS TOTAL_A, '' AS matricula, '' AS arancel, '' AS sede, '' AS comuna_sede,'' AS texto";
     this.oleDbSelectCommand1.Connection  = this.oleDbConnection1;
     //
     // oleDbConnection1
     //
     //  CONECTIOS STRING DE DESARROLLO
     //this.oleDbConnection1.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=protic_desa;pwd=fglio9085;Initial Catalog=sigaupa_desa;Data Source=172.16.11.111;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=MRIFFOI;Use Encryption for Data=False;Tag with column collation when possible=False";
     //  CONECTIOS STRING DE Prueba ADMISION2016
     //this.oleDbConnection1.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=protic;pwd=proticprueba;Initial Catalog=sigaupa_prueba;Data Source=10.10.10.77;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=MRIFFOI;Use Encryption for Data=False;Tag with column collation when possible=False";
     //  CONECTIOS STRING DE PRODUCCION
     this.oleDbConnection1.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=protic;pwd=pu7685bt,yet;Initial Catalog=sigaupa;Data Source=172.16.254.2;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=MRIFFOI;Use Encryption for Data=False;Tag with column collation when possible=False";
     this.oleDbConnection1.InfoMessage     += new System.Data.OleDb.OleDbInfoMessageEventHandler(this.oleDbConnection1_InfoMessage);
     //
     // datosContrato1
     //
     this.datosContrato1.DataSetName = "datosContrato";
     this.datosContrato1.Locale      = new System.Globalization.CultureInfo("es-ES");
     this.datosContrato1.Namespace   = "http://www.tempuri.org/datosContrato.xsd";
     this.Load += new System.EventHandler(this.Page_Load);
     ((System.ComponentModel.ISupportInitialize)(this.datosContrato1)).EndInit();
 }
Пример #45
0
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
            this.c1TrueDBGrid1 = new C1.Win.C1TrueDBGrid.C1TrueDBGrid();

            this.dsContacts1         = new Tutorial08.DsContacts();
            this.oleDbDataAdapter1   = new System.Data.OleDb.OleDbDataAdapter();
            this.oleDbSelectCommand1 = new System.Data.OleDb.OleDbCommand();
            this.oleDbConnection2    = new System.Data.OleDb.OleDbConnection();
            this.c1TrueDBDropdown1   = new C1.Win.C1TrueDBGrid.C1TrueDBDropdown();
            this.dsCustType1         = new Tutorial08.DsCustType();
            this.oleDbDataAdapter2   = new System.Data.OleDb.OleDbDataAdapter();
            this.oleDbDeleteCommand1 = new System.Data.OleDb.OleDbCommand();
            this.oleDbInsertCommand1 = new System.Data.OleDb.OleDbCommand();
            this.oleDbSelectCommand2 = new System.Data.OleDb.OleDbCommand();
            this.oleDbUpdateCommand1 = new System.Data.OleDb.OleDbCommand();
            ((System.ComponentModel.ISupportInitialize)(this.c1TrueDBGrid1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.dsContacts1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.c1TrueDBDropdown1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.dsCustType1)).BeginInit();
            this.SuspendLayout();
            //
            // c1TrueDBGrid1
            //
            this.c1TrueDBGrid1.AllowAddNew    = true;
            this.c1TrueDBGrid1.Caption        = "C1True DBGrid .Net";
            this.c1TrueDBGrid1.CaptionHeight  = 17;
            this.c1TrueDBGrid1.DataMember     = "Contacts";
            this.c1TrueDBGrid1.DataSource     = this.dsContacts1;
            this.c1TrueDBGrid1.GroupByCaption = "Drag a column header here to group by that column";
            this.c1TrueDBGrid1.Images.Add(((System.Drawing.Bitmap)(resources.GetObject("resource.Images"))));
            this.c1TrueDBGrid1.Location               = new System.Drawing.Point(16, 8);
            this.c1TrueDBGrid1.MarqueeStyle           = C1.Win.C1TrueDBGrid.MarqueeEnum.DottedCellBorder;
            this.c1TrueDBGrid1.Name                   = "c1TrueDBGrid1";
            this.c1TrueDBGrid1.PreviewInfo.Location   = new System.Drawing.Point(0, 0);
            this.c1TrueDBGrid1.PreviewInfo.Size       = new System.Drawing.Size(0, 0);
            this.c1TrueDBGrid1.PreviewInfo.ZoomFactor = 75;
            this.c1TrueDBGrid1.RecordSelectorWidth    = 17;
            this.c1TrueDBGrid1.RowDivider.Color       = System.Drawing.Color.DarkGray;
            this.c1TrueDBGrid1.RowDivider.Style       = C1.Win.C1TrueDBGrid.LineStyleEnum.Single;
            this.c1TrueDBGrid1.RowHeight              = 15;
            this.c1TrueDBGrid1.RowSubDividerColor     = System.Drawing.Color.DarkGray;
            this.c1TrueDBGrid1.Size                   = new System.Drawing.Size(480, 208);
            this.c1TrueDBGrid1.TabIndex               = 0;
            this.c1TrueDBGrid1.Text                   = "c1TrueDBGrid1";
            this.c1TrueDBGrid1.UnboundColumnFetch    += new C1.Win.C1TrueDBGrid.UnboundColumnFetchEventHandler(this.c1TrueDBGrid1_UnboundColumnFetch);
            this.c1TrueDBGrid1.PropBag                = "<?xml version=\"1.0\"?><Blob><DataCols><C1DataColumn Level=\"0\" Caption=\"Name\" DataF" +
                                                        "ield=\"\"><ValueItems /><GroupInfo /></C1DataColumn><C1DataColumn Level=\"0\" Captio" +
                                                        "n=\"FirstName\" DataField=\"FirstName\"><ValueItems /><GroupInfo /></C1DataColumn><C" +
                                                        "1DataColumn Level=\"0\" Caption=\"LastName\" DataField=\"LastName\"><ValueItems /><Gro" +
                                                        "upInfo /></C1DataColumn><C1DataColumn Level=\"0\" Caption=\"CustType\" DataField=\"Cu" +
                                                        "stType\"><ValueItems /><GroupInfo /></C1DataColumn><C1DataColumn Level=\"0\" Captio" +
                                                        "n=\"ContactType\" DataField=\"ContactType\"><ValueItems /><GroupInfo /></C1DataColum" +
                                                        "n><C1DataColumn Level=\"0\" Caption=\"Callback\" DataField=\"Callback\"><ValueItems />" +
                                                        "<GroupInfo /></C1DataColumn><C1DataColumn Level=\"0\" Caption=\"ContactDate\" DataFi" +
                                                        "eld=\"ContactDate\"><ValueItems /><GroupInfo /></C1DataColumn><C1DataColumn Level=" +
                                                        "\"0\" Caption=\"UserCode\" DataField=\"UserCode\"><ValueItems /><GroupInfo /></C1DataC" +
                                                        "olumn><C1DataColumn Level=\"0\" Caption=\"Expr1\" DataField=\"Expr1\"><ValueItems /><G" +
                                                        "roupInfo /></C1DataColumn></DataCols><Styles type=\"C1.Win.C1TrueDBGrid.Design.Co" +
                                                        "ntextWrapper\"><Data>HighlightRow{ForeColor:HighlightText;BackColor:Highlight;}In" +
                                                        "active{ForeColor:InactiveCaptionText;BackColor:InactiveCaption;}Selected{ForeCol" +
                                                        "or:HighlightText;BackColor:Highlight;}Editor{}FilterBar{}Heading{Wrap:True;BackC" +
                                                        "olor:Control;Border:Raised,,1, 1, 1, 1;ForeColor:ControlText;AlignVert:Center;}S" +
                                                        "tyle18{AlignHorz:Near;}Style19{AlignHorz:Near;}Style14{AlignHorz:Near;}Style15{A" +
                                                        "lignHorz:Near;}Style16{}Style17{}Style10{AlignHorz:Near;}Style11{}Style12{}Style" +
                                                        "13{}Style27{AlignHorz:Far;}Style29{}Style28{}Style26{AlignHorz:Far;}Style25{}Sty" +
                                                        "le9{}Style8{}Style24{}Style23{AlignHorz:Far;}Style5{}Style4{}Style7{}Style6{}Sty" +
                                                        "le1{}Style22{AlignHorz:Far;}Style3{}Style2{}Style21{}Style20{}OddRow{}Style38{Al" +
                                                        "ignHorz:Near;}Style39{AlignHorz:Near;}Style36{}Style37{}Style34{AlignHorz:Far;}S" +
                                                        "tyle35{AlignHorz:Far;}Style32{}Style33{}Style30{AlignHorz:Center;}Style49{}Style" +
                                                        "48{}Style31{AlignHorz:Center;}Normal{}Style41{}Style40{}Style43{AlignHorz:Near;}" +
                                                        "Style42{AlignHorz:Near;}Style45{}Style44{}Style47{AlignHorz:Near;}Style46{AlignH" +
                                                        "orz:Near;}EvenRow{BackColor:Aqua;}Style59{}Style58{}RecordSelector{AlignImage:Ce" +
                                                        "nter;}Style51{}Style50{}Footer{}Style52{}Style53{}Style54{}Style55{}Style56{}Sty" +
                                                        "le57{}Caption{AlignHorz:Center;}Style69{}Style68{}Style63{}Style62{}Style61{}Sty" +
                                                        "le60{}Style67{}Style66{}Style65{}Style64{}Group{AlignVert:Center;Border:None,,0," +
                                                        " 0, 0, 0;BackColor:ControlDark;}</Data></Styles><Splits><C1.Win.C1TrueDBGrid.Mer" +
                                                        "geView Name=\"\" CaptionHeight=\"17\" ColumnCaptionHeight=\"17\" ColumnFooterHeight=\"1" +
                                                        "7\" MarqueeStyle=\"DottedCellBorder\" RecordSelectorWidth=\"17\" DefRecSelWidth=\"17\" " +
                                                        "VerticalScrollGroup=\"1\" HorizontalScrollGroup=\"1\"><ClientRect>0, 17, 476, 187</C" +
                                                        "lientRect><BorderSide>0</BorderSide><CaptionStyle parent=\"Style2\" me=\"Style10\" /" +
                                                        "><EditorStyle parent=\"Editor\" me=\"Style5\" /><EvenRowStyle parent=\"EvenRow\" me=\"S" +
                                                        "tyle8\" /><FilterBarStyle parent=\"FilterBar\" me=\"Style13\" /><FooterStyle parent=\"" +
                                                        "Footer\" me=\"Style3\" /><GroupStyle parent=\"Group\" me=\"Style12\" /><HeadingStyle pa" +
                                                        "rent=\"Heading\" me=\"Style2\" /><HighLightRowStyle parent=\"HighlightRow\" me=\"Style7" +
                                                        "\" /><InactiveStyle parent=\"Inactive\" me=\"Style4\" /><OddRowStyle parent=\"OddRow\" " +
                                                        "me=\"Style9\" /><RecordSelectorStyle parent=\"RecordSelector\" me=\"Style11\" /><Selec" +
                                                        "tedStyle parent=\"Selected\" me=\"Style6\" /><Style parent=\"Normal\" me=\"Style1\" /><i" +
                                                        "nternalCols><C1DisplayColumn><HeadingStyle parent=\"Style2\" me=\"Style46\" /><Style" +
                                                        " parent=\"Style1\" me=\"Style47\" /><FooterStyle parent=\"Style3\" me=\"Style48\" /><Edi" +
                                                        "torStyle parent=\"Style5\" me=\"Style49\" /><GroupHeaderStyle parent=\"Style1\" me=\"St" +
                                                        "yle53\" /><GroupFooterStyle parent=\"Style1\" me=\"Style52\" /><ColumnDivider>DarkGra" +
                                                        "y,Single</ColumnDivider><Height>15</Height><DCIdx>0</DCIdx></C1DisplayColumn><C1" +
                                                        "DisplayColumn><HeadingStyle parent=\"Style2\" me=\"Style14\" /><Style parent=\"Style1" +
                                                        "\" me=\"Style15\" /><FooterStyle parent=\"Style3\" me=\"Style16\" /><EditorStyle parent" +
                                                        "=\"Style5\" me=\"Style17\" /><GroupHeaderStyle parent=\"Style1\" me=\"Style55\" /><Group" +
                                                        "FooterStyle parent=\"Style1\" me=\"Style54\" /><Visible>True</Visible><ColumnDivider" +
                                                        ">DarkGray,Single</ColumnDivider><Height>15</Height><DCIdx>1</DCIdx></C1DisplayCo" +
                                                        "lumn><C1DisplayColumn><HeadingStyle parent=\"Style2\" me=\"Style18\" /><Style parent" +
                                                        "=\"Style1\" me=\"Style19\" /><FooterStyle parent=\"Style3\" me=\"Style20\" /><EditorStyl" +
                                                        "e parent=\"Style5\" me=\"Style21\" /><GroupHeaderStyle parent=\"Style1\" me=\"Style57\" " +
                                                        "/><GroupFooterStyle parent=\"Style1\" me=\"Style56\" /><Visible>True</Visible><Colum" +
                                                        "nDivider>DarkGray,Single</ColumnDivider><Height>15</Height><DCIdx>2</DCIdx></C1D" +
                                                        "isplayColumn><C1DisplayColumn><HeadingStyle parent=\"Style2\" me=\"Style22\" /><Styl" +
                                                        "e parent=\"Style1\" me=\"Style23\" /><FooterStyle parent=\"Style3\" me=\"Style24\" /><Ed" +
                                                        "itorStyle parent=\"Style5\" me=\"Style25\" /><GroupHeaderStyle parent=\"Style1\" me=\"S" +
                                                        "tyle59\" /><GroupFooterStyle parent=\"Style1\" me=\"Style58\" /><Visible>True</Visibl" +
                                                        "e><ColumnDivider>DarkGray,Single</ColumnDivider><Height>15</Height><DCIdx>3</DCI" +
                                                        "dx></C1DisplayColumn><C1DisplayColumn><HeadingStyle parent=\"Style2\" me=\"Style30\"" +
                                                        " /><Style parent=\"Style1\" me=\"Style31\" /><FooterStyle parent=\"Style3\" me=\"Style3" +
                                                        "2\" /><EditorStyle parent=\"Style5\" me=\"Style33\" /><GroupHeaderStyle parent=\"Style" +
                                                        "1\" me=\"Style63\" /><GroupFooterStyle parent=\"Style1\" me=\"Style62\" /><Visible>True" +
                                                        "</Visible><ColumnDivider>DarkGray,Single</ColumnDivider><Height>15</Height><DCId" +
                                                        "x>5</DCIdx></C1DisplayColumn><C1DisplayColumn><HeadingStyle parent=\"Style2\" me=\"" +
                                                        "Style34\" /><Style parent=\"Style1\" me=\"Style35\" /><FooterStyle parent=\"Style3\" me" +
                                                        "=\"Style36\" /><EditorStyle parent=\"Style5\" me=\"Style37\" /><GroupHeaderStyle paren" +
                                                        "t=\"Style1\" me=\"Style65\" /><GroupFooterStyle parent=\"Style1\" me=\"Style64\" /><Visi" +
                                                        "ble>True</Visible><ColumnDivider>DarkGray,Single</ColumnDivider><Height>15</Heig" +
                                                        "ht><DCIdx>6</DCIdx></C1DisplayColumn><C1DisplayColumn><HeadingStyle parent=\"Styl" +
                                                        "e2\" me=\"Style26\" /><Style parent=\"Style1\" me=\"Style27\" /><FooterStyle parent=\"St" +
                                                        "yle3\" me=\"Style28\" /><EditorStyle parent=\"Style5\" me=\"Style29\" /><GroupHeaderSty" +
                                                        "le parent=\"Style1\" me=\"Style61\" /><GroupFooterStyle parent=\"Style1\" me=\"Style60\"" +
                                                        " /><Visible>True</Visible><ColumnDivider>DarkGray,Single</ColumnDivider><Height>" +
                                                        "15</Height><DCIdx>4</DCIdx></C1DisplayColumn><C1DisplayColumn><HeadingStyle pare" +
                                                        "nt=\"Style2\" me=\"Style42\" /><Style parent=\"Style1\" me=\"Style43\" /><FooterStyle pa" +
                                                        "rent=\"Style3\" me=\"Style44\" /><EditorStyle parent=\"Style5\" me=\"Style45\" /><GroupH" +
                                                        "eaderStyle parent=\"Style1\" me=\"Style69\" /><GroupFooterStyle parent=\"Style1\" me=\"" +
                                                        "Style68\" /><Visible>True</Visible><ColumnDivider>DarkGray,Single</ColumnDivider>" +
                                                        "<Height>15</Height><DCIdx>8</DCIdx></C1DisplayColumn><C1DisplayColumn><HeadingSt" +
                                                        "yle parent=\"Style2\" me=\"Style38\" /><Style parent=\"Style1\" me=\"Style39\" /><Footer" +
                                                        "Style parent=\"Style3\" me=\"Style40\" /><EditorStyle parent=\"Style5\" me=\"Style41\" /" +
                                                        "><GroupHeaderStyle parent=\"Style1\" me=\"Style67\" /><GroupFooterStyle parent=\"Styl" +
                                                        "e1\" me=\"Style66\" /><Visible>True</Visible><ColumnDivider>DarkGray,Single</Column" +
                                                        "Divider><Height>15</Height><DCIdx>7</DCIdx></C1DisplayColumn></internalCols></C1" +
                                                        ".Win.C1TrueDBGrid.MergeView></Splits><NamedStyles><Style parent=\"\" me=\"Normal\" /" +
                                                        "><Style parent=\"Normal\" me=\"Heading\" /><Style parent=\"Heading\" me=\"Footer\" /><St" +
                                                        "yle parent=\"Heading\" me=\"Caption\" /><Style parent=\"Heading\" me=\"Inactive\" /><Sty" +
                                                        "le parent=\"Normal\" me=\"Selected\" /><Style parent=\"Normal\" me=\"Editor\" /><Style p" +
                                                        "arent=\"Normal\" me=\"HighlightRow\" /><Style parent=\"Normal\" me=\"EvenRow\" /><Style " +
                                                        "parent=\"Normal\" me=\"OddRow\" /><Style parent=\"Heading\" me=\"RecordSelector\" /><Sty" +
                                                        "le parent=\"Normal\" me=\"FilterBar\" /><Style parent=\"Caption\" me=\"Group\" /></Named" +
                                                        "Styles><vertSplits>1</vertSplits><horzSplits>1</horzSplits><Layout>Modified</Lay" +
                                                        "out><DefaultRecSelWidth>17</DefaultRecSelWidth><ClientArea>0, 0, 476, 204</Clien" +
                                                        "tArea><PrintPageHeaderStyle parent=\"\" me=\"Style50\" /><PrintPageFooterStyle paren" +
                                                        "t=\"\" me=\"Style51\" /></Blob>";
            //
            // dsContacts1
            //
            this.dsContacts1.DataSetName = "DsContacts";
            this.dsContacts1.Locale      = new System.Globalization.CultureInfo("en-US");
            this.dsContacts1.Namespace   = "http://www.tempuri.org/DsContacts.xsd";
            //
            // oleDbDataAdapter1
            //
            this.oleDbDataAdapter1.SelectCommand = this.oleDbSelectCommand1;
            this.oleDbDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
                new System.Data.Common.DataTableMapping("Table", "Contacts", new System.Data.Common.DataColumnMapping[] {
                    new System.Data.Common.DataColumnMapping("FirstName", "FirstName"),
                    new System.Data.Common.DataColumnMapping("LastName", "LastName"),
                    new System.Data.Common.DataColumnMapping("CustType", "CustType"),
                    new System.Data.Common.DataColumnMapping("ContactType", "ContactType"),
                    new System.Data.Common.DataColumnMapping("Callback", "Callback"),
                    new System.Data.Common.DataColumnMapping("ContactDate", "ContactDate"),
                    new System.Data.Common.DataColumnMapping("UserCode", "UserCode"),
                    new System.Data.Common.DataColumnMapping("Expr1", "Expr1")
                })
            });
            //
            // oleDbSelectCommand1
            //
            this.oleDbSelectCommand1.CommandText = "SELECT Customer.FirstName, Customer.LastName, Customer.CustType, Contacts.Cont" +
                                                   "actType, Contacts.Callback, Contacts.ContactDate, Contacts.UserCode, Customer.U" +
                                                   "serCode AS Expr1 FROM Contacts INNER JOIN Customer ON Contacts.UserCode = Custo" +
                                                   "mer.UserCode";
            this.oleDbSelectCommand1.Connection = this.oleDbConnection2;
            //
            // oleDbConnection2
            //
            this.oleDbConnection2.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User ID=Admin;Data Source=C:\Program Files\ComponentOne Studio.NET 2.0\Common\TDBGDemo.mdb;Mode=Share Deny None;Extended Properties="""";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet OLEDB:Database Password="""";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password="""";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False";
            //
            // c1TrueDBDropdown1
            //
            this.c1TrueDBDropdown1.AllowColMove        = true;
            this.c1TrueDBDropdown1.AllowColSelect      = true;
            this.c1TrueDBDropdown1.AllowRowSizing      = C1.Win.C1TrueDBGrid.RowSizingEnum.AllRows;
            this.c1TrueDBDropdown1.AlternatingRows     = false;
            this.c1TrueDBDropdown1.CaptionHeight       = 17;
            this.c1TrueDBDropdown1.ColumnCaptionHeight = 17;
            this.c1TrueDBDropdown1.ColumnFooterHeight  = 17;
            this.c1TrueDBDropdown1.DataMember          = "CustType";
            this.c1TrueDBDropdown1.DataSource          = this.dsCustType1;
            this.c1TrueDBDropdown1.FetchRowStyles      = false;
            this.c1TrueDBDropdown1.Images.Add(((System.Drawing.Bitmap)(resources.GetObject("resource.Images1"))));
            this.c1TrueDBDropdown1.LayoutFileName     = "";
            this.c1TrueDBDropdown1.LayoutName         = "";
            this.c1TrueDBDropdown1.LayoutURL          = "";
            this.c1TrueDBDropdown1.DisplayMember      = "CustType.TypeId";
            this.c1TrueDBDropdown1.Location           = new System.Drawing.Point(272, 56);
            this.c1TrueDBDropdown1.Name               = "c1TrueDBDropdown1";
            this.c1TrueDBDropdown1.RowDivider.Color   = System.Drawing.Color.DarkGray;
            this.c1TrueDBDropdown1.RowDivider.Style   = C1.Win.C1TrueDBGrid.LineStyleEnum.Single;
            this.c1TrueDBDropdown1.RowHeight          = 15;
            this.c1TrueDBDropdown1.RowSubDividerColor = System.Drawing.Color.DarkGray;
            this.c1TrueDBDropdown1.ScrollTips         = false;
            this.c1TrueDBDropdown1.Size               = new System.Drawing.Size(192, 136);
            this.c1TrueDBDropdown1.TabIndex           = 1;
            this.c1TrueDBDropdown1.Text               = "c1TrueDBDropdown1";
            this.c1TrueDBDropdown1.Visible            = false;
            this.c1TrueDBDropdown1.PropBag            = "<?xml version=\"1.0\"?><Blob><DataCols><C1DataColumn Level=\"0\" Caption=\"TypeDesc\" D" +
                                                        "ataField=\"TypeDesc\"><ValueItems /><GroupInfo /></C1DataColumn><C1DataColumn Leve" +
                                                        "l=\"0\" Caption=\"TypeId\" DataField=\"TypeId\"><ValueItems /><GroupInfo /></C1DataCol" +
                                                        "umn></DataCols><Styles type=\"C1.Win.C1TrueDBGrid.Design.ContextWrapper\"><Data>Ca" +
                                                        "ption{AlignHorz:Center;}Normal{}Style25{}Selected{ForeColor:HighlightText;BackCo" +
                                                        "lor:Highlight;}Editor{}Style18{AlignHorz:Near;}Style19{AlignHorz:Near;}Style14{A" +
                                                        "lignHorz:Near;}Style15{AlignHorz:Near;}Style16{}Style17{}Style10{AlignHorz:Near;" +
                                                        "}Style11{}OddRow{}Style13{}Style12{}Footer{}HighlightRow{ForeColor:HighlightText" +
                                                        ";BackColor:Highlight;}RecordSelector{AlignImage:Center;}Style24{}Style23{}Style2" +
                                                        "2{}Style21{}Style20{}Inactive{ForeColor:InactiveCaptionText;BackColor:InactiveCa" +
                                                        "ption;}EvenRow{BackColor:Aqua;}Heading{Wrap:True;BackColor:Control;Border:Raised" +
                                                        ",,1, 1, 1, 1;ForeColor:ControlText;AlignVert:Center;}FilterBar{}Style4{}Style9{}" +
                                                        "Style8{}Style5{}Group{AlignVert:Center;Border:None,,0, 0, 0, 0;BackColor:Control" +
                                                        "Dark;}Style7{}Style6{}Style1{}Style3{}Style2{}</Data></Styles><Splits><C1.Win.C1" +
                                                        "TrueDBGrid.DropdownView Name=\"\" CaptionHeight=\"17\" ColumnCaptionHeight=\"17\" Colu" +
                                                        "mnFooterHeight=\"17\" MarqueeStyle=\"DottedCellBorder\" RecordSelectorWidth=\"16\" Rec" +
                                                        "ordSelectors=\"False\" VerticalScrollGroup=\"1\" HorizontalScrollGroup=\"1\"><ClientRe" +
                                                        "ct>0, 0, 188, 132</ClientRect><internalCols><C1DropDisplayColumn><DCIdx>0</DCIdx" +
                                                        "><HeadingStyle parent=\"Style2\" me=\"Style14\" /><Style parent=\"Style1\" me=\"Style15" +
                                                        "\" /><FooterStyle parent=\"Style3\" me=\"Style16\" /><EditorStyle parent=\"Style5\" me=" +
                                                        "\"Style17\" /><GroupHeaderStyle parent=\"Style1\" me=\"Style23\" /><GroupFooterStyle p" +
                                                        "arent=\"Style1\" me=\"Style22\" /><Visible>True</Visible><ColumnDivider>DarkGray,Sin" +
                                                        "gle</ColumnDivider><Height>15</Height></C1DropDisplayColumn><C1DropDisplayColumn" +
                                                        "><DCIdx>1</DCIdx><HeadingStyle parent=\"Style2\" me=\"Style18\" /><Style parent=\"Sty" +
                                                        "le1\" me=\"Style19\" /><FooterStyle parent=\"Style3\" me=\"Style20\" /><EditorStyle par" +
                                                        "ent=\"Style5\" me=\"Style21\" /><GroupHeaderStyle parent=\"Style1\" me=\"Style25\" /><Gr" +
                                                        "oupFooterStyle parent=\"Style1\" me=\"Style24\" /><Visible>True</Visible><ColumnDivi" +
                                                        "der>DarkGray,Single</ColumnDivider><Height>15</Height></C1DropDisplayColumn></in" +
                                                        "ternalCols><CaptionStyle parent=\"Style2\" me=\"Style10\" /><EditorStyle parent=\"Edi" +
                                                        "tor\" me=\"Style5\" /><EvenRowStyle parent=\"EvenRow\" me=\"Style8\" /><FilterBarStyle " +
                                                        "parent=\"FilterBar\" me=\"Style13\" /><FooterStyle parent=\"Footer\" me=\"Style3\" /><Gr" +
                                                        "oupStyle parent=\"Group\" me=\"Style12\" /><HeadingStyle parent=\"Heading\" me=\"Style2" +
                                                        "\" /><HighLightRowStyle parent=\"HighlightRow\" me=\"Style7\" /><InactiveStyle parent" +
                                                        "=\"Inactive\" me=\"Style4\" /><OddRowStyle parent=\"OddRow\" me=\"Style9\" /><RecordSele" +
                                                        "ctorStyle parent=\"RecordSelector\" me=\"Style11\" /><SelectedStyle parent=\"Selected" +
                                                        "\" me=\"Style6\" /><Style parent=\"Normal\" me=\"Style1\" /></C1.Win.C1TrueDBGrid.Dropd" +
                                                        "ownView></Splits><NamedStyles><Style parent=\"\" me=\"Normal\" /><Style parent=\"Norm" +
                                                        "al\" me=\"Heading\" /><Style parent=\"Heading\" me=\"Footer\" /><Style parent=\"Heading\"" +
                                                        " me=\"Caption\" /><Style parent=\"Heading\" me=\"Inactive\" /><Style parent=\"Normal\" m" +
                                                        "e=\"Selected\" /><Style parent=\"Normal\" me=\"Editor\" /><Style parent=\"Normal\" me=\"H" +
                                                        "ighlightRow\" /><Style parent=\"Normal\" me=\"EvenRow\" /><Style parent=\"Normal\" me=\"" +
                                                        "OddRow\" /><Style parent=\"Heading\" me=\"RecordSelector\" /><Style parent=\"Normal\" m" +
                                                        "e=\"FilterBar\" /><Style parent=\"Caption\" me=\"Group\" /></NamedStyles><vertSplits>1" +
                                                        "</vertSplits><horzSplits>1</horzSplits><Layout>Modified</Layout><DefaultRecSelWi" +
                                                        "dth>17</DefaultRecSelWidth><ClientArea>0, 0, 188, 132</ClientArea></Blob>";
            //
            // dsCustType1
            //
            this.dsCustType1.DataSetName = "DsCustType";
            this.dsCustType1.Locale      = new System.Globalization.CultureInfo("en-US");
            this.dsCustType1.Namespace   = "http://www.tempuri.org/DsCustType.xsd";
            //
            // oleDbDataAdapter2
            //
            this.oleDbDataAdapter2.DeleteCommand = this.oleDbDeleteCommand1;
            this.oleDbDataAdapter2.InsertCommand = this.oleDbInsertCommand1;
            this.oleDbDataAdapter2.SelectCommand = this.oleDbSelectCommand2;
            this.oleDbDataAdapter2.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
                new System.Data.Common.DataTableMapping("Table", "CustType", new System.Data.Common.DataColumnMapping[] {
                    new System.Data.Common.DataColumnMapping("TypeDesc", "TypeDesc"),
                    new System.Data.Common.DataColumnMapping("TypeId", "TypeId")
                })
            });
            this.oleDbDataAdapter2.UpdateCommand = this.oleDbUpdateCommand1;
            //
            // oleDbDeleteCommand1
            //
            this.oleDbDeleteCommand1.CommandText = "DELETE FROM CustType WHERE (TypeId = ?) AND (TypeDesc = ? OR ? IS NULL AND TypeDe" +
                                                   "sc IS NULL)";
            this.oleDbDeleteCommand1.Connection = this.oleDbConnection2;
            this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_TypeId", System.Data.OleDb.OleDbType.VarWChar, 1, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "TypeId", System.Data.DataRowVersion.Original, null));
            this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_TypeDesc", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "TypeDesc", System.Data.DataRowVersion.Original, null));
            this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_TypeDesc1", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "TypeDesc", System.Data.DataRowVersion.Original, null));
            //
            // oleDbInsertCommand1
            //
            this.oleDbInsertCommand1.CommandText = "INSERT INTO CustType(TypeDesc, TypeId) VALUES (?, ?)";
            this.oleDbInsertCommand1.Connection  = this.oleDbConnection2;
            this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("TypeDesc", System.Data.OleDb.OleDbType.VarWChar, 15, "TypeDesc"));
            this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("TypeId", System.Data.OleDb.OleDbType.VarWChar, 1, "TypeId"));
            //
            // oleDbSelectCommand2
            //
            this.oleDbSelectCommand2.CommandText = "SELECT TypeDesc, TypeId FROM CustType";
            this.oleDbSelectCommand2.Connection  = this.oleDbConnection2;
            //
            // oleDbUpdateCommand1
            //
            this.oleDbUpdateCommand1.CommandText = "UPDATE CustType SET TypeDesc = ?, TypeId = ? WHERE (TypeId = ?) AND (TypeDesc = ?" +
                                                   " OR ? IS NULL AND TypeDesc IS NULL)";
            this.oleDbUpdateCommand1.Connection = this.oleDbConnection2;
            this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("TypeDesc", System.Data.OleDb.OleDbType.VarWChar, 15, "TypeDesc"));
            this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("TypeId", System.Data.OleDb.OleDbType.VarWChar, 1, "TypeId"));
            this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_TypeId", System.Data.OleDb.OleDbType.VarWChar, 1, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "TypeId", System.Data.DataRowVersion.Original, null));
            this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_TypeDesc", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "TypeDesc", System.Data.DataRowVersion.Original, null));
            this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_TypeDesc1", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "TypeDesc", System.Data.DataRowVersion.Original, null));
            //
            // Form1
            //
            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
            this.ClientSize        = new System.Drawing.Size(504, 222);
            this.Controls.AddRange(new System.Windows.Forms.Control[] {
                this.c1TrueDBDropdown1,
                this.c1TrueDBGrid1
            });
            this.Name  = "Form1";
            this.Text  = "Form1";
            this.Load += new System.EventHandler(this.Form1_Load);
            ((System.ComponentModel.ISupportInitialize)(this.c1TrueDBGrid1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.dsContacts1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.c1TrueDBDropdown1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.dsCustType1)).EndInit();
            this.ResumeLayout(false);
        }
Пример #46
0
        private void FillResults(string filePath)
        {
            const string METHOD_NAME = "FillResults";
            DataSet      ds;
            decimal      dAmt;
            string       cntNo = "";
            string       amt   = "";
            string       ded   = "";

            string dbg = "0";

            try {
                string connStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + filePath + ";Extended Properties=Excel 8.0;";
                dbg = "1";
                using (System.Data.OleDb.OleDbConnection xConn = new System.Data.OleDb.OleDbConnection(connStr)) {
                    dbg = "2";
                    xConn.Open();
                    dbg = "3";
                    ds  = new DataSet();
                    dbg = "4";
                    System.Data.OleDb.OleDbDataAdapter xAdapt = new System.Data.OleDb.OleDbDataAdapter("select Contract, Amount, Deduction from [Deductions$] where len(Contract) > 0", xConn);
                    dbg = "5";
                    xAdapt.Fill(ds);
                    dbg = "6";

                    // fix amounts
                    foreach (System.Data.DataRow dRow in ds.Tables[0].Rows)
                    {
                        try {
                            dbg   = "7";
                            cntNo = dRow["Contract"].ToString();
                            dbg   = "8";
                            if (cntNo.Length == 0)
                            {
                                break;
                            }
                            amt = dRow["Amount"].ToString();
                            dbg = "9";
                            ded = dRow["Deduction"].ToString();
                            dbg = "10";

                            dAmt           = Math.Round(Convert.ToDecimal(amt), 2);
                            dbg            = "11";
                            dRow["Amount"] = dAmt.ToString("#.00");
                            dbg            = "12";
                        }
                        catch (Exception ex) {
                            WSCIEMP.Common.CWarning warn = new WSCIEMP.Common.CWarning("Error processing the Amount, " + amt + ", for Contract " + cntNo + " with Deduction " + ded + ".", ex);
                            throw (warn);
                        }
                    }
                }

                // Save excel data into an XML document.
                string fileExt = System.IO.Path.GetExtension(filePath);
                dbg = "13";
                string xmlFilePath = filePath.Replace(fileExt, ".xml");
                dbg = "14";
                ds.WriteXml(xmlFilePath, System.Data.XmlWriteMode.IgnoreSchema);
                dbg = "15";

                // Retrieve the xml formatted input data and qualify it in the database.
                string xmlData = "";
                dbg = "16";
                int cropYear = Convert.ToInt32(Common.UILib.GetDropDownText(ddlCropYear));
                dbg = "17";

                // Retrieve the xml document of deductions: contract, amount, and deduction.
                using (System.IO.StreamReader reader = new StreamReader(xmlFilePath)) {
                    dbg     = "18";
                    xmlData = reader.ReadToEnd().Replace("\r\n", "");
                    dbg     = "19";
                }

                // Send to db to qualify
                using (SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["BeetConn"].ToString())) {
                    dbg = "20";
                    SqlDataReader dr = WSCAdmin.ContractDeductionQualify(conn, cropYear, xmlData);
                    dbg = "21";
                    // Load results into  grid
                    grdResults.DataSource = dr;
                    dbg = "22";
                    grdResults.DataBind(); dbg = "20";
                    dbg = "23";
                }
            }
            catch (Exception ex) {
                Common.CException wex = new Common.CException(MOD_NAME + METHOD_NAME
                                                              + "\filePath: " + filePath
                                                              + "\ndbg: " + dbg, ex);
                throw (wex);
            }
        }
Пример #47
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor gridColumnDescriptor1 = new Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor();
     Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor gridColumnDescriptor2 = new Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor();
     Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor gridColumnDescriptor3 = new Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor();
     Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor gridColumnDescriptor4 = new Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor();
     Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor gridColumnDescriptor5 = new Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor();
     Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor gridColumnDescriptor6 = new Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor();
     Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor gridColumnDescriptor7 = new Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor();
     this.gridGroupingControl1 = new Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControl();
     this.dataSet11            = new Filtering_Tutorial.DataSet1();
     this.oleDbDataAdapter1    = new System.Data.OleDb.OleDbDataAdapter();
     this.oleDbDeleteCommand1  = new System.Data.OleDb.OleDbCommand();
     this.oleDbConnection1     = new System.Data.OleDb.OleDbConnection();
     this.oleDbInsertCommand1  = new System.Data.OleDb.OleDbCommand();
     this.oleDbSelectCommand1  = new System.Data.OleDb.OleDbCommand();
     this.oleDbUpdateCommand1  = new System.Data.OleDb.OleDbCommand();
     this.propertyGrid1        = new System.Windows.Forms.PropertyGrid();
     ((System.ComponentModel.ISupportInitialize)(this.gridGroupingControl1)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.dataSet11)).BeginInit();
     this.SuspendLayout();
     //
     // gridGroupingControl1
     //
     this.gridGroupingControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                               | System.Windows.Forms.AnchorStyles.Left)
                                                                              | System.Windows.Forms.AnchorStyles.Right)));
     this.gridGroupingControl1.BackColor = System.Drawing.SystemColors.Window;
     this.gridGroupingControl1.ChildGroupOptions.ShowAddNewRecordBeforeDetails = false;
     this.gridGroupingControl1.ChildGroupOptions.ShowCaption = false;
     this.gridGroupingControl1.FreezeCaption        = false;
     this.gridGroupingControl1.GridOfficeScrollBars = Syncfusion.Windows.Forms.OfficeScrollBars.Metro;
     this.gridGroupingControl1.GridVisualStyles     = Syncfusion.Windows.Forms.GridVisualStyles.Metro;
     this.gridGroupingControl1.Location             = new System.Drawing.Point(12, 12);
     this.gridGroupingControl1.Name = "gridGroupingControl1";
     this.gridGroupingControl1.NestedTableGroupOptions.ShowAddNewRecordBeforeDetails = false;
     this.gridGroupingControl1.NestedTableGroupOptions.ShowCaption = false;
     this.gridGroupingControl1.Size     = new System.Drawing.Size(719, 632);
     this.gridGroupingControl1.TabIndex = 0;
     this.gridGroupingControl1.TableDescriptor.AllowNew = false;
     this.gridGroupingControl1.TableDescriptor.Appearance.AnyCell.Font.Facename             = "Segoe UI";
     this.gridGroupingControl1.TableDescriptor.Appearance.AnyCell.TextColor                 = System.Drawing.Color.FromArgb(((int)(((byte)(138)))), ((int)(((byte)(138)))), ((int)(((byte)(138)))));
     this.gridGroupingControl1.TableDescriptor.Appearance.AnyGroupCell.Borders.Bottom       = new Syncfusion.Windows.Forms.Grid.GridBorder(Syncfusion.Windows.Forms.Grid.GridBorderStyle.Solid, System.Drawing.Color.FromArgb(((int)(((byte)(234)))), ((int)(((byte)(234)))), ((int)(((byte)(234))))), Syncfusion.Windows.Forms.Grid.GridBorderWeight.ExtraThin);
     this.gridGroupingControl1.TableDescriptor.Appearance.AnyGroupCell.Borders.Right        = new Syncfusion.Windows.Forms.Grid.GridBorder(Syncfusion.Windows.Forms.Grid.GridBorderStyle.Solid, System.Drawing.Color.FromArgb(((int)(((byte)(234)))), ((int)(((byte)(234)))), ((int)(((byte)(234))))), Syncfusion.Windows.Forms.Grid.GridBorderWeight.ExtraThin);
     this.gridGroupingControl1.TableDescriptor.Appearance.AnyGroupCell.Interior             = new Syncfusion.Drawing.BrushInfo(System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))));
     this.gridGroupingControl1.TableDescriptor.Appearance.AnyGroupCell.TextColor            = System.Drawing.Color.FromArgb(((int)(((byte)(138)))), ((int)(((byte)(138)))), ((int)(((byte)(138)))));
     this.gridGroupingControl1.TableDescriptor.Appearance.AnyRecordFieldCell.Borders.Bottom = new Syncfusion.Windows.Forms.Grid.GridBorder(Syncfusion.Windows.Forms.Grid.GridBorderStyle.Solid, System.Drawing.Color.FromArgb(((int)(((byte)(234)))), ((int)(((byte)(234)))), ((int)(((byte)(234))))), Syncfusion.Windows.Forms.Grid.GridBorderWeight.ExtraThin);
     this.gridGroupingControl1.TableDescriptor.Appearance.AnyRecordFieldCell.Borders.Right  = new Syncfusion.Windows.Forms.Grid.GridBorder(Syncfusion.Windows.Forms.Grid.GridBorderStyle.Solid, System.Drawing.Color.FromArgb(((int)(((byte)(234)))), ((int)(((byte)(234)))), ((int)(((byte)(234))))), Syncfusion.Windows.Forms.Grid.GridBorderWeight.ExtraThin);
     this.gridGroupingControl1.TableDescriptor.Appearance.AnySummaryCell.Borders.Right      = new Syncfusion.Windows.Forms.Grid.GridBorder(Syncfusion.Windows.Forms.Grid.GridBorderStyle.Solid, System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(208)))), ((int)(((byte)(208))))), Syncfusion.Windows.Forms.Grid.GridBorderWeight.ExtraThin);
     this.gridGroupingControl1.TableDescriptor.Appearance.AnySummaryCell.Borders.Top        = new Syncfusion.Windows.Forms.Grid.GridBorder(Syncfusion.Windows.Forms.Grid.GridBorderStyle.Solid, System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(208)))), ((int)(((byte)(208))))), Syncfusion.Windows.Forms.Grid.GridBorderWeight.ExtraThin);
     this.gridGroupingControl1.TableDescriptor.Appearance.AnySummaryCell.Interior           = new Syncfusion.Drawing.BrushInfo(System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(208)))), ((int)(((byte)(208))))));
     this.gridGroupingControl1.TableDescriptor.Appearance.ColumnHeaderCell.Font.Bold        = true;
     this.gridGroupingControl1.TableDescriptor.Appearance.GroupCaptionCell.CellType         = "ColumnHeader";
     gridColumnDescriptor1.HeaderImage          = null;
     gridColumnDescriptor1.HeaderImageAlignment = Syncfusion.Windows.Forms.Grid.Grouping.HeaderImageAlignment.Left;
     gridColumnDescriptor1.HeaderText           = "ID";
     gridColumnDescriptor1.MappingName          = "ID";
     gridColumnDescriptor1.SerializedImageArray = "";
     gridColumnDescriptor2.HeaderImage          = null;
     gridColumnDescriptor2.HeaderImageAlignment = Syncfusion.Windows.Forms.Grid.Grouping.HeaderImageAlignment.Left;
     gridColumnDescriptor2.HeaderText           = "losses";
     gridColumnDescriptor2.MappingName          = "losses";
     gridColumnDescriptor2.SerializedImageArray = "";
     gridColumnDescriptor3.HeaderImage          = null;
     gridColumnDescriptor3.HeaderImageAlignment = Syncfusion.Windows.Forms.Grid.Grouping.HeaderImageAlignment.Left;
     gridColumnDescriptor3.HeaderText           = "School";
     gridColumnDescriptor3.MappingName          = "School";
     gridColumnDescriptor3.SerializedImageArray = "";
     gridColumnDescriptor4.HeaderImage          = null;
     gridColumnDescriptor4.HeaderImageAlignment = Syncfusion.Windows.Forms.Grid.Grouping.HeaderImageAlignment.Left;
     gridColumnDescriptor4.HeaderText           = "Sport";
     gridColumnDescriptor4.MappingName          = "Sport";
     gridColumnDescriptor4.SerializedImageArray = "";
     gridColumnDescriptor5.HeaderImage          = null;
     gridColumnDescriptor5.HeaderImageAlignment = Syncfusion.Windows.Forms.Grid.Grouping.HeaderImageAlignment.Left;
     gridColumnDescriptor5.HeaderText           = "ties";
     gridColumnDescriptor5.MappingName          = "ties";
     gridColumnDescriptor5.SerializedImageArray = "";
     gridColumnDescriptor6.Appearance.AnyRecordFieldCell.Interior  = new Syncfusion.Drawing.BrushInfo(System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(255)))), ((int)(((byte)(187)))), ((int)(((byte)(111))))));
     gridColumnDescriptor6.Appearance.AnyRecordFieldCell.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(81)))));
     gridColumnDescriptor6.HeaderImage          = null;
     gridColumnDescriptor6.HeaderImageAlignment = Syncfusion.Windows.Forms.Grid.Grouping.HeaderImageAlignment.Left;
     gridColumnDescriptor6.HeaderText           = "wins";
     gridColumnDescriptor6.MappingName          = "wins";
     gridColumnDescriptor6.SerializedImageArray = "";
     gridColumnDescriptor6.Width                = 50;
     gridColumnDescriptor7.HeaderImage          = null;
     gridColumnDescriptor7.HeaderImageAlignment = Syncfusion.Windows.Forms.Grid.Grouping.HeaderImageAlignment.Left;
     gridColumnDescriptor7.HeaderText           = "year";
     gridColumnDescriptor7.MappingName          = "year";
     gridColumnDescriptor7.SerializedImageArray = "";
     this.gridGroupingControl1.TableDescriptor.Columns.AddRange(new Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor[] {
         gridColumnDescriptor1,
         gridColumnDescriptor2,
         gridColumnDescriptor3,
         gridColumnDescriptor4,
         gridColumnDescriptor5,
         gridColumnDescriptor6,
         gridColumnDescriptor7
     });
     this.gridGroupingControl1.TableDescriptor.TableOptions.ColumnHeaderRowHeight = 25;
     this.gridGroupingControl1.TableDescriptor.TableOptions.RecordRowHeight       = 20;
     this.gridGroupingControl1.Text = "gridGroupingControl1";
     this.gridGroupingControl1.TopLevelGroupOptions.ShowAddNewRecordBeforeDetails = false;
     this.gridGroupingControl1.TopLevelGroupOptions.ShowCaption = false;
     this.gridGroupingControl1.VersionInfo = "4.201.0.37";
     //
     // dataSet11
     //
     this.dataSet11.DataSetName             = "DataSet1";
     this.dataSet11.Locale                  = new System.Globalization.CultureInfo("en-US");
     this.dataSet11.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
     //
     // oleDbDataAdapter1
     //
     this.oleDbDataAdapter1.DeleteCommand = this.oleDbDeleteCommand1;
     this.oleDbDataAdapter1.InsertCommand = this.oleDbInsertCommand1;
     this.oleDbDataAdapter1.SelectCommand = this.oleDbSelectCommand1;
     this.oleDbDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
         new System.Data.Common.DataTableMapping("Table", "Statistics", new System.Data.Common.DataColumnMapping[] {
             new System.Data.Common.DataColumnMapping("ID", "ID"),
             new System.Data.Common.DataColumnMapping("losses", "losses"),
             new System.Data.Common.DataColumnMapping("School", "School"),
             new System.Data.Common.DataColumnMapping("Sport", "Sport"),
             new System.Data.Common.DataColumnMapping("ties", "ties"),
             new System.Data.Common.DataColumnMapping("wins", "wins"),
             new System.Data.Common.DataColumnMapping("year", "year")
         })
     });
     this.oleDbDataAdapter1.UpdateCommand = this.oleDbUpdateCommand1;
     //
     // oleDbDeleteCommand1
     //
     this.oleDbDeleteCommand1.Connection = this.oleDbConnection1;
     this.oleDbDeleteCommand1.Parameters.AddRange(new System.Data.OleDb.OleDbParameter[] {
         new System.Data.OleDb.OleDbParameter("Original_ID", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "ID", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_School", System.Data.OleDb.OleDbType.VarWChar, 255, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "School", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_School1", System.Data.OleDb.OleDbType.VarWChar, 255, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "School", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_Sport", System.Data.OleDb.OleDbType.VarWChar, 255, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "Sport", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_Sport1", System.Data.OleDb.OleDbType.VarWChar, 255, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "Sport", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_losses", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "losses", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_losses1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "losses", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_ties", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "ties", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_ties1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "ties", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_wins", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "wins", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_wins1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "wins", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_year", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "year", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_year1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "year", System.Data.DataRowVersion.Original, null)
     });
     //
     // oleDbInsertCommand1
     //
     this.oleDbInsertCommand1.CommandText = "INSERT INTO Statistics(losses, School, Sport, ties, wins, year) VALUES (?, ?, ?, " +
                                            "?, ?, ?)";
     this.oleDbInsertCommand1.Connection = this.oleDbConnection1;
     this.oleDbInsertCommand1.Parameters.AddRange(new System.Data.OleDb.OleDbParameter[] {
         new System.Data.OleDb.OleDbParameter("losses", System.Data.OleDb.OleDbType.Integer, 0, "losses"),
         new System.Data.OleDb.OleDbParameter("School", System.Data.OleDb.OleDbType.VarWChar, 255, "School"),
         new System.Data.OleDb.OleDbParameter("Sport", System.Data.OleDb.OleDbType.VarWChar, 255, "Sport"),
         new System.Data.OleDb.OleDbParameter("ties", System.Data.OleDb.OleDbType.Integer, 0, "ties"),
         new System.Data.OleDb.OleDbParameter("wins", System.Data.OleDb.OleDbType.Integer, 0, "wins"),
         new System.Data.OleDb.OleDbParameter("year", System.Data.OleDb.OleDbType.Integer, 0, "year")
     });
     //
     // oleDbSelectCommand1
     //
     this.oleDbSelectCommand1.CommandText = "SELECT ID, losses, School, Sport, ties, wins, year FROM Statistics";
     this.oleDbSelectCommand1.Connection  = this.oleDbConnection1;
     //
     // oleDbUpdateCommand1
     //
     this.oleDbUpdateCommand1.Connection = this.oleDbConnection1;
     this.oleDbUpdateCommand1.Parameters.AddRange(new System.Data.OleDb.OleDbParameter[] {
         new System.Data.OleDb.OleDbParameter("losses", System.Data.OleDb.OleDbType.Integer, 0, "losses"),
         new System.Data.OleDb.OleDbParameter("School", System.Data.OleDb.OleDbType.VarWChar, 255, "School"),
         new System.Data.OleDb.OleDbParameter("Sport", System.Data.OleDb.OleDbType.VarWChar, 255, "Sport"),
         new System.Data.OleDb.OleDbParameter("ties", System.Data.OleDb.OleDbType.Integer, 0, "ties"),
         new System.Data.OleDb.OleDbParameter("wins", System.Data.OleDb.OleDbType.Integer, 0, "wins"),
         new System.Data.OleDb.OleDbParameter("year", System.Data.OleDb.OleDbType.Integer, 0, "year"),
         new System.Data.OleDb.OleDbParameter("Original_ID", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "ID", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_School", System.Data.OleDb.OleDbType.VarWChar, 255, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "School", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_School1", System.Data.OleDb.OleDbType.VarWChar, 255, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "School", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_Sport", System.Data.OleDb.OleDbType.VarWChar, 255, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "Sport", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_Sport1", System.Data.OleDb.OleDbType.VarWChar, 255, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "Sport", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_losses", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "losses", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_losses1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "losses", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_ties", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "ties", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_ties1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "ties", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_wins", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "wins", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_wins1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "wins", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_year", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "year", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_year1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "year", System.Data.DataRowVersion.Original, null)
     });
     //
     // propertyGrid1
     //
     this.propertyGrid1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                       | System.Windows.Forms.AnchorStyles.Right)));
     this.propertyGrid1.CommandsDisabledLinkColor = System.Drawing.Color.White;
     this.propertyGrid1.Font          = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.propertyGrid1.HelpBackColor = System.Drawing.Color.White;
     this.propertyGrid1.LineColor     = System.Drawing.Color.White;
     this.propertyGrid1.Location      = new System.Drawing.Point(737, 12);
     this.propertyGrid1.Name          = "propertyGrid1";
     this.propertyGrid1.Size          = new System.Drawing.Size(272, 632);
     this.propertyGrid1.TabIndex      = 1;
     //
     // Form1
     //
     this.ClientSize  = new System.Drawing.Size(1012, 656);
     this.MinimumSize = new System.Drawing.Size(900, 500);
     this.Controls.Add(this.propertyGrid1);
     this.Controls.Add(this.gridGroupingControl1);
     this.Name          = "Form1";
     this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
     this.Text          = "Getting Started";
     ((System.ComponentModel.ISupportInitialize)(this.gridGroupingControl1)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.dataSet11)).EndInit();
     this.ResumeLayout(false);
 }
Пример #48
0
 /// <summary>
 /// Método necesario para admitir el Diseñador, no se puede modificar
 /// el contenido del método con el editor de código.
 /// </summary>
 private void InitializeComponent()
 {
     System.Configuration.AppSettingsReader configurationAppSettings = new System.Configuration.AppSettingsReader();
     this.oleDbDataAdapter1   = new System.Data.OleDb.OleDbDataAdapter();
     this.oleDbSelectCommand1 = new System.Data.OleDb.OleDbCommand();
     this.oleDbConnection1    = new System.Data.OleDb.OleDbConnection();
     this.datosContrato1      = new imprimir_contrato_1.datosContrato();
     ((System.ComponentModel.ISupportInitialize)(this.datosContrato1)).BeginInit();
     //
     // oleDbDataAdapter1
     //
     this.oleDbDataAdapter1.SelectCommand = this.oleDbSelectCommand1;
     this.oleDbDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
         new System.Data.Common.DataTableMapping("Table", "contrato", new System.Data.Common.DataColumnMapping[] {
             new System.Data.Common.DataColumnMapping("text_antiguo", "text_antiguo"),
             new System.Data.Common.DataColumnMapping("jorn_tdesc", "jorn_tdesc"),
             new System.Data.Common.DataColumnMapping("emailp", "emailp"),
             new System.Data.Common.DataColumnMapping("eciv_tdescp", "eciv_tdescp"),
             new System.Data.Common.DataColumnMapping("pais_tdescp", "pais_tdescp"),
             new System.Data.Common.DataColumnMapping("pers_tprofesionp", "pers_tprofesionp"),
             new System.Data.Common.DataColumnMapping("emailppc", "emailppc"),
             new System.Data.Common.DataColumnMapping("eciv_tdescppc", "eciv_tdescppc"),
             new System.Data.Common.DataColumnMapping("pais_tdescppc", "pais_tdescppc"),
             new System.Data.Common.DataColumnMapping("pers_tprofesionppc", "pers_tprofesionppc"),
             new System.Data.Common.DataColumnMapping("nro_informe", "nro_informe"),
             new System.Data.Common.DataColumnMapping("NRO_INFORME1", "NRO_INFORME1"),
             new System.Data.Common.DataColumnMapping("NOMBRE_INFORME", "NOMBRE_INFORME"),
             new System.Data.Common.DataColumnMapping("NRO_CONTRATO", "NRO_CONTRATO"),
             new System.Data.Common.DataColumnMapping("DD_HOY", "DD_HOY"),
             new System.Data.Common.DataColumnMapping("MM_HOY", "MM_HOY"),
             new System.Data.Common.DataColumnMapping("YY_HOY", "YY_HOY"),
             new System.Data.Common.DataColumnMapping("PERIODO_ACADEMICO", "PERIODO_ACADEMICO"),
             new System.Data.Common.DataColumnMapping("NOMBRE_REPRESENTANTE", "NOMBRE_REPRESENTANTE"),
             new System.Data.Common.DataColumnMapping("NOMBRE_INSTITUCION", "NOMBRE_INSTITUCION"),
             new System.Data.Common.DataColumnMapping("RUT_INSTITUCION", "RUT_INSTITUCION"),
             new System.Data.Common.DataColumnMapping("RUT_POSTULANTE", "RUT_POSTULANTE"),
             new System.Data.Common.DataColumnMapping("EDAD", "EDAD"),
             new System.Data.Common.DataColumnMapping("NOMBRE_ALUMNO", "NOMBRE_ALUMNO"),
             new System.Data.Common.DataColumnMapping("CARRERA", "CARRERA"),
             new System.Data.Common.DataColumnMapping("RUT_CODEUDOR", "RUT_CODEUDOR"),
             new System.Data.Common.DataColumnMapping("NOMBRE_CODEUDOR", "NOMBRE_CODEUDOR"),
             new System.Data.Common.DataColumnMapping("PROFESION", "PROFESION"),
             new System.Data.Common.DataColumnMapping("DIRECCION", "DIRECCION"),
             new System.Data.Common.DataColumnMapping("CIUDAD", "CIUDAD"),
             new System.Data.Common.DataColumnMapping("COMUNA", "COMUNA"),
             new System.Data.Common.DataColumnMapping("TIPO_DOCUMENTO", "TIPO_DOCUMENTO"),
             new System.Data.Common.DataColumnMapping("DOCUMENTO", "DOCUMENTO"),
             new System.Data.Common.DataColumnMapping("NOMBRE_BANCO", "NOMBRE_BANCO"),
             new System.Data.Common.DataColumnMapping("VALOR_DOCTO", "VALOR_DOCTO"),
             new System.Data.Common.DataColumnMapping("NRO_DOCTO", "NRO_DOCTO"),
             new System.Data.Common.DataColumnMapping("FECHA_VENCIMIENTO", "FECHA_VENCIMIENTO"),
             new System.Data.Common.DataColumnMapping("TOTAL_M", "TOTAL_M"),
             new System.Data.Common.DataColumnMapping("TOTAL_A", "TOTAL_A"),
             new System.Data.Common.DataColumnMapping("DIRECCION_ALUMNO", "DIRECCION_ALUMNO"),
             new System.Data.Common.DataColumnMapping("COMUNA_ALUMNO", "COMUNA_ALUMNO"),
             new System.Data.Common.DataColumnMapping("CIUDAD_ALUMNO", "CIUDAD_ALUMNO")
         })
     });
     this.oleDbDataAdapter1.RowUpdated += new System.Data.OleDb.OleDbRowUpdatedEventHandler(this.oleDbDataAdapter1_RowUpdated_1);
     //
     // oleDbSelectCommand1
     //
     this.oleDbSelectCommand1.CommandText = @"SELECT '' AS text_antiguo, '' AS jorn_tdesc, '' AS emailp, '' AS eciv_tdescp, '' AS pais_tdescp, ' ' AS pers_tprofesionp, '' AS emailppc, '' AS eciv_tdescppc, '' AS pais_tdescppc, '' AS pers_tprofesionppc, 0 AS nro_informe, '' AS NOMBRE_INFORME, '' AS NRO_CONTRATO, '' AS DD_HOY, '' AS MM_HOY, '' AS YY_HOY, '' AS NOMBRE_INSTITUCION, '' AS PERIODO_ACADEMICO, '' AS RUT_INSTITUCION, '' AS NOMBRE_REPRESENTANTE, '' AS RUT_POSTULANTE, '' AS EDAD, '' AS NOMBRE_ALUMNO, '' AS CARRERA, '' AS RUT_CODEUDOR, '' AS NOMBRE_CODEUDOR, '' AS PROFESION, '' AS DIRECCION, '' AS DIRECCION_ALUMNO, '' AS CIUDAD, '' AS COMUNA, '' AS CIUDAD_ALUMNO, '' AS COMUNA_ALUMNO, '' AS TIPO_DOCUMENTO, '' AS DOCUMENTO, '' AS NOMBRE_BANCO, '' AS VALOR_DOCTO, '' AS NRO_DOCTO, '' AS FECHA_VENCIMIENTO, '' AS TOTAL_M, '' AS TOTAL_A, '' AS matricula, '' AS arancel, '' AS sede, '' AS comuna_sede";
     this.oleDbSelectCommand1.Connection  = this.oleDbConnection1;
     //
     // oleDbConnection1
     //
     this.oleDbConnection1.ConnectionString = ((string)(configurationAppSettings.GetValue("cadenaConexion", typeof(string))));
     //
     // datosContrato1
     //
     this.datosContrato1.DataSetName = "datosContrato";
     this.datosContrato1.Locale      = new System.Globalization.CultureInfo("es-ES");
     this.datosContrato1.Namespace   = "http://www.tempuri.org/datosContrato.xsd";
     this.Load += new System.EventHandler(this.Page_Load);
     ((System.ComponentModel.ISupportInitialize)(this.datosContrato1)).EndInit();
 }
Пример #49
0
        //根据XML节点获取连接信息
        public static object GetDBInfoByXMLNode(XmlElement dbElement, string strPath)
        {
            try
            {
                string strType     = dbElement.GetAttribute("类型");
                string strServer   = dbElement.GetAttribute("服务器");
                string strInstance = dbElement.GetAttribute("服务名");
                string strDB       = dbElement.GetAttribute("数据库");
                if (strPath != "")
                {
                    strDB = strPath + strDB;
                }
                string strUser     = dbElement.GetAttribute("用户");
                string strPassword = dbElement.GetAttribute("密码");
                string strVersion  = dbElement.GetAttribute("版本");

                IPropertySet pPropSet = null;
                switch (strType.Trim().ToLower())
                {
                case "pdb":
                    pPropSet = new PropertySetClass();
                    AccessWorkspaceFactory pAccessFact = new AccessWorkspaceFactoryClass();
                    if (!File.Exists(strDB))
                    {
                        FileInfo filePDB = new FileInfo(strDB);
                        pAccessFact.Create(filePDB.DirectoryName, filePDB.Name, null, 0);
                    }
                    pPropSet.SetProperty("DATABASE", strDB);
                    IWorkspace pdbWorkspace = pAccessFact.Open(pPropSet, 0);
                    pAccessFact = null;
                    return(pdbWorkspace);

                case "gdb":
                    pPropSet = new PropertySetClass();
                    FileGDBWorkspaceFactoryClass pFileGDBFact = new FileGDBWorkspaceFactoryClass();
                    if (!Directory.Exists(strDB))
                    {
                        DirectoryInfo dirGDB = new DirectoryInfo(strDB);
                        pFileGDBFact.Create(dirGDB.Parent.FullName, dirGDB.Name, null, 0);
                    }
                    pPropSet.SetProperty("DATABASE", strDB);
                    IWorkspace gdbWorkspace = pFileGDBFact.Open(pPropSet, 0);
                    pFileGDBFact = null;
                    return(gdbWorkspace);

                case "sde":
                    pPropSet = new PropertySetClass();
                    IWorkspaceFactory pSdeFact = new SdeWorkspaceFactoryClass();
                    pPropSet.SetProperty("SERVER", strServer);
                    pPropSet.SetProperty("INSTANCE", strInstance);
                    pPropSet.SetProperty("DATABASE", strDB);
                    pPropSet.SetProperty("USER", strUser);
                    pPropSet.SetProperty("PASSWORD", strPassword);
                    pPropSet.SetProperty("VERSION", strVersion);
                    IWorkspace sdeWorkspace = pSdeFact.Open(pPropSet, 0);
                    pSdeFact = null;
                    return(sdeWorkspace);

                case "access":
                    System.Data.Common.DbConnection dbCon = new System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + strDB);
                    dbCon.Open();
                    return(dbCon);

                case "oracle":
                    string strOracle = "Data Source=" + strDB + ";Persist Security Info=True;User ID=" + strUser + ";Password="******";Unicode=True";
                    System.Data.Common.DbConnection dbConoracle = new OracleConnection(strOracle);
                    dbConoracle.Open();
                    return(dbConoracle);

                case "sql":
                    string strSql = "Data Source=" + strDB + ";Initial Catalog=" + strInstance + ";User ID=" + strUser + ";Password=" + strPassword;
                    System.Data.Common.DbConnection dbConsql = new SqlConnection(strSql);
                    dbConsql.Open();
                    return(dbConsql);

                default:
                    break;
                }

                return(null);
            }
            catch (Exception e)
            {
                //*******************************************************************
                //guozheng added
                if (ModuleData.v_SysLog != null)
                {
                    ModuleData.v_SysLog.Write(e, null, DateTime.Now);
                }
                else
                {
                    ModuleData.v_SysLog = new SysCommon.Log.clsWriteSystemFunctionLog();
                    ModuleData.v_SysLog.Write(e, null, DateTime.Now);
                }
                //********************************************************************
                return(null);
            }
        }
Пример #50
0
 private void InitConnection()
 {
     this._connection = new System.Data.OleDb.OleDbConnection();
     this._connection.ConnectionString = global::StudentAttendanceModule.Properties.Settings.Default.studentdbConnectionString;
 }
 //------------------------------------------------------------------------------
 //
 // Method: OleDbCommand (constructor)
 //
 //------------------------------------------------------------------------------
 /// <summary>
 /// Initialises a new instance of the OperatingSystemAbstraction.OleDbCommand class.
 /// </summary>
 /// <param name="cmdText">The text of the query.</param>
 /// <param name="connection">An OleDbConnection that represents the connection to a data source.</param>
 public OleDbCommand(String cmdText, System.Data.OleDb.OleDbConnection connection)
 {
     oleDbCommand = new System.Data.OleDb.OleDbCommand(cmdText, connection);
     disposed     = false;
 }
Пример #52
0
        public static DataTable ExcelToDataSet(string[] mySheet)
        {
            string myPath = Globals.ThisAddIn.Application.ActiveWorkbook.FullName;
            string myFile = Globals.ThisAddIn.Application.ActiveWorkbook.Name;

            excel.Workbook excelWorkBook = Globals.ThisAddIn.GetActiveWorkbook();

            try
            {
                excelWorkBook.Save();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
                return(null);
            }



            DataSet DtSet = new DataSet("DPT");

            System.Data.OleDb.OleDbConnection  MyConnection;
            System.Data.OleDb.OleDbDataAdapter MyCommand;
            try
            {
                //Checking to see if file is on sharepoint or not, then filling datatable in new dataset
                if (myPath.Contains("my.sharepoint.com"))
                {
                    //GET USER'S ID
                    int    firstStringPosition  = myPath.IndexOf("personal/") + 9;
                    int    secondStringPosition = myPath.IndexOf("_millercoors");
                    string myUserID             = myPath.Substring(firstStringPosition, secondStringPosition - firstStringPosition);

                    //CREATE LOCAL PATH TO ACTIVE SHAREPOINT DESKTOP FILE
                    string desktopPath = string.Format(@"C:\Users\{0}\OneDrive - Molson Coors Brewing Company\Desktop\{1}", myUserID, myFile);

                    MyConnection = new System.Data.OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source= '" + desktopPath + "'; Extended Properties=\"Excel 12.0 Xml; HDR = YES\";");
                }
                else
                {
                    MyConnection = new System.Data.OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source= '" + myPath + "'; Extended Properties=\"Excel 12.0 Xml; HDR = YES\";");
                }

                MyCommand = new System.Data.OleDb.OleDbDataAdapter("select * from [" + mySheet[0] + "$]", MyConnection);

                MyCommand.TableMappings.Add("Table", "ExcelDataTable");
                DataTable excelData = DtSet.Tables.Add("ExcelData");
                MyCommand.Fill(excelData);

                foreach (DataColumn col in excelData.Columns)
                {
                    col.ColumnName = col.ColumnName.Trim();
                }

                //for combining all sheets
                if (mySheet.Length > 1)
                {
                    //make clone that converts all datatypes to string (for mismatched datatypes on merge)
                    DataTable excelData2 = excelData.Clone();
                    for (int i = 0; i < excelData.Columns.Count; i++)
                    {
                        excelData2.Columns[i].DataType = typeof(string);
                    }
                    foreach (DataRow row in excelData.Rows)
                    {
                        excelData2.ImportRow(row);
                    }
                    excelData2.PrimaryKey = null;

                    //make datatable of the next sheet
                    DataTable tempData = DtSet.Tables.Add("TempData");
                    for (int i = 1; i < mySheet.Length; i++)
                    {
                        MyCommand = new System.Data.OleDb.OleDbDataAdapter("select * from [" + mySheet[i] + "$]", MyConnection);
                        MyCommand.Fill(tempData);

                        //convert tempData to strings
                        DataTable tempData2 = tempData.Clone();
                        for (int j = 0; j < tempData.Columns.Count; j++)
                        {
                            tempData2.Columns[j].DataType = typeof(string);
                        }
                        foreach (DataRow row in tempData.Rows)
                        {
                            tempData2.ImportRow(row);
                        }
                        tempData2.PrimaryKey = null;

                        //merge tables and clear tempdata and tempdata2 (clone)
                        excelData2.Merge(tempData2);
                        tempData.Clear();
                        tempData.Columns.Clear();
                        tempData2.Clear();
                        tempData2.Columns.Clear();
                    }
                    MyConnection.Close();
                    return(excelData2);
                }
                else
                {
                    for (int i = excelData.Rows.Count - 1; i >= 0; i--)
                    {
                        if (excelData.Rows[i][1] == DBNull.Value)
                        {
                            excelData.Rows[i].Delete();
                        }
                    }
                    MyConnection.Close();
                    excelData.AcceptChanges();
                    return(excelData);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("The Data Prep Tool can't identify a useable file path for this document." +
                                "Try saving this document to your local machine or accessable drives.");
                MessageBox.Show(ex.ToString());
                return(null);
            }
        }
Пример #53
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor gridColumnDescriptor1 = new Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor();
     Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor gridColumnDescriptor2 = new Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor();
     Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor gridColumnDescriptor3 = new Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor();
     Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor gridColumnDescriptor4 = new Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor();
     Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor gridColumnDescriptor5 = new Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor();
     Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor gridColumnDescriptor6 = new Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor();
     Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor gridColumnDescriptor7 = new Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
     this.panel1               = new System.Windows.Forms.Panel();
     this.label2               = new System.Windows.Forms.Label();
     this.afterDetails         = new Syncfusion.Windows.Forms.Tools.CheckBoxAdv();
     this.beforeDetails        = new Syncfusion.Windows.Forms.Tools.CheckBoxAdv();
     this.captionText          = new Syncfusion.Windows.Forms.Tools.CheckBoxAdv();
     this.showCaption          = new Syncfusion.Windows.Forms.Tools.CheckBoxAdv();
     this.ShowCaptionPlus      = new Syncfusion.Windows.Forms.Tools.CheckBoxAdv();
     this.label1               = new System.Windows.Forms.Label();
     this.panel3               = new System.Windows.Forms.Panel();
     this.label4               = new System.Windows.Forms.Label();
     this.label3               = new System.Windows.Forms.Label();
     this.lblProperty          = new System.Windows.Forms.Label();
     this.lblPropertyDisplay   = new System.Windows.Forms.Label();
     this.panel4               = new System.Windows.Forms.Panel();
     this.gridGroupingControl1 = new Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControl();
     this.dataSet11            = new ChildGroupOptions.DataSet1();
     this.oleDbDataAdapter1    = new System.Data.OleDb.OleDbDataAdapter();
     this.oleDbDeleteCommand1  = new System.Data.OleDb.OleDbCommand();
     this.oleDbConnection1     = new System.Data.OleDb.OleDbConnection();
     this.oleDbInsertCommand1  = new System.Data.OleDb.OleDbCommand();
     this.oleDbSelectCommand1  = new System.Data.OleDb.OleDbCommand();
     this.oleDbUpdateCommand1  = new System.Data.OleDb.OleDbCommand();
     this.panel5               = new System.Windows.Forms.Panel();
     this.tipDesc              = new System.Windows.Forms.ToolTip(this.components);
     this.panel1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.afterDetails)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.beforeDetails)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.captionText)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.showCaption)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.ShowCaptionPlus)).BeginInit();
     this.panel3.SuspendLayout();
     this.panel4.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.gridGroupingControl1)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.dataSet11)).BeginInit();
     this.panel5.SuspendLayout();
     this.SuspendLayout();
     //
     // panel1
     //
     this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                | System.Windows.Forms.AnchorStyles.Right)));
     this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.panel1.Controls.Add(this.label2);
     this.panel1.Controls.Add(this.afterDetails);
     this.panel1.Controls.Add(this.beforeDetails);
     this.panel1.Controls.Add(this.captionText);
     this.panel1.Controls.Add(this.showCaption);
     this.panel1.Controls.Add(this.ShowCaptionPlus);
     this.panel1.Controls.Add(this.label1);
     this.panel1.Font      = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.panel1.ForeColor = System.Drawing.Color.DimGray;
     this.panel1.Location  = new System.Drawing.Point(792, 4);
     this.panel1.Name      = "panel1";
     this.panel1.Size      = new System.Drawing.Size(210, 513);
     this.panel1.TabIndex  = 0;
     //
     // label2
     //
     this.label2.Font     = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label2.Location = new System.Drawing.Point(29, 168);
     this.label2.Name     = "label2";
     this.label2.Size     = new System.Drawing.Size(176, 23);
     this.label2.TabIndex = 21;
     this.label2.Text     = "Add New Record Field";
     //
     // afterDetails
     //
     this.afterDetails.BeforeTouchSize    = new System.Drawing.Size(150, 21);
     this.afterDetails.Font               = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.afterDetails.Location           = new System.Drawing.Point(37, 232);
     this.afterDetails.MetroColor         = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226)))));
     this.afterDetails.Name               = "afterDetails";
     this.afterDetails.Size               = new System.Drawing.Size(136, 24);
     this.afterDetails.Style              = Syncfusion.Windows.Forms.Tools.CheckBoxAdvStyle.Metro;
     this.afterDetails.DrawFocusRectangle = true;
     this.afterDetails.TabIndex           = 20;
     this.afterDetails.Text               = "After Details";
     this.afterDetails.ThemesEnabled      = false;
     this.afterDetails.CheckStateChanged += new System.EventHandler(this.afterDetails_CheckStateChanged);
     //
     // beforeDetails
     //
     this.beforeDetails.BeforeTouchSize    = new System.Drawing.Size(150, 21);
     this.beforeDetails.Checked            = true;
     this.beforeDetails.CheckState         = System.Windows.Forms.CheckState.Checked;
     this.beforeDetails.Font               = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.beforeDetails.Location           = new System.Drawing.Point(37, 200);
     this.beforeDetails.MetroColor         = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226)))));
     this.beforeDetails.Name               = "beforeDetails";
     this.beforeDetails.Size               = new System.Drawing.Size(136, 24);
     this.beforeDetails.Style              = Syncfusion.Windows.Forms.Tools.CheckBoxAdvStyle.Metro;
     this.beforeDetails.DrawFocusRectangle = true;
     this.beforeDetails.TabIndex           = 19;
     this.beforeDetails.Text               = "Before Details";
     this.beforeDetails.ThemesEnabled      = false;
     this.beforeDetails.CheckStateChanged += new System.EventHandler(this.beforeDetails_CheckStateChanged);
     //
     // captionText
     //
     this.captionText.BeforeTouchSize    = new System.Drawing.Size(150, 21);
     this.captionText.Font               = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.captionText.Location           = new System.Drawing.Point(37, 119);
     this.captionText.MetroColor         = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226)))));
     this.captionText.Name               = "captionText";
     this.captionText.Size               = new System.Drawing.Size(146, 24);
     this.captionText.Style              = Syncfusion.Windows.Forms.Tools.CheckBoxAdvStyle.Metro;
     this.captionText.DrawFocusRectangle = true;
     this.captionText.TabIndex           = 18;
     this.captionText.Text               = "Modify Caption Text";
     this.captionText.ThemesEnabled      = false;
     this.captionText.CheckStateChanged += new System.EventHandler(this.captionText_CheckStateChanged);
     //
     // showCaption
     //
     this.showCaption.BeforeTouchSize    = new System.Drawing.Size(150, 21);
     this.showCaption.Checked            = true;
     this.showCaption.CheckState         = System.Windows.Forms.CheckState.Checked;
     this.showCaption.Font               = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.showCaption.Location           = new System.Drawing.Point(37, 87);
     this.showCaption.MetroColor         = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226)))));
     this.showCaption.Name               = "showCaption";
     this.showCaption.Size               = new System.Drawing.Size(146, 24);
     this.showCaption.Style              = Syncfusion.Windows.Forms.Tools.CheckBoxAdvStyle.Metro;
     this.showCaption.DrawFocusRectangle = true;
     this.showCaption.TabIndex           = 17;
     this.showCaption.Text               = "Show Caption";
     this.showCaption.ThemesEnabled      = false;
     this.showCaption.CheckStateChanged += new System.EventHandler(this.showCaption_CheckStateChanged);
     //
     // ShowCaptionPlus
     //
     this.ShowCaptionPlus.BeforeTouchSize    = new System.Drawing.Size(150, 21);
     this.ShowCaptionPlus.Checked            = true;
     this.ShowCaptionPlus.CheckState         = System.Windows.Forms.CheckState.Checked;
     this.ShowCaptionPlus.Font               = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.ShowCaptionPlus.Location           = new System.Drawing.Point(37, 57);
     this.ShowCaptionPlus.MetroColor         = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226)))));
     this.ShowCaptionPlus.Name               = "ShowCaptionPlus";
     this.ShowCaptionPlus.Size               = new System.Drawing.Size(136, 24);
     this.ShowCaptionPlus.Style              = Syncfusion.Windows.Forms.Tools.CheckBoxAdvStyle.Metro;
     this.ShowCaptionPlus.DrawFocusRectangle = true;
     this.ShowCaptionPlus.TabIndex           = 16;
     this.ShowCaptionPlus.Text               = "Show Caption +/-";
     this.ShowCaptionPlus.ThemesEnabled      = false;
     this.ShowCaptionPlus.CheckStateChanged += new System.EventHandler(this.ShowCaptionPlus_CheckStateChanged);
     //
     // label1
     //
     this.label1.Font     = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label1.Location = new System.Drawing.Point(29, 25);
     this.label1.Name     = "label1";
     this.label1.Size     = new System.Drawing.Size(160, 23);
     this.label1.TabIndex = 9;
     this.label1.Text     = "Child Group Options";
     //
     // panel3
     //
     this.panel3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
                                                                | System.Windows.Forms.AnchorStyles.Right)));
     this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.panel3.Controls.Add(this.label4);
     this.panel3.Controls.Add(this.label3);
     this.panel3.Controls.Add(this.lblProperty);
     this.panel3.Controls.Add(this.lblPropertyDisplay);
     this.panel3.Font      = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.panel3.ForeColor = System.Drawing.Color.DimGray;
     this.panel3.Location  = new System.Drawing.Point(9, 526);
     this.panel3.Name      = "panel3";
     this.panel3.Size      = new System.Drawing.Size(995, 118);
     this.panel3.TabIndex  = 4;
     //
     // label4
     //
     this.label4.Font     = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label4.Location = new System.Drawing.Point(24, 72);
     this.label4.Name     = "label4";
     this.label4.Size     = new System.Drawing.Size(129, 23);
     this.label4.TabIndex = 3;
     this.label4.Text     = "Changed Property :";
     //
     // label3
     //
     this.label3.Font     = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label3.Location = new System.Drawing.Point(24, 16);
     this.label3.Name     = "label3";
     this.label3.Size     = new System.Drawing.Size(192, 40);
     this.label3.TabIndex = 2;
     this.label3.Text     = "Changed ChildGroup Options Property :";
     //
     // lblProperty
     //
     this.lblProperty.Font     = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.lblProperty.Location = new System.Drawing.Point(218, 72);
     this.lblProperty.Name     = "lblProperty";
     this.lblProperty.Size     = new System.Drawing.Size(349, 40);
     this.lblProperty.TabIndex = 1;
     //
     // lblPropertyDisplay
     //
     this.lblPropertyDisplay.Font     = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.lblPropertyDisplay.Location = new System.Drawing.Point(218, 16);
     this.lblPropertyDisplay.Name     = "lblPropertyDisplay";
     this.lblPropertyDisplay.Size     = new System.Drawing.Size(359, 40);
     this.lblPropertyDisplay.TabIndex = 0;
     //
     // panel4
     //
     this.panel4.Controls.Add(this.gridGroupingControl1);
     this.panel4.Controls.Add(this.panel1);
     this.panel4.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.panel4.Location = new System.Drawing.Point(0, 0);
     this.panel4.Name     = "panel4";
     this.panel4.Size     = new System.Drawing.Size(1236, 651);
     this.panel4.TabIndex = 6;
     //
     // gridGroupingControl1
     //
     this.gridGroupingControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                               | System.Windows.Forms.AnchorStyles.Left)
                                                                              | System.Windows.Forms.AnchorStyles.Right)));
     this.gridGroupingControl1.BackColor         = System.Drawing.SystemColors.Window;
     this.gridGroupingControl1.DataSource        = this.dataSet11.Statistics;
     this.gridGroupingControl1.Font              = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.gridGroupingControl1.ForeColor         = System.Drawing.Color.DimGray;
     this.gridGroupingControl1.FreezeCaption     = false;
     this.gridGroupingControl1.Location          = new System.Drawing.Point(6, 4);
     this.gridGroupingControl1.Name              = "gridGroupingControl1";
     this.gridGroupingControl1.ShowGroupDropArea = true;
     this.gridGroupingControl1.Size              = new System.Drawing.Size(780, 513);
     this.gridGroupingControl1.TabIndex          = 0;
     gridColumnDescriptor1.HeaderImage           = null;
     gridColumnDescriptor1.HeaderImageAlignment  = Syncfusion.Windows.Forms.Grid.Grouping.HeaderImageAlignment.Left;
     gridColumnDescriptor1.MappingName           = "ID";
     gridColumnDescriptor1.SerializedImageArray  = "";
     gridColumnDescriptor2.HeaderImage           = null;
     gridColumnDescriptor2.HeaderImageAlignment  = Syncfusion.Windows.Forms.Grid.Grouping.HeaderImageAlignment.Left;
     gridColumnDescriptor2.MappingName           = "losses";
     gridColumnDescriptor2.SerializedImageArray  = "";
     gridColumnDescriptor3.HeaderImage           = null;
     gridColumnDescriptor3.HeaderImageAlignment  = Syncfusion.Windows.Forms.Grid.Grouping.HeaderImageAlignment.Left;
     gridColumnDescriptor3.MappingName           = "School";
     gridColumnDescriptor3.SerializedImageArray  = "";
     gridColumnDescriptor4.HeaderImage           = null;
     gridColumnDescriptor4.HeaderImageAlignment  = Syncfusion.Windows.Forms.Grid.Grouping.HeaderImageAlignment.Left;
     gridColumnDescriptor4.MappingName           = "Sport";
     gridColumnDescriptor4.SerializedImageArray  = "";
     gridColumnDescriptor5.HeaderImage           = null;
     gridColumnDescriptor5.HeaderImageAlignment  = Syncfusion.Windows.Forms.Grid.Grouping.HeaderImageAlignment.Left;
     gridColumnDescriptor5.MappingName           = "ties";
     gridColumnDescriptor5.SerializedImageArray  = "";
     gridColumnDescriptor6.HeaderImage           = null;
     gridColumnDescriptor6.HeaderImageAlignment  = Syncfusion.Windows.Forms.Grid.Grouping.HeaderImageAlignment.Left;
     gridColumnDescriptor6.MappingName           = "wins";
     gridColumnDescriptor6.SerializedImageArray  = "";
     gridColumnDescriptor7.HeaderImage           = null;
     gridColumnDescriptor7.HeaderImageAlignment  = Syncfusion.Windows.Forms.Grid.Grouping.HeaderImageAlignment.Left;
     gridColumnDescriptor7.MappingName           = "year";
     gridColumnDescriptor7.SerializedImageArray  = "";
     this.gridGroupingControl1.TableDescriptor.Columns.AddRange(new Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor[] {
         gridColumnDescriptor1,
         gridColumnDescriptor2,
         gridColumnDescriptor3,
         gridColumnDescriptor4,
         gridColumnDescriptor5,
         gridColumnDescriptor6,
         gridColumnDescriptor7
     });
     this.gridGroupingControl1.TableDescriptor.PrimaryKeyColumns.AddRange(new Syncfusion.Grouping.SortColumnDescriptor[] {
         new Syncfusion.Grouping.SortColumnDescriptor("ID", System.ComponentModel.ListSortDirection.Ascending)
     });
     this.gridGroupingControl1.TableDescriptor.VisibleColumns.AddRange(new Syncfusion.Windows.Forms.Grid.Grouping.GridVisibleColumnDescriptor[] {
         new Syncfusion.Windows.Forms.Grid.Grouping.GridVisibleColumnDescriptor("ID"),
         new Syncfusion.Windows.Forms.Grid.Grouping.GridVisibleColumnDescriptor("losses"),
         new Syncfusion.Windows.Forms.Grid.Grouping.GridVisibleColumnDescriptor("School"),
         new Syncfusion.Windows.Forms.Grid.Grouping.GridVisibleColumnDescriptor("Sport"),
         new Syncfusion.Windows.Forms.Grid.Grouping.GridVisibleColumnDescriptor("ties"),
         new Syncfusion.Windows.Forms.Grid.Grouping.GridVisibleColumnDescriptor("wins"),
         new Syncfusion.Windows.Forms.Grid.Grouping.GridVisibleColumnDescriptor("year")
     });
     this.gridGroupingControl1.Text        = "gridGroupingControl1";
     this.gridGroupingControl1.VersionInfo = "4.201.0.37";
     //
     // dataSet11
     //
     this.dataSet11.DataSetName             = "DataSet1";
     this.dataSet11.Locale                  = new System.Globalization.CultureInfo("en-US");
     this.dataSet11.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
     //
     // oleDbDataAdapter1
     //
     this.oleDbDataAdapter1.DeleteCommand = this.oleDbDeleteCommand1;
     this.oleDbDataAdapter1.InsertCommand = this.oleDbInsertCommand1;
     this.oleDbDataAdapter1.SelectCommand = this.oleDbSelectCommand1;
     this.oleDbDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
         new System.Data.Common.DataTableMapping("Table", "Statistics", new System.Data.Common.DataColumnMapping[] {
             new System.Data.Common.DataColumnMapping("ID", "ID"),
             new System.Data.Common.DataColumnMapping("losses", "losses"),
             new System.Data.Common.DataColumnMapping("School", "School"),
             new System.Data.Common.DataColumnMapping("Sport", "Sport"),
             new System.Data.Common.DataColumnMapping("ties", "ties"),
             new System.Data.Common.DataColumnMapping("wins", "wins"),
             new System.Data.Common.DataColumnMapping("year", "year")
         })
     });
     this.oleDbDataAdapter1.UpdateCommand = this.oleDbUpdateCommand1;
     //
     // oleDbDeleteCommand1
     //
     this.oleDbDeleteCommand1.CommandText = resources.GetString("oleDbDeleteCommand1.CommandText");
     this.oleDbDeleteCommand1.Connection  = this.oleDbConnection1;
     this.oleDbDeleteCommand1.Parameters.AddRange(new System.Data.OleDb.OleDbParameter[] {
         new System.Data.OleDb.OleDbParameter("Original_ID", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "ID", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_School", System.Data.OleDb.OleDbType.VarWChar, 255, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "School", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_School1", System.Data.OleDb.OleDbType.VarWChar, 255, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "School", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_Sport", System.Data.OleDb.OleDbType.VarWChar, 255, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "Sport", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_Sport1", System.Data.OleDb.OleDbType.VarWChar, 255, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "Sport", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_losses", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "losses", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_losses1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "losses", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_ties", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "ties", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_ties1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "ties", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_wins", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "wins", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_wins1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "wins", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_year", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "year", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_year1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "year", System.Data.DataRowVersion.Original, null)
     });
     //
     // oleDbConnection1
     //
     this.oleDbConnection1.ConnectionString = resources.GetString("oleDbConnection1.ConnectionString");
     //
     // oleDbInsertCommand1
     //
     this.oleDbInsertCommand1.CommandText = "INSERT INTO Statistics(losses, School, Sport, ties, wins, year) VALUES (?, ?, ?, " +
                                            "?, ?, ?)";
     this.oleDbInsertCommand1.Connection = this.oleDbConnection1;
     this.oleDbInsertCommand1.Parameters.AddRange(new System.Data.OleDb.OleDbParameter[] {
         new System.Data.OleDb.OleDbParameter("losses", System.Data.OleDb.OleDbType.Integer, 0, "losses"),
         new System.Data.OleDb.OleDbParameter("School", System.Data.OleDb.OleDbType.VarWChar, 255, "School"),
         new System.Data.OleDb.OleDbParameter("Sport", System.Data.OleDb.OleDbType.VarWChar, 255, "Sport"),
         new System.Data.OleDb.OleDbParameter("ties", System.Data.OleDb.OleDbType.Integer, 0, "ties"),
         new System.Data.OleDb.OleDbParameter("wins", System.Data.OleDb.OleDbType.Integer, 0, "wins"),
         new System.Data.OleDb.OleDbParameter("year", System.Data.OleDb.OleDbType.Integer, 0, "year")
     });
     //
     // oleDbSelectCommand1
     //
     this.oleDbSelectCommand1.CommandText = "SELECT ID, losses, School, Sport, ties, wins, year FROM Statistics";
     this.oleDbSelectCommand1.Connection  = this.oleDbConnection1;
     //
     // oleDbUpdateCommand1
     //
     this.oleDbUpdateCommand1.CommandText = resources.GetString("oleDbUpdateCommand1.CommandText");
     this.oleDbUpdateCommand1.Connection  = this.oleDbConnection1;
     this.oleDbUpdateCommand1.Parameters.AddRange(new System.Data.OleDb.OleDbParameter[] {
         new System.Data.OleDb.OleDbParameter("losses", System.Data.OleDb.OleDbType.Integer, 0, "losses"),
         new System.Data.OleDb.OleDbParameter("School", System.Data.OleDb.OleDbType.VarWChar, 255, "School"),
         new System.Data.OleDb.OleDbParameter("Sport", System.Data.OleDb.OleDbType.VarWChar, 255, "Sport"),
         new System.Data.OleDb.OleDbParameter("ties", System.Data.OleDb.OleDbType.Integer, 0, "ties"),
         new System.Data.OleDb.OleDbParameter("wins", System.Data.OleDb.OleDbType.Integer, 0, "wins"),
         new System.Data.OleDb.OleDbParameter("year", System.Data.OleDb.OleDbType.Integer, 0, "year"),
         new System.Data.OleDb.OleDbParameter("Original_ID", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "ID", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_School", System.Data.OleDb.OleDbType.VarWChar, 255, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "School", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_School1", System.Data.OleDb.OleDbType.VarWChar, 255, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "School", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_Sport", System.Data.OleDb.OleDbType.VarWChar, 255, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "Sport", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_Sport1", System.Data.OleDb.OleDbType.VarWChar, 255, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "Sport", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_losses", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "losses", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_losses1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "losses", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_ties", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "ties", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_ties1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "ties", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_wins", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "wins", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_wins1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "wins", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_year", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "year", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_year1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "year", System.Data.DataRowVersion.Original, null)
     });
     //
     // panel5
     //
     this.panel5.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                 | System.Windows.Forms.AnchorStyles.Left)
                                                                | System.Windows.Forms.AnchorStyles.Right)));
     this.panel5.BackColor = System.Drawing.Color.White;
     this.panel5.Controls.Add(this.panel3);
     this.panel5.Controls.Add(this.panel4);
     this.panel5.Location = new System.Drawing.Point(-1, 1);
     this.panel5.Name     = "panel5";
     this.panel5.Size     = new System.Drawing.Size(1236, 651);
     this.panel5.TabIndex = 7;
     //
     // tipDesc
     //
     this.tipDesc.BackColor  = System.Drawing.Color.White;
     this.tipDesc.ForeColor  = System.Drawing.Color.Black;
     this.tipDesc.IsBalloon  = true;
     this.tipDesc.ShowAlways = true;
     this.tipDesc.UseFading  = false;
     //
     // Form1
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.ClientSize          = new System.Drawing.Size(1012, 653);
     this.Controls.Add(this.panel5);
     this.MinimumSize = new System.Drawing.Size(800, 500);
     this.Name        = "Form1";
     this.Text        = "Child-Group Options ";
     this.panel1.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.afterDetails)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.beforeDetails)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.captionText)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.showCaption)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.ShowCaptionPlus)).EndInit();
     this.panel3.ResumeLayout(false);
     this.panel4.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.gridGroupingControl1)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.dataSet11)).EndInit();
     this.panel5.ResumeLayout(false);
     this.ResumeLayout(false);
 }
Пример #54
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.btnOpen                = new System.Windows.Forms.Button();
     this.txtDescription         = new System.Windows.Forms.TextBox();
     this.lstScenario            = new System.Windows.Forms.ListBox();
     this.lblScenarioId          = new System.Windows.Forms.Label();
     this.lblScenarioDescription = new System.Windows.Forms.Label();
     this.lblScenarioPath        = new System.Windows.Forms.Label();
     this.txtScenarioPath        = new System.Windows.Forms.TextBox();
     this.dataSet1               = new System.Data.DataSet();
     this.oleDbSelectCommand1    = new System.Data.OleDb.OleDbCommand();
     this.oleDbInsertCommand1    = new System.Data.OleDb.OleDbCommand();
     this.oleDbUpdateCommand1    = new System.Data.OleDb.OleDbCommand();
     this.oleDbDeleteCommand1    = new System.Data.OleDb.OleDbCommand();
     this.oleDbDataAdapter1      = new System.Data.OleDb.OleDbDataAdapter();
     this.oleDbCommand1          = new System.Data.OleDb.OleDbCommand();
     this.oleDbConnection1       = new System.Data.OleDb.OleDbConnection();
     this.lblNewScenario         = new System.Windows.Forms.Label();
     this.txtScenarioId          = new System.Windows.Forms.TextBox();
     this.btnCancel              = new System.Windows.Forms.Button();
     this.groupBox1              = new System.Windows.Forms.GroupBox();
     this.lblTitle               = new System.Windows.Forms.Label();
     this.btnClose               = new System.Windows.Forms.Button();
     ((System.ComponentModel.ISupportInitialize)(this.dataSet1)).BeginInit();
     this.groupBox1.SuspendLayout();
     this.SuspendLayout();
     //
     // btnOpen
     //
     this.btnOpen.BackColor = System.Drawing.SystemColors.Control;
     this.btnOpen.Location  = new System.Drawing.Point(224, 400);
     this.btnOpen.Name      = "btnOpen";
     this.btnOpen.Size      = new System.Drawing.Size(96, 32);
     this.btnOpen.TabIndex  = 1;
     this.btnOpen.Text      = "OK";
     this.btnOpen.Click    += new System.EventHandler(this.btnOpen_Click);
     //
     // txtDescription
     //
     this.txtDescription.Enabled      = false;
     this.txtDescription.Font         = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this.txtDescription.Location     = new System.Drawing.Point(168, 193);
     this.txtDescription.Multiline    = true;
     this.txtDescription.Name         = "txtDescription";
     this.txtDescription.Size         = new System.Drawing.Size(448, 152);
     this.txtDescription.TabIndex     = 2;
     this.txtDescription.Text         = "";
     this.txtDescription.KeyPress    += new System.Windows.Forms.KeyPressEventHandler(this.txtDescription_KeyPress);
     this.txtDescription.TextChanged += new System.EventHandler(this.txtDescription_TextChanged);
     //
     // lstScenario
     //
     this.lstScenario.Font                  = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this.lstScenario.ItemHeight            = 20;
     this.lstScenario.Location              = new System.Drawing.Point(8, 74);
     this.lstScenario.Name                  = "lstScenario";
     this.lstScenario.Size                  = new System.Drawing.Size(144, 324);
     this.lstScenario.TabIndex              = 3;
     this.lstScenario.SelectedIndexChanged += new System.EventHandler(this.lstScenario_SelectedIndexChanged);
     //
     // lblScenarioId
     //
     this.lblScenarioId.Font     = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this.lblScenarioId.Location = new System.Drawing.Point(16, 49);
     this.lblScenarioId.Name     = "lblScenarioId";
     this.lblScenarioId.Size     = new System.Drawing.Size(120, 23);
     this.lblScenarioId.TabIndex = 4;
     this.lblScenarioId.Text     = "Scenario List";
     //
     // lblScenarioDescription
     //
     this.lblScenarioDescription.Font     = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this.lblScenarioDescription.Location = new System.Drawing.Point(168, 166);
     this.lblScenarioDescription.Name     = "lblScenarioDescription";
     this.lblScenarioDescription.Size     = new System.Drawing.Size(138, 16);
     this.lblScenarioDescription.TabIndex = 5;
     this.lblScenarioDescription.Text     = "Scenario Description";
     //
     // lblScenarioPath
     //
     this.lblScenarioPath.Font     = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this.lblScenarioPath.Location = new System.Drawing.Point(168, 109);
     this.lblScenarioPath.Name     = "lblScenarioPath";
     this.lblScenarioPath.Size     = new System.Drawing.Size(136, 15);
     this.lblScenarioPath.TabIndex = 6;
     this.lblScenarioPath.Text     = "Scenario Directory Path";
     //
     // txtScenarioPath
     //
     this.txtScenarioPath.Font     = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this.txtScenarioPath.Location = new System.Drawing.Point(168, 129);
     this.txtScenarioPath.Name     = "txtScenarioPath";
     this.txtScenarioPath.Size     = new System.Drawing.Size(448, 26);
     this.txtScenarioPath.TabIndex = 7;
     this.txtScenarioPath.Text     = "";
     //
     // dataSet1
     //
     this.dataSet1.DataSetName = "NewDataSet";
     this.dataSet1.Locale      = new System.Globalization.CultureInfo("en-US");
     //
     // oleDbDataAdapter1
     //
     this.oleDbDataAdapter1.DeleteCommand = this.oleDbDeleteCommand1;
     this.oleDbDataAdapter1.InsertCommand = this.oleDbInsertCommand1;
     this.oleDbDataAdapter1.SelectCommand = this.oleDbSelectCommand1;
     this.oleDbDataAdapter1.UpdateCommand = this.oleDbUpdateCommand1;
     //
     // lblNewScenario
     //
     this.lblNewScenario.Font     = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this.lblNewScenario.Location = new System.Drawing.Point(168, 53);
     this.lblNewScenario.Name     = "lblNewScenario";
     this.lblNewScenario.Size     = new System.Drawing.Size(128, 15);
     this.lblNewScenario.TabIndex = 9;
     this.lblNewScenario.Text     = "Scenario Id";
     //
     // txtScenarioId
     //
     this.txtScenarioId.Font      = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this.txtScenarioId.Location  = new System.Drawing.Point(168, 75);
     this.txtScenarioId.MaxLength = 20;
     this.txtScenarioId.Name      = "txtScenarioId";
     this.txtScenarioId.Size      = new System.Drawing.Size(120, 26);
     this.txtScenarioId.TabIndex  = 10;
     this.txtScenarioId.Text      = "";
     this.txtScenarioId.Leave    += new System.EventHandler(this.txtScenarioId_Leave);
     //
     // btnCancel
     //
     this.btnCancel.BackColor = System.Drawing.SystemColors.Control;
     this.btnCancel.Enabled   = false;
     this.btnCancel.Location  = new System.Drawing.Point(336, 400);
     this.btnCancel.Name      = "btnCancel";
     this.btnCancel.Size      = new System.Drawing.Size(96, 32);
     this.btnCancel.TabIndex  = 14;
     this.btnCancel.Text      = "Cancel";
     this.btnCancel.Click    += new System.EventHandler(this.btnCancel_Click);
     //
     // groupBox1
     //
     this.groupBox1.Controls.Add(this.lblTitle);
     this.groupBox1.Controls.Add(this.btnClose);
     this.groupBox1.Controls.Add(this.lblNewScenario);
     this.groupBox1.Controls.Add(this.txtScenarioId);
     this.groupBox1.Controls.Add(this.lblScenarioPath);
     this.groupBox1.Controls.Add(this.txtScenarioPath);
     this.groupBox1.Controls.Add(this.lblScenarioDescription);
     this.groupBox1.Controls.Add(this.txtDescription);
     this.groupBox1.Controls.Add(this.btnOpen);
     this.groupBox1.Controls.Add(this.btnCancel);
     this.groupBox1.Controls.Add(this.lblScenarioId);
     this.groupBox1.Controls.Add(this.lstScenario);
     this.groupBox1.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.groupBox1.Location = new System.Drawing.Point(0, 0);
     this.groupBox1.Name     = "groupBox1";
     this.groupBox1.Size     = new System.Drawing.Size(632, 480);
     this.groupBox1.TabIndex = 15;
     this.groupBox1.TabStop  = false;
     this.groupBox1.Resize  += new System.EventHandler(this.groupBox1_Resize);
     //
     // lblTitle
     //
     this.lblTitle.Dock      = System.Windows.Forms.DockStyle.Top;
     this.lblTitle.Font      = new System.Drawing.Font("Microsoft Sans Serif", 14F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this.lblTitle.ForeColor = System.Drawing.Color.Green;
     this.lblTitle.Location  = new System.Drawing.Point(3, 16);
     this.lblTitle.Name      = "lblTitle";
     this.lblTitle.Size      = new System.Drawing.Size(626, 32);
     this.lblTitle.TabIndex  = 25;
     this.lblTitle.Text      = "Open Scenario";
     //
     // btnClose
     //
     this.btnClose.Anchor    = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     this.btnClose.BackColor = System.Drawing.SystemColors.Control;
     this.btnClose.Location  = new System.Drawing.Point(528, 440);
     this.btnClose.Name      = "btnClose";
     this.btnClose.Size      = new System.Drawing.Size(96, 32);
     this.btnClose.TabIndex  = 15;
     this.btnClose.Text      = "Close";
     this.btnClose.Click    += new System.EventHandler(this.btnClose_Click);
     //
     // uc_scenario_open
     //
     this.BackColor = System.Drawing.SystemColors.Control;
     this.Controls.Add(this.groupBox1);
     this.Name       = "uc_scenario_open";
     this.Size       = new System.Drawing.Size(632, 480);
     this.Resize    += new System.EventHandler(this.uc_scenario_Resize);
     this.Load      += new System.EventHandler(this.uc_scenario_Load);
     this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.uc_scenario_MouseDown);
     ((System.ComponentModel.ISupportInitialize)(this.dataSet1)).EndInit();
     this.groupBox1.ResumeLayout(false);
     this.ResumeLayout(false);
 }
Пример #55
0
 /// <summary>
 /// 设计器支持所需的方法 - 不要使用代码编辑器修改
 /// 此方法的内容。
 /// </summary>
 private void InitializeComponent()
 {
     this.oleDbSelectCommand1 = new System.Data.OleDb.OleDbCommand();
     this.odcn = new System.Data.OleDb.OleDbConnection();
     this.oleDbInsertCommand1 = new System.Data.OleDb.OleDbCommand();
     this.oleDbUpdateCommand1 = new System.Data.OleDb.OleDbCommand();
     this.oleDbDeleteCommand1 = new System.Data.OleDb.OleDbCommand();
     this.odda = new System.Data.OleDb.OleDbDataAdapter();
     this.odcm = new System.Data.Odbc.OdbcCommand();
     //
     // oleDbSelectCommand1
     //
     this.oleDbSelectCommand1.CommandText = "SELECT 备注, 部件费, 传真号, 单位地址, 电话, 附件, 检定费, 检定人员, 检校类别, 交费日期, 交通费, 科别, 流水号, 器号, 器具名称," +
                                            " 实交费用, 数量, 送检单位, 送检日期, 完成日期, 委托人, 校准费, 协作费, 型号, 修理费, 应交费用, 邮政编码 FROM shoufatable" +
                                            "";
     this.oleDbSelectCommand1.Connection = this.odcn;
     //
     // odcn
     //
     this.odcn.ConnectionString = @"Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Registry Path=;Jet OLEDB:Database Locking Mode=1;Data Source=""D:\Documents and Settings\Administrator\My Documents\office\db7.mdb"";Jet OLEDB:Engine Type=5;Provider=""Microsoft.Jet.OLEDB.4.0"";Jet OLEDB:System database=;Jet OLEDB:SFP=False;persist security info=False;Extended Properties=;Mode=Share Deny None;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Create System Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;User ID=Admin;Jet OLEDB:Global Bulk Transactions=1";
     //
     // oleDbInsertCommand1
     //
     this.oleDbInsertCommand1.CommandText = "INSERT INTO shoufatable(备注, 部件费, 传真号, 单位地址, 电话, 附件, 检定费, 检定人员, 检校类别, 交费日期, 交通费, 科" +
                                            "别, 器号, 器具名称, 实交费用, 数量, 送检单位, 送检日期, 完成日期, 委托人, 校准费, 协作费, 型号, 修理费, 应交费用, 邮政编码) VAL" +
                                            "UES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, " +
                                            "?)";
     this.oleDbInsertCommand1.Connection = this.odcn;
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("备注", System.Data.OleDb.OleDbType.VarWChar, 0, "备注"));
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("部件费", System.Data.OleDb.OleDbType.Currency, 0, "部件费"));
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("传真号", System.Data.OleDb.OleDbType.VarWChar, 15, "传真号"));
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("单位地址", System.Data.OleDb.OleDbType.VarWChar, 42, "单位地址"));
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("电话", System.Data.OleDb.OleDbType.VarWChar, 14, "电话"));
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("附件", System.Data.OleDb.OleDbType.VarWChar, 40, "附件"));
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("检定费", System.Data.OleDb.OleDbType.Currency, 0, "检定费"));
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("检定人员", System.Data.OleDb.OleDbType.VarWChar, 68, "检定人员"));
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("检校类别", System.Data.OleDb.OleDbType.VarWChar, 20, "检校类别"));
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("交费日期", System.Data.OleDb.OleDbType.DBDate, 0, "交费日期"));
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("交通费", System.Data.OleDb.OleDbType.Currency, 0, "交通费"));
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("科别", System.Data.OleDb.OleDbType.VarWChar, 13, "科别"));
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("器号", System.Data.OleDb.OleDbType.VarWChar, 20, "器号"));
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("器具名称", System.Data.OleDb.OleDbType.VarWChar, 50, "器具名称"));
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("实交费用", System.Data.OleDb.OleDbType.Currency, 0, "实交费用"));
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("数量", System.Data.OleDb.OleDbType.Integer, 0, "数量"));
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("送检单位", System.Data.OleDb.OleDbType.VarWChar, 38, "送检单位"));
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("送检日期", System.Data.OleDb.OleDbType.DBDate, 0, "送检日期"));
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("完成日期", System.Data.OleDb.OleDbType.DBDate, 0, "完成日期"));
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("委托人", System.Data.OleDb.OleDbType.VarWChar, 10, "委托人"));
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("校准费", System.Data.OleDb.OleDbType.Currency, 0, "校准费"));
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("协作费", System.Data.OleDb.OleDbType.Currency, 0, "协作费"));
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("型号", System.Data.OleDb.OleDbType.VarWChar, 16, "型号"));
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("修理费", System.Data.OleDb.OleDbType.Currency, 0, "修理费"));
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("应交费用", System.Data.OleDb.OleDbType.Currency, 0, "应交费用"));
     this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("邮政编码", System.Data.OleDb.OleDbType.VarWChar, 12, "邮政编码"));
     //
     // oleDbUpdateCommand1
     //
     this.oleDbUpdateCommand1.CommandText = @"UPDATE shoufatable SET 备注 = ?, 部件费 = ?, 传真号 = ?, 单位地址 = ?, 电话 = ?, 附件 = ?, 检定费 = ?, 检定人员 = ?, 检校类别 = ?, 交费日期 = ?, 交通费 = ?, 科别 = ?, 器号 = ?, 器具名称 = ?, 实交费用 = ?, 数量 = ?, 送检单位 = ?, 送检日期 = ?, 完成日期 = ?, 委托人 = ?, 校准费 = ?, 协作费 = ?, 型号 = ?, 修理费 = ?, 应交费用 = ?, 邮政编码 = ? WHERE (流水号 = ?) AND (交费日期 = ? OR ? IS NULL AND 交费日期 IS NULL) AND (交通费 = ? OR ? IS NULL AND 交通费 IS NULL) AND (传真号 = ? OR ? IS NULL AND 传真号 IS NULL) AND (修理费 = ? OR ? IS NULL AND 修理费 IS NULL) AND (协作费 = ? OR ? IS NULL AND 协作费 IS NULL) AND (单位地址 = ? OR ? IS NULL AND 单位地址 IS NULL) AND (器具名称 = ? OR ? IS NULL AND 器具名称 IS NULL) AND (器号 = ? OR ? IS NULL AND 器号 IS NULL) AND (型号 = ? OR ? IS NULL AND 型号 IS NULL) AND (委托人 = ? OR ? IS NULL AND 委托人 IS NULL) AND (完成日期 = ? OR ? IS NULL AND 完成日期 IS NULL) AND (实交费用 = ? OR ? IS NULL AND 实交费用 IS NULL) AND (应交费用 = ? OR ? IS NULL AND 应交费用 IS NULL) AND (数量 = ? OR ? IS NULL AND 数量 IS NULL) AND (校准费 = ? OR ? IS NULL AND 校准费 IS NULL) AND (检定人员 = ? OR ? IS NULL AND 检定人员 IS NULL) AND (检定费 = ? OR ? IS NULL AND 检定费 IS NULL) AND (检校类别 = ? OR ? IS NULL AND 检校类别 IS NULL) AND (电话 = ? OR ? IS NULL AND 电话 IS NULL) AND (科别 = ? OR ? IS NULL AND 科别 IS NULL) AND (送检单位 = ? OR ? IS NULL AND 送检单位 IS NULL) AND (送检日期 = ? OR ? IS NULL AND 送检日期 IS NULL) AND (邮政编码 = ? OR ? IS NULL AND 邮政编码 IS NULL) AND (部件费 = ? OR ? IS NULL AND 部件费 IS NULL) AND (附件 = ? OR ? IS NULL AND 附件 IS NULL)";
     this.oleDbUpdateCommand1.Connection  = this.odcn;
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("备注", System.Data.OleDb.OleDbType.VarWChar, 0, "备注"));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("部件费", System.Data.OleDb.OleDbType.Currency, 0, "部件费"));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("传真号", System.Data.OleDb.OleDbType.VarWChar, 15, "传真号"));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("单位地址", System.Data.OleDb.OleDbType.VarWChar, 42, "单位地址"));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("电话", System.Data.OleDb.OleDbType.VarWChar, 14, "电话"));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("附件", System.Data.OleDb.OleDbType.VarWChar, 40, "附件"));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("检定费", System.Data.OleDb.OleDbType.Currency, 0, "检定费"));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("检定人员", System.Data.OleDb.OleDbType.VarWChar, 68, "检定人员"));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("检校类别", System.Data.OleDb.OleDbType.VarWChar, 20, "检校类别"));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("交费日期", System.Data.OleDb.OleDbType.DBDate, 0, "交费日期"));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("交通费", System.Data.OleDb.OleDbType.Currency, 0, "交通费"));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("科别", System.Data.OleDb.OleDbType.VarWChar, 13, "科别"));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("器号", System.Data.OleDb.OleDbType.VarWChar, 20, "器号"));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("器具名称", System.Data.OleDb.OleDbType.VarWChar, 50, "器具名称"));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("实交费用", System.Data.OleDb.OleDbType.Currency, 0, "实交费用"));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("数量", System.Data.OleDb.OleDbType.Integer, 0, "数量"));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("送检单位", System.Data.OleDb.OleDbType.VarWChar, 38, "送检单位"));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("送检日期", System.Data.OleDb.OleDbType.DBDate, 0, "送检日期"));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("完成日期", System.Data.OleDb.OleDbType.DBDate, 0, "完成日期"));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("委托人", System.Data.OleDb.OleDbType.VarWChar, 10, "委托人"));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("校准费", System.Data.OleDb.OleDbType.Currency, 0, "校准费"));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("协作费", System.Data.OleDb.OleDbType.Currency, 0, "协作费"));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("型号", System.Data.OleDb.OleDbType.VarWChar, 16, "型号"));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("修理费", System.Data.OleDb.OleDbType.Currency, 0, "修理费"));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("应交费用", System.Data.OleDb.OleDbType.Currency, 0, "应交费用"));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("邮政编码", System.Data.OleDb.OleDbType.VarWChar, 12, "邮政编码"));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_流水号", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "流水号", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_交费日期", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "交费日期", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_交费日期1", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "交费日期", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_交通费", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "交通费", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_交通费1", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "交通费", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_传真号", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "传真号", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_传真号1", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "传真号", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_修理费", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "修理费", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_修理费1", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "修理费", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_协作费", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "协作费", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_协作费1", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "协作费", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_单位地址", System.Data.OleDb.OleDbType.VarWChar, 42, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "单位地址", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_单位地址1", System.Data.OleDb.OleDbType.VarWChar, 42, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "单位地址", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_器具名称", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "器具名称", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_器具名称1", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "器具名称", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_器号", System.Data.OleDb.OleDbType.VarWChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "器号", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_器号1", System.Data.OleDb.OleDbType.VarWChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "器号", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_型号", System.Data.OleDb.OleDbType.VarWChar, 16, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "型号", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_型号1", System.Data.OleDb.OleDbType.VarWChar, 16, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "型号", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_委托人", System.Data.OleDb.OleDbType.VarWChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "委托人", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_委托人1", System.Data.OleDb.OleDbType.VarWChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "委托人", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_完成日期", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "完成日期", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_完成日期1", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "完成日期", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_实交费用", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "实交费用", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_实交费用1", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "实交费用", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_应交费用", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "应交费用", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_应交费用1", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "应交费用", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_数量", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "数量", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_数量1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "数量", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_校准费", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "校准费", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_校准费1", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "校准费", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_检定人员", System.Data.OleDb.OleDbType.VarWChar, 68, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "检定人员", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_检定人员1", System.Data.OleDb.OleDbType.VarWChar, 68, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "检定人员", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_检定费", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "检定费", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_检定费1", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "检定费", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_检校类别", System.Data.OleDb.OleDbType.VarWChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "检校类别", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_检校类别1", System.Data.OleDb.OleDbType.VarWChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "检校类别", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_电话", System.Data.OleDb.OleDbType.VarWChar, 14, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "电话", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_电话1", System.Data.OleDb.OleDbType.VarWChar, 14, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "电话", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_科别", System.Data.OleDb.OleDbType.VarWChar, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "科别", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_科别1", System.Data.OleDb.OleDbType.VarWChar, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "科别", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_送检单位", System.Data.OleDb.OleDbType.VarWChar, 38, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "送检单位", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_送检单位1", System.Data.OleDb.OleDbType.VarWChar, 38, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "送检单位", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_送检日期", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "送检日期", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_送检日期1", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "送检日期", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_邮政编码", System.Data.OleDb.OleDbType.VarWChar, 12, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "邮政编码", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_邮政编码1", System.Data.OleDb.OleDbType.VarWChar, 12, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "邮政编码", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_部件费", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "部件费", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_部件费1", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "部件费", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_附件", System.Data.OleDb.OleDbType.VarWChar, 40, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "附件", System.Data.DataRowVersion.Original, null));
     this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_附件1", System.Data.OleDb.OleDbType.VarWChar, 40, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "附件", System.Data.DataRowVersion.Original, null));
     //
     // oleDbDeleteCommand1
     //
     this.oleDbDeleteCommand1.CommandText = @"DELETE FROM shoufatable WHERE (流水号 = ?) AND (交费日期 = ? OR ? IS NULL AND 交费日期 IS NULL) AND (交通费 = ? OR ? IS NULL AND 交通费 IS NULL) AND (传真号 = ? OR ? IS NULL AND 传真号 IS NULL) AND (修理费 = ? OR ? IS NULL AND 修理费 IS NULL) AND (协作费 = ? OR ? IS NULL AND 协作费 IS NULL) AND (单位地址 = ? OR ? IS NULL AND 单位地址 IS NULL) AND (器具名称 = ? OR ? IS NULL AND 器具名称 IS NULL) AND (器号 = ? OR ? IS NULL AND 器号 IS NULL) AND (型号 = ? OR ? IS NULL AND 型号 IS NULL) AND (委托人 = ? OR ? IS NULL AND 委托人 IS NULL) AND (完成日期 = ? OR ? IS NULL AND 完成日期 IS NULL) AND (实交费用 = ? OR ? IS NULL AND 实交费用 IS NULL) AND (应交费用 = ? OR ? IS NULL AND 应交费用 IS NULL) AND (数量 = ? OR ? IS NULL AND 数量 IS NULL) AND (校准费 = ? OR ? IS NULL AND 校准费 IS NULL) AND (检定人员 = ? OR ? IS NULL AND 检定人员 IS NULL) AND (检定费 = ? OR ? IS NULL AND 检定费 IS NULL) AND (检校类别 = ? OR ? IS NULL AND 检校类别 IS NULL) AND (电话 = ? OR ? IS NULL AND 电话 IS NULL) AND (科别 = ? OR ? IS NULL AND 科别 IS NULL) AND (送检单位 = ? OR ? IS NULL AND 送检单位 IS NULL) AND (送检日期 = ? OR ? IS NULL AND 送检日期 IS NULL) AND (邮政编码 = ? OR ? IS NULL AND 邮政编码 IS NULL) AND (部件费 = ? OR ? IS NULL AND 部件费 IS NULL) AND (附件 = ? OR ? IS NULL AND 附件 IS NULL)";
     this.oleDbDeleteCommand1.Connection  = this.odcn;
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_流水号", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "流水号", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_交费日期", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "交费日期", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_交费日期1", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "交费日期", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_交通费", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "交通费", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_交通费1", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "交通费", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_传真号", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "传真号", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_传真号1", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "传真号", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_修理费", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "修理费", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_修理费1", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "修理费", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_协作费", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "协作费", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_协作费1", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "协作费", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_单位地址", System.Data.OleDb.OleDbType.VarWChar, 42, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "单位地址", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_单位地址1", System.Data.OleDb.OleDbType.VarWChar, 42, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "单位地址", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_器具名称", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "器具名称", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_器具名称1", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "器具名称", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_器号", System.Data.OleDb.OleDbType.VarWChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "器号", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_器号1", System.Data.OleDb.OleDbType.VarWChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "器号", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_型号", System.Data.OleDb.OleDbType.VarWChar, 16, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "型号", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_型号1", System.Data.OleDb.OleDbType.VarWChar, 16, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "型号", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_委托人", System.Data.OleDb.OleDbType.VarWChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "委托人", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_委托人1", System.Data.OleDb.OleDbType.VarWChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "委托人", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_完成日期", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "完成日期", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_完成日期1", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "完成日期", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_实交费用", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "实交费用", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_实交费用1", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "实交费用", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_应交费用", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "应交费用", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_应交费用1", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "应交费用", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_数量", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "数量", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_数量1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "数量", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_校准费", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "校准费", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_校准费1", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "校准费", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_检定人员", System.Data.OleDb.OleDbType.VarWChar, 68, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "检定人员", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_检定人员1", System.Data.OleDb.OleDbType.VarWChar, 68, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "检定人员", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_检定费", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "检定费", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_检定费1", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "检定费", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_检校类别", System.Data.OleDb.OleDbType.VarWChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "检校类别", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_检校类别1", System.Data.OleDb.OleDbType.VarWChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "检校类别", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_电话", System.Data.OleDb.OleDbType.VarWChar, 14, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "电话", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_电话1", System.Data.OleDb.OleDbType.VarWChar, 14, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "电话", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_科别", System.Data.OleDb.OleDbType.VarWChar, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "科别", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_科别1", System.Data.OleDb.OleDbType.VarWChar, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "科别", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_送检单位", System.Data.OleDb.OleDbType.VarWChar, 38, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "送检单位", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_送检单位1", System.Data.OleDb.OleDbType.VarWChar, 38, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "送检单位", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_送检日期", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "送检日期", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_送检日期1", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "送检日期", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_邮政编码", System.Data.OleDb.OleDbType.VarWChar, 12, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "邮政编码", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_邮政编码1", System.Data.OleDb.OleDbType.VarWChar, 12, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "邮政编码", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_部件费", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "部件费", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_部件费1", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "部件费", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_附件", System.Data.OleDb.OleDbType.VarWChar, 40, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "附件", System.Data.DataRowVersion.Original, null));
     this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_附件1", System.Data.OleDb.OleDbType.VarWChar, 40, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "附件", System.Data.DataRowVersion.Original, null));
     //
     // odda
     //
     this.odda.DeleteCommand = this.oleDbDeleteCommand1;
     this.odda.InsertCommand = this.oleDbInsertCommand1;
     this.odda.SelectCommand = this.oleDbSelectCommand1;
     this.odda.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
         new System.Data.Common.DataTableMapping("Table", "shoufatable", new System.Data.Common.DataColumnMapping[] {
             new System.Data.Common.DataColumnMapping("备注", "备注"),
             new System.Data.Common.DataColumnMapping("部件费", "部件费"),
             new System.Data.Common.DataColumnMapping("传真号", "传真号"),
             new System.Data.Common.DataColumnMapping("单位地址", "单位地址"),
             new System.Data.Common.DataColumnMapping("电话", "电话"),
             new System.Data.Common.DataColumnMapping("附件", "附件"),
             new System.Data.Common.DataColumnMapping("检定费", "检定费"),
             new System.Data.Common.DataColumnMapping("检定人员", "检定人员"),
             new System.Data.Common.DataColumnMapping("检校类别", "检校类别"),
             new System.Data.Common.DataColumnMapping("交费日期", "交费日期"),
             new System.Data.Common.DataColumnMapping("交通费", "交通费"),
             new System.Data.Common.DataColumnMapping("科别", "科别"),
             new System.Data.Common.DataColumnMapping("流水号", "流水号"),
             new System.Data.Common.DataColumnMapping("器号", "器号"),
             new System.Data.Common.DataColumnMapping("器具名称", "器具名称"),
             new System.Data.Common.DataColumnMapping("实交费用", "实交费用"),
             new System.Data.Common.DataColumnMapping("数量", "数量"),
             new System.Data.Common.DataColumnMapping("送检单位", "送检单位"),
             new System.Data.Common.DataColumnMapping("送检日期", "送检日期"),
             new System.Data.Common.DataColumnMapping("完成日期", "完成日期"),
             new System.Data.Common.DataColumnMapping("委托人", "委托人"),
             new System.Data.Common.DataColumnMapping("校准费", "校准费"),
             new System.Data.Common.DataColumnMapping("协作费", "协作费"),
             new System.Data.Common.DataColumnMapping("型号", "型号"),
             new System.Data.Common.DataColumnMapping("修理费", "修理费"),
             new System.Data.Common.DataColumnMapping("应交费用", "应交费用"),
             new System.Data.Common.DataColumnMapping("邮政编码", "邮政编码")
         })
     });
     this.odda.UpdateCommand = this.oleDbUpdateCommand1;
     this.Load += new System.EventHandler(this.Page_Load);
 }
Пример #56
0
 /// <summary> Used to return an HL7 normative database connection to the connection pool.  If the
 /// given connection is not in fact a connection to the normative database, it is
 /// discarded.
 /// </summary>
 //UPGRADE_NOTE: There are other database providers or managers under System.Data namespace which can be used optionally to better fit the application requirements. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1208'"
 public virtual void  returnConnection(System.Data.OleDb.OleDbConnection conn)
 {
     //check if this is a normative DB connection
     _conn.Close();
 }
Пример #57
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     C1.Win.C1List.Style style1 = new C1.Win.C1List.Style();
     C1.Win.C1List.Style style2 = new C1.Win.C1List.Style();
     C1.Win.C1List.Style style3 = new C1.Win.C1List.Style();
     C1.Win.C1List.Style style4 = new C1.Win.C1List.Style();
     C1.Win.C1List.Style style5 = new C1.Win.C1List.Style();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
     C1.Win.C1List.Style style6 = new C1.Win.C1List.Style();
     C1.Win.C1List.Style style7 = new C1.Win.C1List.Style();
     C1.Win.C1List.Style style8 = new C1.Win.C1List.Style();
     this.c1Combo1            = new C1.Win.C1List.C1Combo();
     this.oleDbSelectCommand1 = new System.Data.OleDb.OleDbCommand();
     this.oleDbDataAdapter1   = new System.Data.OleDb.OleDbDataAdapter();
     this.oleDbConnection1    = new System.Data.OleDb.OleDbConnection();
     this.dataSet11           = new Tutorial2.DataSet1();
     ((System.ComponentModel.ISupportInitialize)(this.c1Combo1)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.dataSet11)).BeginInit();
     this.SuspendLayout();
     //
     // c1Combo1
     //
     this.c1Combo1.AddItemSeparator    = ';';
     this.c1Combo1.Caption             = "";
     this.c1Combo1.CaptionHeight       = 17;
     this.c1Combo1.CaptionStyle        = style1;
     this.c1Combo1.CharacterCasing     = System.Windows.Forms.CharacterCasing.Normal;
     this.c1Combo1.ColumnCaptionHeight = 17;
     this.c1Combo1.ColumnFooterHeight  = 17;
     this.c1Combo1.ColumnWidth         = 100;
     this.c1Combo1.ContentHeight       = 15;
     this.c1Combo1.DataMember          = "Composer";
     this.c1Combo1.DataSource          = this.dataSet11;
     this.c1Combo1.DeadAreaBackColor   = System.Drawing.Color.Empty;
     this.c1Combo1.EditorBackColor     = System.Drawing.SystemColors.Window;
     this.c1Combo1.EditorFont          = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
     this.c1Combo1.EditorForeColor     = System.Drawing.SystemColors.WindowText;
     this.c1Combo1.EditorHeight        = 15;
     this.c1Combo1.EvenRowStyle        = style2;
     this.c1Combo1.FlatStyle           = C1.Win.C1List.FlatModeEnum.Standard;
     this.c1Combo1.FooterStyle         = style3;
     this.c1Combo1.GapHeight           = 2;
     this.c1Combo1.HeadingStyle        = style4;
     this.c1Combo1.HighLightRowStyle   = style5;
     this.c1Combo1.Images.Add(((System.Drawing.Image)(resources.GetObject("c1Combo1.Images"))));
     this.c1Combo1.ItemHeight        = 15;
     this.c1Combo1.Location          = new System.Drawing.Point(61, 112);
     this.c1Combo1.MatchEntryTimeout = ((long)(2000));
     this.c1Combo1.MaxDropDownItems  = ((short)(5));
     this.c1Combo1.MaxLength         = 32767;
     this.c1Combo1.MouseCursor       = System.Windows.Forms.Cursors.Default;
     this.c1Combo1.Name               = "c1Combo1";
     this.c1Combo1.OddRowStyle        = style6;
     this.c1Combo1.RowDivider.Color   = System.Drawing.Color.DarkGray;
     this.c1Combo1.RowDivider.Style   = C1.Win.C1List.LineStyleEnum.None;
     this.c1Combo1.RowSubDividerColor = System.Drawing.Color.DarkGray;
     this.c1Combo1.SelectedStyle      = style7;
     this.c1Combo1.Size               = new System.Drawing.Size(310, 21);
     this.c1Combo1.Style              = style8;
     this.c1Combo1.TabIndex           = 0;
     this.c1Combo1.Text               = "c1Combo1";
     this.c1Combo1.PropBag            = resources.GetString("c1Combo1.PropBag");
     //
     // oleDbSelectCommand1
     //
     this.oleDbSelectCommand1.CommandText = "SELECT     Composer.*\r\nFROM         Composer";
     this.oleDbSelectCommand1.Connection  = this.oleDbConnection1;
     //
     // oleDbDataAdapter1
     //
     this.oleDbDataAdapter1.SelectCommand = this.oleDbSelectCommand1;
     this.oleDbDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
         new System.Data.Common.DataTableMapping("Table", "Composer", new System.Data.Common.DataColumnMapping[] {
             new System.Data.Common.DataColumnMapping("First", "First"),
             new System.Data.Common.DataColumnMapping("Last", "Last"),
             new System.Data.Common.DataColumnMapping("Country", "Country"),
             new System.Data.Common.DataColumnMapping("Birth", "Birth"),
             new System.Data.Common.DataColumnMapping("Death", "Death")
         })
     });
     //
     // oleDbConnection1
     //
     this.oleDbConnection1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\"..\\..\\..\\Data\\C1ListDemo.mdb\"";
     //
     // dataSet11
     //
     this.dataSet11.DataSetName = "DataSet1";
     //
     // Form1
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(440, 273);
     this.Controls.Add(this.c1Combo1);
     this.Name  = "Form1";
     this.Text  = "C1List .Net Tutorial2";
     this.Load += new System.EventHandler(this.Form1_Load);
     ((System.ComponentModel.ISupportInitialize)(this.c1Combo1)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.dataSet11)).EndInit();
     this.ResumeLayout(false);
 }
Пример #58
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
     this.gradientPanel1       = new Syncfusion.Windows.Forms.Tools.GradientPanel();
     this.gridGroupingControl1 = new Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControl();
     this.dataSet11            = new FocusedSelection.DataSet1();
     this.oleDbDataAdapter1    = new System.Data.OleDb.OleDbDataAdapter();
     this.oleDbDeleteCommand1  = new System.Data.OleDb.OleDbCommand();
     this.oleDbConnection1     = new System.Data.OleDb.OleDbConnection();
     this.oleDbInsertCommand1  = new System.Data.OleDb.OleDbCommand();
     this.oleDbSelectCommand1  = new System.Data.OleDb.OleDbCommand();
     this.oleDbUpdateCommand1  = new System.Data.OleDb.OleDbCommand();
     this.groupBox1            = new System.Windows.Forms.GroupBox();
     this.radioButton6         = new Syncfusion.Windows.Forms.Tools.RadioButtonAdv();
     this.radioButton5         = new Syncfusion.Windows.Forms.Tools.RadioButtonAdv();
     this.radioButton4         = new Syncfusion.Windows.Forms.Tools.RadioButtonAdv();
     this.radioButton3         = new Syncfusion.Windows.Forms.Tools.RadioButtonAdv();
     this.radioButton2         = new Syncfusion.Windows.Forms.Tools.RadioButtonAdv();
     this.radioButton1         = new Syncfusion.Windows.Forms.Tools.RadioButtonAdv();
     this.gradientPanel2       = new Syncfusion.Windows.Forms.Tools.GradientPanel();
     this.propertyGrid1        = new System.Windows.Forms.PropertyGrid();
     ((System.ComponentModel.ISupportInitialize)(this.gradientPanel1)).BeginInit();
     this.gradientPanel1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.gridGroupingControl1)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.dataSet11)).BeginInit();
     this.groupBox1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.radioButton6)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.radioButton5)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.radioButton4)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.radioButton3)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.radioButton2)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.radioButton1)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.gradientPanel2)).BeginInit();
     this.gradientPanel2.SuspendLayout();
     this.SuspendLayout();
     //
     // gradientPanel1
     //
     this.gradientPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                         | System.Windows.Forms.AnchorStyles.Left)
                                                                        | System.Windows.Forms.AnchorStyles.Right)));
     this.gradientPanel1.BorderColor = System.Drawing.Color.Transparent;
     this.gradientPanel1.BorderStyle = System.Windows.Forms.BorderStyle.None;
     this.gradientPanel1.Controls.Add(this.gridGroupingControl1);
     this.gradientPanel1.Location = new System.Drawing.Point(12, 12);
     this.gradientPanel1.Name     = "gradientPanel1";
     this.gradientPanel1.Size     = new System.Drawing.Size(641, 629);
     this.gradientPanel1.TabIndex = 0;
     //
     // gridGroupingControl1
     //
     this.gridGroupingControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                               | System.Windows.Forms.AnchorStyles.Left)
                                                                              | System.Windows.Forms.AnchorStyles.Right)));
     this.gridGroupingControl1.BackColor            = System.Drawing.SystemColors.Window;
     this.gridGroupingControl1.DataSource           = this.dataSet11.Statistics;
     this.gridGroupingControl1.FreezeCaption        = false;
     this.gridGroupingControl1.GridOfficeScrollBars = Syncfusion.Windows.Forms.OfficeScrollBars.Metro;
     this.gridGroupingControl1.GridVisualStyles     = Syncfusion.Windows.Forms.GridVisualStyles.Metro;
     this.gridGroupingControl1.Location             = new System.Drawing.Point(22, 8);
     this.gridGroupingControl1.Name     = "gridGroupingControl1";
     this.gridGroupingControl1.Size     = new System.Drawing.Size(609, 605);
     this.gridGroupingControl1.TabIndex = 0;
     this.gridGroupingControl1.TableDescriptor.AllowNew = false;
     this.gridGroupingControl1.TableDescriptor.Appearance.AnyCell.Font.Bold                 = false;
     this.gridGroupingControl1.TableDescriptor.Appearance.AnyCell.Font.Facename             = "Segoe UI";
     this.gridGroupingControl1.TableDescriptor.Appearance.AnyCell.Font.Italic               = false;
     this.gridGroupingControl1.TableDescriptor.Appearance.AnyCell.Font.Size                 = 8.25F;
     this.gridGroupingControl1.TableDescriptor.Appearance.AnyCell.Font.Strikeout            = false;
     this.gridGroupingControl1.TableDescriptor.Appearance.AnyCell.Font.Underline            = false;
     this.gridGroupingControl1.TableDescriptor.Appearance.AnyCell.Font.Unit                 = System.Drawing.GraphicsUnit.Point;
     this.gridGroupingControl1.TableDescriptor.Appearance.AnyCell.TextColor                 = System.Drawing.Color.FromArgb(((int)(((byte)(138)))), ((int)(((byte)(138)))), ((int)(((byte)(138)))));
     this.gridGroupingControl1.TableDescriptor.Appearance.AnyGroupCell.Borders.Bottom       = new Syncfusion.Windows.Forms.Grid.GridBorder(Syncfusion.Windows.Forms.Grid.GridBorderStyle.Solid, System.Drawing.Color.FromArgb(((int)(((byte)(234)))), ((int)(((byte)(234)))), ((int)(((byte)(234))))), Syncfusion.Windows.Forms.Grid.GridBorderWeight.ExtraThin);
     this.gridGroupingControl1.TableDescriptor.Appearance.AnyGroupCell.Borders.Right        = new Syncfusion.Windows.Forms.Grid.GridBorder(Syncfusion.Windows.Forms.Grid.GridBorderStyle.Solid, System.Drawing.Color.FromArgb(((int)(((byte)(234)))), ((int)(((byte)(234)))), ((int)(((byte)(234))))), Syncfusion.Windows.Forms.Grid.GridBorderWeight.ExtraThin);
     this.gridGroupingControl1.TableDescriptor.Appearance.AnyGroupCell.Interior             = new Syncfusion.Drawing.BrushInfo(System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))));
     this.gridGroupingControl1.TableDescriptor.Appearance.AnyGroupCell.TextColor            = System.Drawing.Color.FromArgb(((int)(((byte)(138)))), ((int)(((byte)(138)))), ((int)(((byte)(138)))));
     this.gridGroupingControl1.TableDescriptor.Appearance.AnyHeaderCell.Font.Bold           = false;
     this.gridGroupingControl1.TableDescriptor.Appearance.AnyHeaderCell.Font.Facename       = "Arial";
     this.gridGroupingControl1.TableDescriptor.Appearance.AnyHeaderCell.Font.Italic         = false;
     this.gridGroupingControl1.TableDescriptor.Appearance.AnyHeaderCell.Font.Size           = 9.75F;
     this.gridGroupingControl1.TableDescriptor.Appearance.AnyHeaderCell.Font.Strikeout      = false;
     this.gridGroupingControl1.TableDescriptor.Appearance.AnyHeaderCell.Font.Underline      = false;
     this.gridGroupingControl1.TableDescriptor.Appearance.AnyHeaderCell.Font.Unit           = System.Drawing.GraphicsUnit.Point;
     this.gridGroupingControl1.TableDescriptor.Appearance.AnyRecordFieldCell.Borders.Bottom = new Syncfusion.Windows.Forms.Grid.GridBorder(Syncfusion.Windows.Forms.Grid.GridBorderStyle.Solid, System.Drawing.Color.FromArgb(((int)(((byte)(234)))), ((int)(((byte)(234)))), ((int)(((byte)(234))))), Syncfusion.Windows.Forms.Grid.GridBorderWeight.ExtraThin);
     this.gridGroupingControl1.TableDescriptor.Appearance.AnyRecordFieldCell.Borders.Right  = new Syncfusion.Windows.Forms.Grid.GridBorder(Syncfusion.Windows.Forms.Grid.GridBorderStyle.Solid, System.Drawing.Color.FromArgb(((int)(((byte)(234)))), ((int)(((byte)(234)))), ((int)(((byte)(234))))), Syncfusion.Windows.Forms.Grid.GridBorderWeight.ExtraThin);
     this.gridGroupingControl1.TableDescriptor.Appearance.AnyRecordFieldCell.Font.Bold      = false;
     this.gridGroupingControl1.TableDescriptor.Appearance.AnyRecordFieldCell.Font.Facename  = "Arial";
     this.gridGroupingControl1.TableDescriptor.Appearance.AnyRecordFieldCell.Font.Italic    = false;
     this.gridGroupingControl1.TableDescriptor.Appearance.AnyRecordFieldCell.Font.Size      = 9F;
     this.gridGroupingControl1.TableDescriptor.Appearance.AnyRecordFieldCell.Font.Strikeout = false;
     this.gridGroupingControl1.TableDescriptor.Appearance.AnyRecordFieldCell.Font.Underline = false;
     this.gridGroupingControl1.TableDescriptor.Appearance.AnyRecordFieldCell.Font.Unit      = System.Drawing.GraphicsUnit.Point;
     this.gridGroupingControl1.TableDescriptor.Appearance.AnySummaryCell.Borders.Right      = new Syncfusion.Windows.Forms.Grid.GridBorder(Syncfusion.Windows.Forms.Grid.GridBorderStyle.Solid, System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(208)))), ((int)(((byte)(208))))), Syncfusion.Windows.Forms.Grid.GridBorderWeight.ExtraThin);
     this.gridGroupingControl1.TableDescriptor.Appearance.AnySummaryCell.Borders.Top        = new Syncfusion.Windows.Forms.Grid.GridBorder(Syncfusion.Windows.Forms.Grid.GridBorderStyle.Solid, System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(208)))), ((int)(((byte)(208))))), Syncfusion.Windows.Forms.Grid.GridBorderWeight.ExtraThin);
     this.gridGroupingControl1.TableDescriptor.Appearance.AnySummaryCell.Interior           = new Syncfusion.Drawing.BrushInfo(System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(208)))), ((int)(((byte)(208))))));
     this.gridGroupingControl1.TableDescriptor.Appearance.ColumnHeaderCell.Font.Bold        = true;
     this.gridGroupingControl1.TableDescriptor.Appearance.GroupCaptionCell.CellType         = "ColumnHeader";
     this.gridGroupingControl1.TableDescriptor.TableOptions.ColumnHeaderRowHeight           = 25;
     this.gridGroupingControl1.TableDescriptor.TableOptions.RecordRowHeight                 = 20;
     this.gridGroupingControl1.TableOptions.GridLineBorder = new Syncfusion.Windows.Forms.Grid.GridBorder(Syncfusion.Windows.Forms.Grid.GridBorderStyle.Solid, System.Drawing.Color.Silver, Syncfusion.Windows.Forms.Grid.GridBorderWeight.ExtraThin);
     this.gridGroupingControl1.Text = "gridGroupingControl1";
     this.gridGroupingControl1.TopLevelGroupOptions.ShowAddNewRecordBeforeDetails = false;
     this.gridGroupingControl1.TopLevelGroupOptions.ShowCaption = false;
     this.gridGroupingControl1.VersionInfo = "4.401.0.50";
     //
     // dataSet11
     //
     this.dataSet11.DataSetName             = "DataSet1";
     this.dataSet11.Locale                  = new System.Globalization.CultureInfo("en-US");
     this.dataSet11.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
     //
     // oleDbDataAdapter1
     //
     this.oleDbDataAdapter1.DeleteCommand = this.oleDbDeleteCommand1;
     this.oleDbDataAdapter1.InsertCommand = this.oleDbInsertCommand1;
     this.oleDbDataAdapter1.SelectCommand = this.oleDbSelectCommand1;
     this.oleDbDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
         new System.Data.Common.DataTableMapping("Table", "Statistics", new System.Data.Common.DataColumnMapping[] {
             new System.Data.Common.DataColumnMapping("ID", "ID"),
             new System.Data.Common.DataColumnMapping("losses", "losses"),
             new System.Data.Common.DataColumnMapping("School", "School"),
             new System.Data.Common.DataColumnMapping("Sport", "Sport"),
             new System.Data.Common.DataColumnMapping("ties", "ties"),
             new System.Data.Common.DataColumnMapping("wins", "wins"),
             new System.Data.Common.DataColumnMapping("year", "year")
         })
     });
     this.oleDbDataAdapter1.UpdateCommand = this.oleDbUpdateCommand1;
     //
     // oleDbDeleteCommand1
     //
     this.oleDbDeleteCommand1.CommandText = resources.GetString("oleDbDeleteCommand1.CommandText");
     this.oleDbDeleteCommand1.Connection  = this.oleDbConnection1;
     this.oleDbDeleteCommand1.Parameters.AddRange(new System.Data.OleDb.OleDbParameter[] {
         new System.Data.OleDb.OleDbParameter("Original_ID", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "ID", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_School", System.Data.OleDb.OleDbType.VarWChar, 255, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "School", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_School1", System.Data.OleDb.OleDbType.VarWChar, 255, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "School", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_Sport", System.Data.OleDb.OleDbType.VarWChar, 255, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "Sport", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_Sport1", System.Data.OleDb.OleDbType.VarWChar, 255, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "Sport", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_losses", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "losses", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_losses1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "losses", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_ties", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "ties", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_ties1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "ties", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_wins", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "wins", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_wins1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "wins", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_year", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "year", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_year1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "year", System.Data.DataRowVersion.Original, null)
     });
     //
     // oleDbConnection1
     //
     this.oleDbConnection1.ConnectionString = resources.GetString("oleDbConnection1.ConnectionString");
     //
     // oleDbInsertCommand1
     //
     this.oleDbInsertCommand1.CommandText = "INSERT INTO Statistics(losses, School, Sport, ties, wins, year) VALUES (?, ?, ?, " +
                                            "?, ?, ?)";
     this.oleDbInsertCommand1.Connection = this.oleDbConnection1;
     this.oleDbInsertCommand1.Parameters.AddRange(new System.Data.OleDb.OleDbParameter[] {
         new System.Data.OleDb.OleDbParameter("losses", System.Data.OleDb.OleDbType.Integer, 0, "losses"),
         new System.Data.OleDb.OleDbParameter("School", System.Data.OleDb.OleDbType.VarWChar, 255, "School"),
         new System.Data.OleDb.OleDbParameter("Sport", System.Data.OleDb.OleDbType.VarWChar, 255, "Sport"),
         new System.Data.OleDb.OleDbParameter("ties", System.Data.OleDb.OleDbType.Integer, 0, "ties"),
         new System.Data.OleDb.OleDbParameter("wins", System.Data.OleDb.OleDbType.Integer, 0, "wins"),
         new System.Data.OleDb.OleDbParameter("year", System.Data.OleDb.OleDbType.Integer, 0, "year")
     });
     //
     // oleDbSelectCommand1
     //
     this.oleDbSelectCommand1.CommandText = "SELECT ID, losses, School, Sport, ties, wins, year FROM Statistics";
     this.oleDbSelectCommand1.Connection  = this.oleDbConnection1;
     //
     // oleDbUpdateCommand1
     //
     this.oleDbUpdateCommand1.CommandText = resources.GetString("oleDbUpdateCommand1.CommandText");
     this.oleDbUpdateCommand1.Connection  = this.oleDbConnection1;
     this.oleDbUpdateCommand1.Parameters.AddRange(new System.Data.OleDb.OleDbParameter[] {
         new System.Data.OleDb.OleDbParameter("losses", System.Data.OleDb.OleDbType.Integer, 0, "losses"),
         new System.Data.OleDb.OleDbParameter("School", System.Data.OleDb.OleDbType.VarWChar, 255, "School"),
         new System.Data.OleDb.OleDbParameter("Sport", System.Data.OleDb.OleDbType.VarWChar, 255, "Sport"),
         new System.Data.OleDb.OleDbParameter("ties", System.Data.OleDb.OleDbType.Integer, 0, "ties"),
         new System.Data.OleDb.OleDbParameter("wins", System.Data.OleDb.OleDbType.Integer, 0, "wins"),
         new System.Data.OleDb.OleDbParameter("year", System.Data.OleDb.OleDbType.Integer, 0, "year"),
         new System.Data.OleDb.OleDbParameter("Original_ID", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "ID", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_School", System.Data.OleDb.OleDbType.VarWChar, 255, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "School", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_School1", System.Data.OleDb.OleDbType.VarWChar, 255, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "School", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_Sport", System.Data.OleDb.OleDbType.VarWChar, 255, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "Sport", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_Sport1", System.Data.OleDb.OleDbType.VarWChar, 255, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "Sport", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_losses", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "losses", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_losses1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "losses", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_ties", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "ties", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_ties1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "ties", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_wins", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "wins", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_wins1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "wins", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_year", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "year", System.Data.DataRowVersion.Original, null),
         new System.Data.OleDb.OleDbParameter("Original_year1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "year", System.Data.DataRowVersion.Original, null)
     });
     //
     // groupBox1
     //
     this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                   | System.Windows.Forms.AnchorStyles.Right)));
     this.groupBox1.BackColor = System.Drawing.Color.Transparent;
     this.groupBox1.Controls.Add(this.radioButton6);
     this.groupBox1.Controls.Add(this.radioButton5);
     this.groupBox1.Controls.Add(this.radioButton4);
     this.groupBox1.Controls.Add(this.radioButton3);
     this.groupBox1.Controls.Add(this.radioButton2);
     this.groupBox1.Controls.Add(this.radioButton1);
     this.groupBox1.Font      = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.groupBox1.ForeColor = System.Drawing.Color.DimGray;
     this.groupBox1.Location  = new System.Drawing.Point(0, 8);
     this.groupBox1.Name      = "groupBox1";
     this.groupBox1.Size      = new System.Drawing.Size(311, 131);
     this.groupBox1.TabIndex  = 1;
     this.groupBox1.TabStop   = false;
     this.groupBox1.Text      = "Selection Mode";
     //
     // radioButton6
     //
     this.radioButton6.BeforeTouchSize    = new System.Drawing.Size(150, 21);
     this.radioButton6.Font               = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.radioButton6.ForeColor          = System.Drawing.Color.DimGray;
     this.radioButton6.Location           = new System.Drawing.Point(188, 98);
     this.radioButton6.MetroColor         = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226)))));
     this.radioButton6.Name               = "radioButton6";
     this.radioButton6.Size               = new System.Drawing.Size(106, 24);
     this.radioButton6.Style              = Syncfusion.Windows.Forms.Tools.RadioButtonAdvStyle.Metro;
     this.radioButton6.DrawFocusRectangle = true;
     this.radioButton6.TabIndex           = 5;
     this.radioButton6.Text               = "None";
     this.radioButton6.ThemesEnabled      = false;
     //
     // radioButton5
     //
     this.radioButton5.BeforeTouchSize    = new System.Drawing.Size(150, 21);
     this.radioButton5.Font               = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.radioButton5.ForeColor          = System.Drawing.Color.DimGray;
     this.radioButton5.Location           = new System.Drawing.Point(34, 98);
     this.radioButton5.MetroColor         = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226)))));
     this.radioButton5.Name               = "radioButton5";
     this.radioButton5.Size               = new System.Drawing.Size(128, 24);
     this.radioButton5.Style              = Syncfusion.Windows.Forms.Tools.RadioButtonAdvStyle.Metro;
     this.radioButton5.DrawFocusRectangle = true;
     this.radioButton5.TabIndex           = 4;
     this.radioButton5.Text               = "Row and Column";
     this.radioButton5.ThemesEnabled      = false;
     //
     // radioButton4
     //
     this.radioButton4.BeforeTouchSize    = new System.Drawing.Size(150, 21);
     this.radioButton4.Font               = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.radioButton4.ForeColor          = System.Drawing.Color.DimGray;
     this.radioButton4.Location           = new System.Drawing.Point(188, 64);
     this.radioButton4.MetroColor         = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226)))));
     this.radioButton4.Name               = "radioButton4";
     this.radioButton4.Size               = new System.Drawing.Size(106, 24);
     this.radioButton4.Style              = Syncfusion.Windows.Forms.Tools.RadioButtonAdvStyle.Metro;
     this.radioButton4.DrawFocusRectangle = true;
     this.radioButton4.TabIndex           = 3;
     this.radioButton4.Text               = "Column Only";
     this.radioButton4.ThemesEnabled      = false;
     //
     // radioButton3
     //
     this.radioButton3.BeforeTouchSize    = new System.Drawing.Size(150, 21);
     this.radioButton3.Font               = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.radioButton3.ForeColor          = System.Drawing.Color.DimGray;
     this.radioButton3.Location           = new System.Drawing.Point(188, 32);
     this.radioButton3.MetroColor         = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226)))));
     this.radioButton3.Name               = "radioButton3";
     this.radioButton3.Size               = new System.Drawing.Size(106, 24);
     this.radioButton3.Style              = Syncfusion.Windows.Forms.Tools.RadioButtonAdvStyle.Metro;
     this.radioButton3.DrawFocusRectangle = true;
     this.radioButton3.TabIndex           = 2;
     this.radioButton3.Text               = "Row Only";
     this.radioButton3.ThemesEnabled      = false;
     //
     // radioButton2
     //
     this.radioButton2.BeforeTouchSize    = new System.Drawing.Size(150, 21);
     this.radioButton2.Font               = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.radioButton2.ForeColor          = System.Drawing.Color.DimGray;
     this.radioButton2.Location           = new System.Drawing.Point(34, 64);
     this.radioButton2.MetroColor         = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226)))));
     this.radioButton2.Name               = "radioButton2";
     this.radioButton2.Size               = new System.Drawing.Size(104, 24);
     this.radioButton2.Style              = Syncfusion.Windows.Forms.Tools.RadioButtonAdvStyle.Metro;
     this.radioButton2.DrawFocusRectangle = true;
     this.radioButton2.TabIndex           = 1;
     this.radioButton2.Text               = "Cell Only";
     this.radioButton2.ThemesEnabled      = false;
     //
     // radioButton1
     //
     this.radioButton1.BeforeTouchSize    = new System.Drawing.Size(150, 21);
     this.radioButton1.Font               = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.radioButton1.ForeColor          = System.Drawing.Color.DimGray;
     this.radioButton1.Location           = new System.Drawing.Point(34, 32);
     this.radioButton1.MetroColor         = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226)))));
     this.radioButton1.Name               = "radioButton1";
     this.radioButton1.Size               = new System.Drawing.Size(104, 24);
     this.radioButton1.Style              = Syncfusion.Windows.Forms.Tools.RadioButtonAdvStyle.Metro;
     this.radioButton1.DrawFocusRectangle = true;
     this.radioButton1.TabIndex           = 0;
     this.radioButton1.Text               = "Default";
     this.radioButton1.ThemesEnabled      = false;
     //
     // gradientPanel2
     //
     this.gradientPanel2.Anchor      = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     this.gradientPanel2.BorderStyle = System.Windows.Forms.BorderStyle.None;
     this.gradientPanel2.Controls.Add(this.groupBox1);
     this.gradientPanel2.Location = new System.Drawing.Point(677, 12);
     this.gradientPanel2.Name     = "gradientPanel2";
     this.gradientPanel2.Size     = new System.Drawing.Size(323, 159);
     this.gradientPanel2.TabIndex = 2;
     //
     // propertyGrid1
     //
     this.propertyGrid1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                       | System.Windows.Forms.AnchorStyles.Right)));
     this.propertyGrid1.BackColor                 = System.Drawing.Color.White;
     this.propertyGrid1.CommandsBackColor         = System.Drawing.Color.White;
     this.propertyGrid1.CommandsDisabledLinkColor = System.Drawing.Color.White;
     this.propertyGrid1.HelpBackColor             = System.Drawing.Color.White;
     this.propertyGrid1.LineColor                 = System.Drawing.Color.White;
     this.propertyGrid1.Location = new System.Drawing.Point(677, 192);
     this.propertyGrid1.Name     = "propertyGrid1";
     this.propertyGrid1.Size     = new System.Drawing.Size(323, 449);
     this.propertyGrid1.TabIndex = 15;
     //
     // Form1
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.ClientSize          = new System.Drawing.Size(1012, 653);
     this.Controls.Add(this.propertyGrid1);
     this.Controls.Add(this.gradientPanel2);
     this.Controls.Add(this.gradientPanel1);
     this.MinimumSize = new System.Drawing.Size(850, 500);
     this.Name        = "Form1";
     this.Text        = "Cell Range Selection";
     this.Load       += new System.EventHandler(this.Form1_Load);
     ((System.ComponentModel.ISupportInitialize)(this.gradientPanel1)).EndInit();
     this.gradientPanel1.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.gridGroupingControl1)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.dataSet11)).EndInit();
     this.groupBox1.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.radioButton6)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.radioButton5)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.radioButton4)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.radioButton3)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.radioButton2)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.radioButton1)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.gradientPanel2)).EndInit();
     this.gradientPanel2.ResumeLayout(false);
     this.ResumeLayout(false);
 }
Пример #59
0
        public void ExecImportDataToOracle(string tabname, string connectionAccess)
        {
            using (System.Data.OleDb.OleDbConnection connection = new System.Data.OleDb.OleDbConnection(connectionAccess)) {
                #region 定义Access数据连接对象
                string select = string.Format("SELECT AXISNUM,OVERLOADRATE,TOTALWEIGHT,TOTALTOLL,DISTANCE,VEHICLELICENSE,ENTRYSTATION,ENTRYSTATIONNAME,ENTRYTIME,EXITSTATION,EXITSTATIONNAME,EXITTIME,PAYTYPE FROM {0}", tabname);
                connection.Open();
                System.Data.OleDb.OleDbCommand    command  = new System.Data.OleDb.OleDbCommand(select, connection);
                System.Data.OleDb.OleDbDataReader dataRead = command.ExecuteReader();

                //获取记录总数
                int       size    = 0;
                int       count   = 0;
                DataTable dtCount = new DataTable();
                System.Data.OleDb.OleDbDataAdapter oleDa = new System.Data.OleDb.OleDbDataAdapter(
                    string.Format("select count(1) from {0}", tabname),
                    connectionAccess);
                oleDa.Fill(dtCount);
                count = Convert.ToInt32(dtCount.Rows[0][0].ToString());

                #endregion

                #region Oracle
                #region Insert语句
                StringBuilder strSql = new StringBuilder();
                strSql.Append("insert into BASE_BUS_OVERRUN(");
                strSql.Append("AXISNUM,OVERLOADRATE,TOTALWEIGHT,TOTALTOLL,DISTANCE,VEHICLELICENSE,ENTRYSTATION,ENTRYSTATIONNAME,ENTRYTIME,EXITSTATION,EXITSTATIONNAME,EXITTIME,PAYTYPE");
                strSql.Append(") values (");
                strSql.Append(":AXISNUM,:OVERLOADRATE,:TOTALWEIGHT,:TOTALTOLL,:DISTANCE,:VEHICLELICENSE,:ENTRYSTATION,:ENTRYSTATIONNAME,:ENTRYTIME,:EXITSTATION,:EXITSTATIONNAME,:EXITTIME,:PAYTYPE");
                strSql.Append(") ");
                #endregion

                #region Oracle参数对象
                OracleParameter[] parameters =
                {
                    new OracleParameter(":AXISNUM",          OracleType.Number,      4),
                    new OracleParameter(":OVERLOADRATE",     OracleType.Number,      4),
                    new OracleParameter(":TOTALWEIGHT",      OracleType.Number,      4),
                    new OracleParameter(":TOTALTOLL",        OracleType.Number,      4),
                    new OracleParameter(":DISTANCE",         OracleType.Number,      4),
                    new OracleParameter(":VEHICLELICENSE",   OracleType.VarChar,   200),
                    new OracleParameter(":ENTRYSTATION",     OracleType.Number,      4),
                    new OracleParameter(":ENTRYSTATIONNAME", OracleType.VarChar,   200),
                    new OracleParameter(":ENTRYTIME",        OracleType.DateTime),
                    new OracleParameter(":EXITSTATION",      OracleType.Number,      4),
                    new OracleParameter(":EXITSTATIONNAME",  OracleType.VarChar,   200),
                    new OracleParameter(":EXITTIME",         OracleType.DateTime),
                    new OracleParameter(":PAYTYPE",          OracleType.VarChar, 200)
                };
                #endregion

                OracleConnection OraConnection = new OracleConnection(OracleHelper.ConnectionString);
                OraConnection.Open();
                OracleCommand Oracommand = OraConnection.CreateCommand();
                Oracommand.CommandType = CommandType.Text;
                Oracommand.CommandText = strSql.ToString();

                #endregion

                #region Begin
                try {
                    while (dataRead.Read())
                    {
                        parameters[0].Value  = dataRead["AXISNUM"];
                        parameters[1].Value  = dataRead["OVERLOADRATE"];
                        parameters[2].Value  = dataRead["TOTALWEIGHT"];
                        parameters[3].Value  = dataRead["TOTALTOLL"];
                        parameters[4].Value  = dataRead["DISTANCE"];
                        parameters[5].Value  = dataRead["VEHICLELICENSE"];
                        parameters[6].Value  = dataRead["ENTRYSTATION"];
                        parameters[7].Value  = dataRead["ENTRYSTATIONNAME"];
                        parameters[8].Value  = dataRead["ENTRYTIME"];
                        parameters[9].Value  = dataRead["EXITSTATION"];
                        parameters[10].Value = dataRead["EXITSTATIONNAME"];
                        parameters[11].Value = dataRead["EXITTIME"];
                        parameters[12].Value = dataRead["PAYTYPE"];
                        foreach (OracleParameter pm in parameters)
                        {
                            Oracommand.Parameters.Add(pm);
                        }

                        Oracommand.ExecuteNonQuery();
                        Oracommand.Parameters.Clear();
                        size++;
                        if (On_CompleteSingle != null)
                        {
                            On_CompleteSingle(size, count);
                        }
                    }
                } catch (Exception ex) {
                    throw ex;
                } finally {
                    connection.Close();
                    connection.Dispose();
                }
                #endregion
            }
        }
        private void button1_Click(object sender, EventArgs e)
        {
            //Mostrar na listBox2 os alunos do curso selecionado no listBox1:
            try
            {
                listBox2.Items.Clear(); //limpamos a segunda lista
                string cursoSelec = (string)((DataRowView)listBox1.SelectedItem)[0];

                string sql = "SELECT * FROM Alunos WHERE abrevcurso = '" + cursoSelec + "'";

                //suponhamos o BD em C:\tempo
                System.Data.OleDb.OleDbConnection conexao =
                    new System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:/temp/Universidade3.mdb");
                conexao.Open();

                System.Data.OleDb.OleDbCommand comando =
                    new System.Data.OleDb.OleDbCommand(sql, conexao);

                System.Data.OleDb.OleDbDataReader dr = comando.ExecuteReader();

                while (dr.Read())
                {
                    string dadosAluno = dr.GetString(0)
                        + ", " + dr.GetString(1) + ", " + dr.GetString(2)
                        + ", " + dr.GetInt32(3) + ", " + dr.GetString(4);
                    listBox2.Items.Add(dadosAluno);
                }

                dr.Close();
                comando.Dispose();
                conexao.Close();
            }
            catch (Exception exc) { MessageBox.Show(exc.Message); }
        }