コード例 #1
0
ファイル: Form_Partner.cs プロジェクト: solunar66/ThePool
        public Form_Partner()
        {
            InitializeComponent();

            dsCycle.Tables.Add();
            dsCycle.Tables[0].Columns.Add("name", typeof(string));
            dsCycle.Tables[0].Columns.Add("value", typeof(int));
            dsCycle.Tables[0].Rows.Add("未定义", 0);
            dsCycle.Tables[0].Rows.Add("每月", 1);
            dsCycle.Tables[0].Rows.Add("每季度", 2);
            dsCycle.Tables[0].Rows.Add("每半年", 3);
            dsCycle.Tables[0].Rows.Add("每年", 4);

            CalendarColumn start = new CalendarColumn();
            start.HeaderText="起始时间";
            start.Width = 85;
            CalendarColumn end = new CalendarColumn();
            end.HeaderText = "起始时间";
            end.Width = 85;
            dataGridView_volume.Columns.Insert(3, start);
            dataGridView_volume.Columns.Insert(4, end);

            groupbox_info.Text = "股东信息";
            groupbox_info.ForeColor = Color.FromKnownColor(KnownColor.ControlText);
        }
コード例 #2
0
        private void Frm_comRequerimiento_Load(object sender, EventArgs e)
        {
            try
            {
                MenuSistema.Cls_Menus menu = new MenuSistema.Cls_Menus();
                menu.ObtenerPermisos(Id_Perfil, Convert.ToInt32(Tag.ToString()), ref lectura, ref escritura, ref elimina);
                this.OperacionesDelUsuario();

                Clases.Empresa.CargarEmpresas(comboBoxEmpresa);
                this.comboBoxEmpresa.SelectedValue = Clases.Usuario.EmpresaLogeada.EmpresaIngresada.ToString();

                // cargo en una coleccion los productos por unica vez
                BLL.Procedures.H_ARTICULOSDEPOSITO _art = new BLL.Procedures.H_ARTICULOSDEPOSITO();
                _articulosItem = _art.ItemList();    //le paso la colección de artículos

                CargarRubros();
                CargarSubRubros();
                CargarLugaresEntrega(Clases.Usuario.EmpresaLogeada.EmpresaIngresada);
                TraerMarcasArticulos();

                //calendar
                CalendarColumn col = new CalendarColumn();

                this.dataGridViewReq.Columns.Add(col);
                this.dataGridViewReq.Columns[(int)Col_Detalle.FENTREGA].HeaderText = "Fecha Necesidad";
                this.dataGridViewReq.Columns[(int)Col_Detalle.FENTREGA].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;

                //calendar
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
コード例 #3
0
        private void Frm_ModificacionRequerimiento_Load(object sender, EventArgs e)
        {
            //PERMISOS
            MenuSistema.Cls_Menus menu = new MenuSistema.Cls_Menus();
            menu.ObtenerPermisos(Id_Perfil, Convert.ToInt32(Tag.ToString()), ref lectura, ref escritura, ref elimina);
            this.OperacionesDelUsuario();
            this.Text = "Modificación de Requerimientos de la empresa: ";
            //FIN PERMISOS


            //calendar
            CalendarColumn col = new CalendarColumn();

            this.dataGridViewReqItems.Columns.Add(col);
            this.dataGridViewReqItems.Columns[(int)Col_ReqItem.FENTREGA].HeaderText = "Fecha Entrega";
            this.dataGridViewReqItems.Columns[(int)Col_ReqItem.FENTREGA].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
            this.dataGridViewReqItems.AutoGenerateColumns = false;


            // cargo en una coleccion los productos por unica vez
            BLL.Procedures.H_ARTICULOSDEPOSITO _art = new BLL.Procedures.H_ARTICULOSDEPOSITO();
            _articulosItem = _art.ItemList();//le paso la colección de artículos

            this.CargarLugaresEntrega(Clases.Usuario.EmpresaLogeada.EmpresaIngresada.ToString());

            TraeItemsPendientes();
        }
コード例 #4
0
        private void Frm_Vtos_Load(object sender, EventArgs e)
        {
            //calendar
            CalendarColumn col = new CalendarColumn();

            this.dataGridViewVtos.Columns.Add(col);
            this.dataGridViewVtos.Columns[(int)Col_Vtos.VTO].Name       = "FechaVto";
            this.dataGridViewVtos.Columns[(int)Col_Vtos.VTO].HeaderText = "Fecha Vencimiento";
            //this.dataGridViewVtos.Columns[(int)Col_Vtos.VTO].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
            this.dataGridViewVtos.Columns[(int)Col_Vtos.VTO].Width = 130;
            this.dataGridViewVtos.Columns[(int)Col_Vtos.VTO].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;

            //calendar


            //CARGO LA LISTA AL GRID Y BORRO SUS DATOS...
            this.dataGridViewVtos.Rows.Clear();
            int indice;

            foreach (Entities.Tables.STKVENCIMIENTO item in _listVto)
            {
                indice = dataGridViewVtos.Rows.Add();
                dataGridViewVtos.Rows[indice].Cells[(int)Col_Vtos.CANTIDAD].Value = item.CANTIDAD; //CANTIDAD
                dataGridViewVtos.Rows[indice].Cells[(int)Col_Vtos.VTO].Value      = item.VTO;      //VTO
            }

            this.labelCodigoArticulo.Text = _codigoArticuloVto;
            labelDescripArticulo.Text     = _descripArticuloVto;


            _listVto.Clear(); //ES PORQUE EN ESTA LISTA VUELVO A CARGAR LOS DATOS ACTUALIZADOS PARA ENVIARLOS AL FORM PRINCIPAL
        }
コード例 #5
0
ファイル: Form1.cs プロジェクト: GPiter/C-Sharp-Courses
        // ------ Изучение BindingSource -----
        // Метод привязки данных с использованием BindingSource
        private void BindingMemory()
        {
            // Инициализация BindingSource
            MemorFile memoryFiles = new MemorFile();

            memoryFiles.Memories.Add(new Memory());
            bindSrc.DataSource = memoryFiles;
            bindSrc.DataMember = "Memories";

            // Связываем через BindingSource dtpMemory с объектом memoryFiles
            dtpMemory.DataBindings.Add("Value", bindSrc, "Date");
            dtpMemory.DataBindings[0].DataSourceUpdateMode = DataSourceUpdateMode.OnPropertyChanged;

            tbMemory.DataBindings.Add("Text", bindSrc, "Text");
            tbMemory.DataBindings[0].DataSourceUpdateMode = DataSourceUpdateMode.OnPropertyChanged;

            // Связывание BindingNavigator и BindingSource
            bindNavigator.BindingSource = bindSrc;

            // Добавление DataGridView
            grid.AutoGenerateColumns = false;
            grid.DataSource          = bindSrc;
            DataGridViewTextBoxColumn tbColumn = new DataGridViewTextBoxColumn();

            grid.Columns.Add(tbColumn);
            grid.Columns[0].DataPropertyName = "Text";
            grid.Columns[0].Name             = "Text";
            CalendarColumn calColumn = new CalendarColumn();

            grid.Columns.Add(calColumn);
            grid.Columns[1].DataPropertyName = "Date";
            grid.Columns[1].Name             = "Date";
        }
コード例 #6
0
ファイル: Helper.cs プロジェクト: yogirajshakya/SMS
        private static void AddDateColumn(DataGridView grd, ArrayList columns)
        {
            if (columns == null)
            {
                return;
            }

            foreach (DataGridViewColumn gc in columns)
            {
                if (grd.Columns.Contains(gc.DataPropertyName) &&
                    gc.CellType == typeof(CalendarColumn))
                {
                    continue;
                }

                CalendarColumn col = new CalendarColumn();
                col.Name             = gc.DataPropertyName;
                col.DataPropertyName = gc.DataPropertyName;
                col.HeaderText       = gc.HeaderText;
                col.DisplayIndex     = gc.DisplayIndex;
                grd.Columns.Add(col);

                gc.Visible = false;
                grd.Columns.Remove(gc);
            }
        }
コード例 #7
0
    public DataGridViewWithBinding()
    {
        Text   = "DataGridView with Binding";
        Width *= 2;

        // Initialize the BindingSource.
        FileNewOnClick(null, EventArgs.Empty);

        // Create DataGridView control.
        DataGridView grid = new DataGridView();

        grid.Parent   = this;
        grid.AutoSize = true;
        grid.Dock     = DockStyle.Fill;

        // Bind the control to the data source.
        grid.AutoGenerateColumns = false;
        grid.DataSource          = bindsrc;

        // Create desired columns for DataGridView.
        DataGridViewComboBoxColumn colCombo = new DataGridViewComboBoxColumn();

        colCombo.DataPropertyName = "Courtesy";
        colCombo.DataSource       = Enum.GetValues(typeof(CourtesyTitle));
        colCombo.HeaderText       = "Courtesy";
        grid.Columns.Add(colCombo);

        DataGridViewTextBoxColumn colText = new DataGridViewTextBoxColumn();

        colText.DataPropertyName = "FirstName";
        colText.HeaderText       = "First Name";
        grid.Columns.Add(colText);

        colText = new DataGridViewTextBoxColumn();
        colText.DataPropertyName = "LastName";
        colText.HeaderText       = "Last Name";
        grid.Columns.Add(colText);

        CalendarColumn colBirth = new CalendarColumn();

        colBirth.DataPropertyName = "BirthDate";
        colBirth.HeaderText       = "Birth Date";
        grid.Columns.Add(colBirth);

        DataGridViewCheckBoxColumn colCheck = new DataGridViewCheckBoxColumn();

        colCheck.DataPropertyName = "Enrolled";
        colCheck.HeaderText       = "Enrolled?";
        grid.Columns.Add(colCheck);

        // Create the menu.
        MenuStrip menu = new MenuStrip();

        menu.Parent = this;
        ToolStripMenuItem item = (ToolStripMenuItem)menu.Items.Add("&File");

        item.DropDownItems.Add("&New", null, FileNewOnClick);
        item.DropDownItems.Add("&Open...", null, FileOpenOnClick);
        item.DropDownItems.Add("Save &As...", null, FileSaveAsOnClick);
    }
コード例 #8
0
        // Este contrutor é utilizado quando queremos carregar o form com uma reuniao ja existente
        public MeetingView(int idUser, Meeting meeting, List <UserTask> tasks, List <MeetingInvite> guestList)
        {
            InitializeComponent();

            // Reuniao existente
            this.newMeeting = false;
            this.meeting    = meeting;
            this.idUser     = idUser;
            this.buttonExportPdf.Visible          = true;
            this.buttonDelete.Visible             = true;
            this.buttonAttendeeList.Visible       = true;
            this.buttonSendMinutes.Visible        = true;
            this.buttonUploadAttendeeList.Visible = true;

            // Instancia a classe controller
            this.controller = new MeetingController();

            // Carrega lista de utilizadores
            loadUsersList();

            // Activa o botao de iniciar a reuniao
            this.groupBoxRecord.Visible = true;

            // Definir o campo de data/hora com o formato dia/mes/ano hora:minuto
            this.dateTimePickerStart.Format       = DateTimePickerFormat.Custom;
            this.dateTimePickerStart.CustomFormat = "dd/MM/yyyy HH:mm";

            // Load duration options
            loadDuration();

            // Carregar categorias para a linkedlist e combobox
            loadTypesList();

            // Adiciona a coluna custom de data na grid
            CalendarColumn col   = new CalendarColumn();
            int            colno = this.dataGridViewTasks.Columns.Add(col);

            this.dataGridViewTasks.Columns[colno].HeaderText = "Deadline";


            // Carrega valores da meeting
            this.guestList = guestList;
            this.dateTimePickerStart.Value  = this.meeting.startTime;
            this.textBoxSubject.Text        = this.meeting.subject;
            this.textBoxAgenda.Text         = this.meeting.agendaDescription;
            this.textBoxMeetingminutes.Text = this.meeting.meetingMinutes;
            this.textBoxTranscription.Text  = this.meeting.audioTranscription;
            selectDuration(this.meeting.durationMinutes);
            selectType(this.meeting.idType);
            loadTasks(tasks); // Carrega lista de tarefas
            this.panelEditMeeting.Visible = true;

            // Carrega audio da reuniao
            loadMeetingAudio();

            // Mostra a coluna de presença na list ade convidados
            showGuests();
            loadUsersWithSelected(guestList); // Carrega users na base de dados e marca os selecioandos
        }
        private void DefinirColumnas()
        {
            //dataGridViewConsolidado.DataKeyNames = new string[] { "Id" };
            //*****COLUMNA F.ENTREGA1
            CalendarColumn col = new CalendarColumn();

            this.dataGridViewConsolidado.Columns.Add(col);
            this.dataGridViewConsolidado.Columns[(int)Col_GridDetalle.FENTREGA1].HeaderText = "F.Entrega1";
            this.dataGridViewConsolidado.Columns[(int)Col_GridDetalle.FENTREGA1].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
            this.dataGridViewConsolidado.Columns[(int)Col_GridDetalle.FENTREGA1].Width = 90;
            //COLUMNA CANTIDAD F.ENTREGA1
            DataGridViewColumn _col = new DataGridViewColumn();

            _col.HeaderText = "Cantidad";
            _col.Name       = "Cantidad";
            _col.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
            _col.Width = 80;
            DataGridViewCell cell = new DataGridViewTextBoxCell();

            _col.CellTemplate            = cell;
            _col.DefaultCellStyle.Format = "N2";
            this.dataGridViewConsolidado.Columns.Add(_col);

            //*****COLUMNA F.ENTREGA2
            //col = new CalendarColumn();

            //this.dataGridViewConsolidado.Columns.Add(col);
            //this.dataGridViewConsolidado.Columns[(int)Col_GridDetalle.FENTREGA2].HeaderText = "F.Entrega2";
            //this.dataGridViewConsolidado.Columns[(int)Col_GridDetalle.FENTREGA2].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
            //this.dataGridViewConsolidado.Columns[(int)Col_GridDetalle.FENTREGA2].Width = 90;
            ////COLUMNA CANTIDAD F.ENTREGA2
            //_col = new DataGridViewColumn();
            //_col.HeaderText = "Cantidad2";
            //_col.Name = "Cantidad2";
            //_col.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
            //_col.Width = 80;
            //cell = new DataGridViewTextBoxCell();
            //_col.CellTemplate = cell;
            //_col.DefaultCellStyle.Format = "N2";
            //this.dataGridViewConsolidado.Columns.Add(_col);

            //*****COLUMNA F.ENTREGA3
            //col = new CalendarColumn();

            //this.dataGridViewConsolidado.Columns.Add(col);
            //this.dataGridViewConsolidado.Columns[(int)Col_GridDetalle.FENTREGA3].HeaderText = "F.Entrega3";
            //this.dataGridViewConsolidado.Columns[(int)Col_GridDetalle.FENTREGA3].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
            //this.dataGridViewConsolidado.Columns[(int)Col_GridDetalle.FENTREGA3].Width = 90;
            ////COLUMNA CANTIDAD F.ENTREGA2
            //_col = new DataGridViewColumn();
            //_col.HeaderText = "Cantidad3";
            //_col.Name = "Cantidad3";
            //_col.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
            //_col.Width = 80;
            //cell = new DataGridViewTextBoxCell();
            //_col.CellTemplate = cell;
            //_col.DefaultCellStyle.Format = "N2";
            //this.dataGridViewConsolidado.Columns.Add(_col);
        }
コード例 #10
0
ファイル: MainForm.cs プロジェクト: MatthewFinnn/OldProjects
        void AddStyle(DataGridView grid, int tableID)
        {
            grid.AutoGenerateColumns = false;
            DataColumnCollection cols = ds.Tables[tableID].Columns;

            foreach (DataColumn dc in cols)
            {
                DataGridViewColumn col = null;
                if (dc.DataType == typeof(bool))
                {
                    col = new DataGridViewCheckBoxColumn();
                }
                else if (dc.DataType == typeof(DateTime))
                {
                    col = new CalendarColumn();
                    col.DefaultCellStyle.Format = "d";
                }
                else if (dc.DataType == typeof(decimal))
                {
                    col = new DataGridViewTextBoxColumn();
                    col.DefaultCellStyle.Format = "f2";
                }
                else if (dc.ColumnName == "Course")
                {
                    DataGridViewComboBoxColumn combo = new DataGridViewComboBoxColumn();
                    combo.DataSource = courses;
                    col = combo;
                }
                else if (dc.ColumnName == "Mark")
                {
                    dc.DefaultValue = (byte)2;
                    DataGridViewComboBoxColumn combo = new DataGridViewComboBoxColumn();
                    combo.Items.Add((byte)2);
                    combo.Items.Add((byte)3);
                    combo.Items.Add((byte)4);
                    combo.Items.Add((byte)5);
                    col = combo;
                }
                else
                {
                    col = new DataGridViewTextBoxColumn();
                }

                col.AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells;
                if (dc == cols[cols.Count - 1])
                {
                    col.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
                }
                col.DataPropertyName = dc.ColumnName;
                col.HeaderText       = dc.ColumnName;
                grid.Columns.Add(col);
            }
            grid.DefaultCellStyle.SelectionBackColor       = Color.LightSteelBlue;
            grid.DefaultCellStyle.SelectionForeColor       = Color.Black;
            grid.AlternatingRowsDefaultCellStyle.BackColor = tableID == 0 ? Color.Wheat : Color.FromArgb(200, 255, 200);
        }
コード例 #11
0
        private void Medicamento_Solicitado_Load(object sender, EventArgs e)
        {
            Trae_Medicamento_Solicitado_Sin_Autorizar();
            //calendar
            CalendarColumn col = new CalendarColumn();

            this.dataGridViewMedicamentos.Columns.Add(col);
            this.dataGridViewMedicamentos.Columns[(int)Col_Medicamentos_Solicitados.FECHA_HASTA].HeaderText = "Autorizar Hasta";
            this.dataGridViewMedicamentos.Columns[(int)Col_Medicamentos_Solicitados.FECHA_HASTA].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
        }
コード例 #12
0
    private void Form1_Load(object sender, EventArgs e)
    {
        CalendarColumn col = new CalendarColumn();

        this.dataGridView1.Columns.Add(col);
        this.dataGridView1.RowCount = 5;
        foreach (DataGridViewRow row in this.dataGridView1.Rows)
        {
            row.Cells[0].Value = DateTime.Now;
        }
    }
コード例 #13
0
        private void CalendarControlCell_Load(object sender, EventArgs e)
        {
            CalendarColumn col = new CalendarColumn();
            this.dataGridView1.Columns.Add(col);
            this.dataGridView1.RowCount = 5;
            foreach (DataGridViewRow row in this.dataGridView1.Rows)
            {
                row.Cells[0].Value = DateTime.Now;
            }

        }
コード例 #14
0
        public static void Initialize(DataGridView dgv)
        {
            dgv.Rows.Clear();
            dgv.Columns.Clear();
            var userNumberColumn = new DataGridViewTextBoxColumn
            {
                HeaderText   = "ID",
                ValueType    = typeof(Int32),
                AutoSizeMode = DataGridViewAutoSizeColumnMode.ColumnHeader,
                ReadOnly     = true,
                ToolTipText  = "Read only column"
            };
            var loginColumn = new DataGridViewTextBoxColumn
            {
                HeaderText = "Username"
            };
            var passwordColumn = new DataGridViewTextBoxColumn
            {
                HeaderText = "Password"
            };
            var specialCodeColumn = new DataGridViewComboBoxColumn
            {
                HeaderText    = "Special Code",
                DisplayMember = "special_code",
                ValueMember   = "id"
            };
            var genderColumn = new DataGridViewTextBoxColumn
            {
                HeaderText = "gender"
            };
            var signUpDateColumn = new CalendarColumn
            {
                HeaderText = "Sign up date"
            };
            var birthDateColumn = new CalendarColumn
            {
                HeaderText = "Birth date"
            };

            dgv.Columns.AddRange(userNumberColumn, loginColumn, passwordColumn, specialCodeColumn, genderColumn, signUpDateColumn, birthDateColumn);

            using (var ctx = new UsersContext())
            {
                specialCodeColumn.DataSource = ctx.specials.ToList(); // Get assosiate for last column

                var rows = ctx.awp_users.OrderBy(o => o.id).ToList(); // sort by ASC
                foreach (var rec in rows)
                {
                    var rowIndex = dgv.Rows.Add(rec.id, rec.login_, rec.password, rec.id_special, rec.gender, rec.signup_date, rec.birth_date);
                    dgv.Rows[rowIndex].Cells[2].Tag = rec.salt;
                }
            }
        }
コード例 #15
0
        public static void Initialize(DataGridView dgv)
        {
            dgv.Rows.Clear();
            dgv.Columns.Clear();
            var knightNumberColumn = new DataGridViewTextBoxColumn
            {
                HeaderText   = "ID",
                ValueType    = typeof(Int32),
                AutoSizeMode = DataGridViewAutoSizeColumnMode.ColumnHeader,
                ReadOnly     = true,
                ToolTipText  = "Read only column"
            };
            var knightNameColumn = new DataGridViewTextBoxColumn
            {
                HeaderText = "Knight name"
            };
            var birthDateColumn = new CalendarColumn
            {
                HeaderText = "Knight Birth Date"
            };
            var honorColumn = new DataGridViewTextBoxColumn
            {
                HeaderText = "Honor",
                ValueType  = typeof(Int32)
            };
            var squireNameColumn = new DataGridViewComboBoxColumn
            {
                HeaderText    = "Name of squire",
                DisplayMember = "name",
                ValueMember   = "id_squire"
            };

            dgv.Columns.AddRange(knightNumberColumn, knightNameColumn, birthDateColumn, honorColumn, squireNameColumn);

            using (var ctx = new TournamentsContext())
            {
                squireNameColumn.DataSource = ctx.squires.ToList();                  // Get assosiate for last column

                var knightRows = ctx.knights.OrderBy(kni => kni.id_knight).ToList(); // sort by ASC
                foreach (var knight in knightRows)
                {
                    // Question!
                    // Should I change snake_Case to pascalCase???
                    dgv.Rows.Add(knight.id_knight, knight.name, knight.birth_date, knight.honor, knight.id_squire);
                }
            }
        }
コード例 #16
0
        private void FrmPlanificationSoins_Load(object sender, EventArgs e)
        {
            colDateHeure = new CalendarColumn();

            // TODO: This line of code loads data into the 'bD5B6TP1_ConstantinBrassardLaheyDataSet.NoEtNomsAssistants' table. You can move, or remove it, as needed.
            this.noEtNomsAssistantsTableAdapter.Fill(this.bD5B6TP1_ConstantinBrassardLaheyDataSet.NoEtNomsAssistants);
            // TODO: This line of code loads data into the 'bD5B6TP1_ConstantinBrassardLaheyDataSet.NoEtNomsAssistants' table. You can move, or remove it, as needed.
            this.noEtNomsAssistantsTableAdapter.Fill(this.bD5B6TP1_ConstantinBrassardLaheyDataSet.NoEtNomsAssistants);
            // TODO: This line of code loads data into the 'bD5B6TP1_ConstantinBrassardLaheyDataSet.NoEtNomsClientsInvites' table. You can move, or remove it, as needed.
            this.noEtNomsClientsInvitesTableAdapter.Fill(this.bD5B6TP1_ConstantinBrassardLaheyDataSet.NoEtNomsClientsInvites);
            // TODO: This line of code loads data into the 'bD5B6TP1_ConstantinBrassardLaheyDataSet.NoEtDescriptionSoin' table. You can move, or remove it, as needed.
            this.noEtDescriptionSoinTableAdapter.Fill(this.bD5B6TP1_ConstantinBrassardLaheyDataSet.NoEtDescriptionSoin);
            // TODO: This line of code loads data into the 'bD5B6TP1_ConstantinBrassardLaheyDataSet.PlanifSoin' table. You can move, or remove it, as needed.
            this.planifSoinTableAdapter.Fill(this.bD5B6TP1_ConstantinBrassardLaheyDataSet.PlanifSoin);

            planifSoinTableAdapter.Adapter.RowUpdated += GestionConflits.GenererGestionConflit("DateHeure", "le rendezvous cédulé le");
        }
コード例 #17
0
        /// <summary>
        /// Populates data grid and combo boxes.
        /// </summary>
        private void SetupForm()
        {
            // reference survey list
            dgvRefSurveys.AutoGenerateColumns = false;

            DataGridViewColumn column1 = new DataGridViewTextBoxColumn();

            column1.DataPropertyName = "CheckID";
            column1.Name             = "CheckID";
            column1.Visible          = false;
            dgvRefSurveys.Columns.Add(column1);

            DataGridViewComboBoxColumn column2 = new DataGridViewComboBoxColumn();

            column2.DataPropertyName = "SID";
            column2.DataSource       = DBAction.GetAllSurveys();
            column2.DisplayMember    = "SurveyCode";
            column2.ValueMember      = "SID";
            column2.Name             = "Survey";

            dgvRefSurveys.Columns.Add(column2);

            CalendarColumn column3 = new CalendarColumn();

            column3.DataPropertyName = "SurveyDate";
            column3.Name             = "Date";

            dgvRefSurveys.Columns.Add(column3);

            // survey filter list
            dgvSurveys.DataSource = DBAction.GetSurveyCheckSurveys();

            // combo boxes
            cboCheckType.DisplayMember = "CheckName";
            cboCheckType.ValueMember   = "ID";
            cboCheckType.DataSource    = new BindingList <SurveyCheckType>(DBAction.GetSurveyCheckTypes());

            cboSurvey.DisplayMember = "SurveyCode";
            cboSurvey.ValueMember   = "SID";
            cboSurvey.DataSource    = new BindingList <Survey>(DBAction.GetAllSurveys());

            cboCheckInit.DisplayMember = "Name";
            cboCheckInit.ValueMember   = "ID";
            cboCheckInit.DataSource    = new BindingList <Person>(DBAction.GetPeople());
        }
コード例 #18
0
    private void Form1_Load(object sender, EventArgs e)
    {
        DataGridViewTextBoxColumn t = new DataGridViewTextBoxColumn();

        t.HeaderText = "test";
        DataGridViewComboBoxColumn c = new DataGridViewComboBoxColumn();

        c.HeaderText = "formula";
        ButtonColumn   col  = new ButtonColumn();
        CalendarColumn col2 = new CalendarColumn();

        this.dataGridView1.Columns.AddRange(t, col, c, col2);
        //this.dataGridView1.RowCount = 5;
        //foreach (DataGridViewRow row in this.dataGridView1.Rows)
        //{
        //    row.Cells[0].Value = DateTime.Now;
        //}
    }
コード例 #19
0
        private void Frm_AutorizacionOrdenCompra_Load(object sender, EventArgs e)
        {
            //PERMISOS
            MenuSistema.Cls_Menus menu = new MenuSistema.Cls_Menus();
            menu.ObtenerPermisos(Id_Perfil, Convert.ToInt32(Tag.ToString()), ref lectura, ref escritura, ref elimina);
            this.OperacionesDelUsuario();

            //calendar
            CalendarColumn col = new CalendarColumn();

            this.dataGridViewOCItem.Columns.Add(col);
            this.dataGridViewOCItem.Columns[(int)Col_OCItem.FECHA_DE_ENTREGA].HeaderText = "Fecha Entrega";
            this.dataGridViewOCItem.Columns[(int)Col_OCItem.FECHA_DE_ENTREGA].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;

            //FIN PERMISOS
            this.Text = "Autorización Orden de Compra Empresa: " + Clases.Usuario.EmpresaLogeada.EmpresaIngresada.ToString();
            TraeOCPendientes();
        }
コード例 #20
0
        private void FrmEntregaDepagos_Load(object sender, EventArgs e)
        {
            MenuSistema.Cls_Menus menu = new MenuSistema.Cls_Menus();
            menu.ObtenerPermisos(Id_Perfil, Convert.ToInt32(Tag.ToString()), ref lectura, ref escritura, ref elimina);
            this.OperacionesDelUsuario();


            //calendar
            CalendarColumn col = new CalendarColumn();

            this.dataGridViewRetiro.Columns.Add(col);
            this.dataGridViewRetiro.Columns[(int)Col_FacturaOP.FechaRetiro].HeaderText = "Fecha Entrega";

            //calendar

            //this.dataGridViewRetiro.AutoGenerateColumns = false;
            CargarFacturas();
        }
コード例 #21
0
        private void InitializeDgvStage()
        {
            dgvStage.Rows.Clear();
            dgvStage.Columns.Clear();
            dgvStage.Columns.Add(new DataGridViewTextBoxColumn
            {
                Name    = "idЭтапа",
                Visible = false
            });
            dgvStage.Columns.Add("Название_этапа", "Название этапа");
            dgvStage.Columns.Add("Место_провеления", "Место проведения");
            dgvStage.Columns.Add(new CalendarColumn
            {
                Name       = "Дата_начала",
                HeaderText = @"Дата начала"
            });
            var f = new CalendarColumn();

            dgvStage.Columns.Add(new CalendarColumn
            {
                Name       = "Дата_конца",
                HeaderText = @"Дата конца"
            });
            var cups = new DataGridViewComboBoxColumn
            {
                HeaderText = @"Кубок мира",
                Name       = "Кубок"
            };

            dgvStage.Columns.Add(cups);

            using (var ctx = new WorldCupsContext())
            {
                var listCups = ctx.Кубок_мира.ToDictionary(item => item.idКубка_мира, item => "(" + item.idКубка_мира + ") " + item.Название_кубка);
                cups.DataSource = listCups.Values.ToList();

                foreach (var race in ctx.Этап_кубка_мира)
                {
                    var rowIdx = dgvStage.Rows.Add(race.idЭтапа_кубка_мира, race.Название_этапа, race.Место_провеления,
                                                   race.Дата_начала, race.Дата_конца, listCups[race.idКубка_мира]);
                    dgvStage.Rows[rowIdx].Tag = race;
                }
            }
        }
コード例 #22
0
    public UnboundDataGridViewWithCalendar()
    {
        Text   = "Unbound DataGridView with Calendar";
        Width *= 2;

        DataGridView grid = new DataGridView();

        grid.Parent   = this;
        grid.AutoSize = true;
        grid.Dock     = DockStyle.Fill;

        DataGridViewComboBoxColumn colCombo = new DataGridViewComboBoxColumn();

        colCombo.Name       = "Courtesy";
        colCombo.HeaderText = "Courtesy";
        colCombo.DataSource = Enum.GetValues(typeof(CourtesyTitle));
        colCombo.ValueType  = typeof(CourtesyTitle);
        grid.Columns.Add(colCombo);

        DataGridViewTextBoxColumn colText = new DataGridViewTextBoxColumn();

        colText.Name       = "FirstName";
        colText.HeaderText = "First Name";
        grid.Columns.Add(colText);

        colText            = new DataGridViewTextBoxColumn();
        colText.Name       = "LastName";
        colText.HeaderText = "Last Name";
        grid.Columns.Add(colText);

        CalendarColumn colBirth = new CalendarColumn();

        colBirth.Name       = "BirthDate";
        colBirth.HeaderText = "Birth Date";
        grid.Columns.Add(colBirth);

        DataGridViewCheckBoxColumn colCheck = new DataGridViewCheckBoxColumn();

        colCheck.Name       = "Enrolled";
        colCheck.HeaderText = "Enrolled?";
        grid.Columns.Add(colCheck);
    }
コード例 #23
0
        //private void GeneraTXTBinonexo()
        //{
        //    try
        //    {
        //        //-------------- ESTRUCTURA UPLOAD P.TXT ---------------------------
        //        //1-CODIGO DE ITEM VARCHAR(20)
        //        //2-CANTIDAD TOTAL NUMERO(10)
        //        //3-NRO DE NECESIDAD VARCHAR(20)--- ES INTERNO DE STACATALINA
        //        //4-FECHA_01 FECHA(DD/MM//YYYY)
        //        //5-CANTIDAD_01 NUMERO(10)
        //        //6-FECHA_02 FECHA(DD/MM//YYYY) --CAMPO NO OBLIGATORIO
        //        //7-CANTIDAD_02 NUMERO(10) -- CAMPO NO OBLIGATORIO
        //        //HASTA 24 FECHAS POSIBLES DE ENTREGA
        //        string itemTXT = string.Empty;
        //        string codProdTXT = string.Empty;
        //        Int32 cantidadTXT = 0;
        //        string nroNecesidad="99";

        //        if (this.saveFileDialog1.ShowDialog() != DialogResult.Cancel)
        //        {
        //            string SPath = this.saveFileDialog1.FileName;

        //            for (int i = 0; i < this.dataGridViewDetalleReqDisponibles.Rows.Count; i++)
        //            {
        //                codProdTXT = dataGridViewDetalleReqDisponibles.Rows[i].Cells[(int)Col_RequerimientoItem.ARTICULO_ID].Value.ToString().Trim();
        //                cantidadTXT = Convert.ToInt32(dataGridViewDetalleReqDisponibles.Rows[i].Cells[(int)Col_RequerimientoItem.CANTIDAD].Value);
        //                itemTXT = codProdTXT + ";" + cantidadTXT + ";" + nroNecesidad;

        //                Clases.Functions.TextFileAppend(SPath + ".txt", itemTXT);
        //            }

        //        }

        //    }

        //    catch (Exception ex)
        //    {
        //        MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

        //    }

        //}
        #endregion

        #region Eventos
        private void Frm_OrdenCompraSegunReq_Load(object sender, EventArgs e)
        {
            //PERMISOS
            MenuSistema.Cls_Menus menu = new MenuSistema.Cls_Menus();
            menu.ObtenerPermisos(Id_Perfil, Convert.ToInt32(Tag.ToString()), ref lectura, ref escritura, ref elimina);
            this.OperacionesDelUsuario();
            //calendar
            CalendarColumn col = new CalendarColumn();

            this.dataGridViewDetalleReqDisponibles.Columns.Add(col);
            this.dataGridViewDetalleReqDisponibles.Columns[(int)Col_RequerimientoItem.FECHA_DE_ENTREGA].HeaderText = "Fecha Entrega";
            this.dataGridViewDetalleReqDisponibles.Columns[(int)Col_RequerimientoItem.FECHA_DE_ENTREGA].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;

            //TRAE LOS REQUERIMIENTOS
            this.Text = "Generación de Ordenes de Compra según Requerimiento Empresa: " + Clases.Usuario.EmpresaLogeada.EmpresaIngresada.ToString();
            TraeRequerimientosPendientes();
            CargarProveedor(Clases.Usuario.EmpresaLogeada.EmpresaIngresada);
            TraerMarcasArticulos();

            labelImporteOC.Text = ("0").ToString(culture);
        }
コード例 #24
0
        void CreateColumn()
        {
            DataGridViewTextBoxColumn t = new DataGridViewTextBoxColumn();

            t.HeaderText = "参照按纽";
            t.Name       = ColumnNames.buttonColumn.ToString();

            DataGridViewComboBoxColumn c = new DataGridViewComboBoxColumn();

            c.HeaderText = "formula";

            ButtonColumn col = new ButtonColumn();

            col.HeaderText = "button";
            col.Name       = ColumnNames.accountCode.ToString();
            col.Width      = 300;


            CalendarColumn col2 = new CalendarColumn();

            this.dgvButton.Columns.AddRange(t, col, c, col2);
        }
コード例 #25
0
        public void AddCalendar(string ColumnName, string HeaderText)
        {
            Columns.Remove(ColumnName);
            CalendarColumn column_addcalendar = new CalendarColumn();

            column_addcalendar.DataPropertyName = ColumnName;
            column_addcalendar.Name             = ColumnName;
            column_addcalendar.HeaderText       = HeaderText;
            Columns.Add(column_addcalendar);
            int j, i;

            string[] k;
            char     a;

            a = ',';
            k = m_DataColumns.Split(a);
            i = k.Length - 1;
            j = 0;
            while ((j < i) && (k[j].IndexOf(ColumnName) == -1))
            {
                j = j + 1;
            }
            Columns[i].DisplayIndex = j;
        }
コード例 #26
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();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MaterialRation));
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
     this.toolStrip1 = new System.Windows.Forms.ToolStrip();
     this.toolStripLabel1 = new System.Windows.Forms.ToolStripLabel();
     this.cmb_project = new System.Windows.Forms.ToolStripComboBox();
     this.toolStripLabel2 = new System.Windows.Forms.ToolStripLabel();
     this.imageList1 = new System.Windows.Forms.ImageList(this.components);
     this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
     this.导出MEO创建申请单ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     this.审核MEO创建申请单ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     this.calendarColumn1 = new DetailInfo.CalendarColumn();
     this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn8 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn9 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn10 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn11 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn12 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.calendarColumn2 = new DetailInfo.CalendarColumn();
     this.dataGridViewTextBoxColumn13 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn15 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn16 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn17 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn18 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn19 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn20 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn21 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn22 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn23 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn24 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn25 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn26 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn27 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn28 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn29 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn30 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn31 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn32 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn33 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn34 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn35 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn36 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn37 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn38 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn39 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn40 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn41 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn42 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn43 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn44 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn45 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn46 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn47 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn48 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn49 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn50 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn51 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn52 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dateColumn1 = new DetailInfo.CalendarColumn();
     this.remark = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.update_date = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.updator = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.create_date = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.creater = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.information = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.reason_code = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.require_date = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dmssqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.require_qty = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.supplycircle = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.updatedate = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.updater = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.createdate = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.creator = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.part_unit = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.contract = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.part_no = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.system_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.require_no = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.meolineno = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.require_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn14 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.State = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.project_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.btn_query = new System.Windows.Forms.Button();
     this.label17 = new System.Windows.Forms.Label();
     this.cmb_reason = new System.Windows.Forms.ComboBox();
     this.label16 = new System.Windows.Forms.Label();
     this.textBox1 = new System.Windows.Forms.TextBox();
     this.btn_queryERP = new System.Windows.Forms.Button();
     this.btn_export = new System.Windows.Forms.Button();
     this.label15 = new System.Windows.Forms.Label();
     this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
     this.label13 = new System.Windows.Forms.Label();
     this.dateTimePicker2 = new System.Windows.Forms.DateTimePicker();
     this.label11 = new System.Windows.Forms.Label();
     this.label10 = new System.Windows.Forms.Label();
     this.dateTimePicker3 = new System.Windows.Forms.DateTimePicker();
     this.dateTimePicker4 = new System.Windows.Forms.DateTimePicker();
     this.button3 = new System.Windows.Forms.Button();
     this.label8 = new System.Windows.Forms.Label();
     this.cmb_state = new System.Windows.Forms.ComboBox();
     this.button2 = new System.Windows.Forms.Button();
     this.label7 = new System.Windows.Forms.Label();
     this.txt_meono = new System.Windows.Forms.TextBox();
     this.label23 = new System.Windows.Forms.Label();
     this.label22 = new System.Windows.Forms.Label();
     this.label21 = new System.Windows.Forms.Label();
     this.textBox5 = new System.Windows.Forms.TextBox();
     this.label12 = new System.Windows.Forms.Label();
     this.textBox4 = new System.Windows.Forms.TextBox();
     this.textBox3 = new System.Windows.Forms.TextBox();
     this.textBox2 = new System.Windows.Forms.TextBox();
     this.cmb_site2 = new System.Windows.Forms.ComboBox();
     this.cmb_discipline2 = new System.Windows.Forms.ComboBox();
     this.label25 = new System.Windows.Forms.Label();
     this.label24 = new System.Windows.Forms.Label();
     this.label20 = new System.Windows.Forms.Label();
     this.label19 = new System.Windows.Forms.Label();
     this.cmb_partno = new System.Windows.Forms.ComboBox();
     this.cmb_partname = new System.Windows.Forms.ComboBox();
     this.label18 = new System.Windows.Forms.Label();
     this.tb_manual = new System.Windows.Forms.TextBox();
     this.label26 = new System.Windows.Forms.Label();
     this.txt_creator = new System.Windows.Forms.TextBox();
     this.tabPage1 = new System.Windows.Forms.TabPage();
     this.groupBox4 = new System.Windows.Forms.GroupBox();
     this.groupBox2 = new System.Windows.Forms.GroupBox();
     this.dgv1 = new System.Windows.Forms.DataGridView();
     this.行 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.Ration_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dt_qy = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dt_fx = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dt_zy = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dt_zl = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.零件号 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.零件描述 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.total_qty = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.meo_qty = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.left_qty = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.reserved_qty = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.需求数量 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.单位 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.MEO_ERP = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.txt_drawingno = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.blockid = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.需求日期 = new DetailInfo.CalendarColumn();
     this.备注 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.MEO_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.groupBox1 = new System.Windows.Forms.GroupBox();
     this.label9 = new System.Windows.Forms.Label();
     this.cmb_block = new System.Windows.Forms.ComboBox();
     this.label3 = new System.Windows.Forms.Label();
     this.tb_discipline = new System.Windows.Forms.TextBox();
     this.tb_type = new System.Windows.Forms.TextBox();
     this.cmb_discipline = new System.Windows.Forms.ComboBox();
     this.label6 = new System.Windows.Forms.Label();
     this.btn_select = new System.Windows.Forms.Button();
     this.tb_fx = new System.Windows.Forms.TextBox();
     this.label5 = new System.Windows.Forms.Label();
     this.tb_area = new System.Windows.Forms.TextBox();
     this.label4 = new System.Windows.Forms.Label();
     this.label1 = new System.Windows.Forms.Label();
     this.button1 = new System.Windows.Forms.Button();
     this.btn_new = new System.Windows.Forms.Button();
     this.cmb_site = new System.Windows.Forms.ComboBox();
     this.label14 = new System.Windows.Forms.Label();
     this.btn_del = new System.Windows.Forms.Button();
     this.btn_save = new System.Windows.Forms.Button();
     this.label2 = new System.Windows.Forms.Label();
     this.tabControl1 = new System.Windows.Forms.TabControl();
     this.toolStrip1.SuspendLayout();
     this.contextMenuStrip1.SuspendLayout();
     this.tabPage1.SuspendLayout();
     this.groupBox4.SuspendLayout();
     this.groupBox2.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.dgv1)).BeginInit();
     this.groupBox1.SuspendLayout();
     this.tabControl1.SuspendLayout();
     this.SuspendLayout();
     //
     // toolStrip1
     //
     this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
     this.toolStripLabel1,
     this.cmb_project,
     this.toolStripLabel2});
     this.toolStrip1.Location = new System.Drawing.Point(0, 0);
     this.toolStrip1.Name = "toolStrip1";
     this.toolStrip1.Size = new System.Drawing.Size(1046, 25);
     this.toolStrip1.TabIndex = 5;
     this.toolStrip1.Text = "toolStrip1";
     //
     // toolStripLabel1
     //
     this.toolStripLabel1.Name = "toolStripLabel1";
     this.toolStripLabel1.Size = new System.Drawing.Size(65, 22);
     this.toolStripLabel1.Text = "请选择项目";
     //
     // cmb_project
     //
     this.cmb_project.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.cmb_project.Name = "cmb_project";
     this.cmb_project.Size = new System.Drawing.Size(400, 25);
     this.cmb_project.SelectedIndexChanged += new System.EventHandler(this.cmb_project_SelectedIndexChanged);
     //
     // toolStripLabel2
     //
     this.toolStripLabel2.ForeColor = System.Drawing.Color.Red;
     this.toolStripLabel2.Name = "toolStripLabel2";
     this.toolStripLabel2.Size = new System.Drawing.Size(11, 22);
     this.toolStripLabel2.Text = "*";
     //
     // imageList1
     //
     this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
     this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
     this.imageList1.Images.SetKeyName(0, "系统图标.ico");
     this.imageList1.Images.SetKeyName(1, "folder_documents.png");
     this.imageList1.Images.SetKeyName(2, "kappfinder.png");
     this.imageList1.Images.SetKeyName(3, "kpersonalizer.png");
     this.imageList1.Images.SetKeyName(4, "Rank.ico");
     this.imageList1.Images.SetKeyName(5, "20090314152858Z1.jpg");
     //
     // contextMenuStrip1
     //
     this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
     this.导出MEO创建申请单ToolStripMenuItem,
     this.审核MEO创建申请单ToolStripMenuItem});
     this.contextMenuStrip1.Name = "contextMenuStrip1";
     this.contextMenuStrip1.Size = new System.Drawing.Size(173, 48);
     //
     // 导出MEO创建申请单ToolStripMenuItem
     //
     this.导出MEO创建申请单ToolStripMenuItem.Name = "导出MEO创建申请单ToolStripMenuItem";
     this.导出MEO创建申请单ToolStripMenuItem.Size = new System.Drawing.Size(172, 22);
     this.导出MEO创建申请单ToolStripMenuItem.Text = "导出MEO创建申请单";
     this.导出MEO创建申请单ToolStripMenuItem.Click += new System.EventHandler(this.导出MEO创建申请单ToolStripMenuItem_Click);
     //
     // 审核MEO创建申请单ToolStripMenuItem
     //
     this.审核MEO创建申请单ToolStripMenuItem.Name = "审核MEO创建申请单ToolStripMenuItem";
     this.审核MEO创建申请单ToolStripMenuItem.Size = new System.Drawing.Size(172, 22);
     this.审核MEO创建申请单ToolStripMenuItem.Text = "审核MEO创建申请单";
     this.审核MEO创建申请单ToolStripMenuItem.Click += new System.EventHandler(this.审核MEO创建申请单ToolStripMenuItem_Click);
     //
     // calendarColumn1
     //
     this.calendarColumn1.HeaderText = "需求日期";
     this.calendarColumn1.Name = "calendarColumn1";
     this.calendarColumn1.Width = 42;
     //
     // dataGridViewTextBoxColumn1
     //
     this.dataGridViewTextBoxColumn1.HeaderText = "行";
     this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
     this.dataGridViewTextBoxColumn1.ReadOnly = true;
     this.dataGridViewTextBoxColumn1.Width = 42;
     //
     // dataGridViewTextBoxColumn2
     //
     this.dataGridViewTextBoxColumn2.HeaderText = "序号";
     this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
     this.dataGridViewTextBoxColumn2.ReadOnly = true;
     this.dataGridViewTextBoxColumn2.Width = 51;
     //
     // dataGridViewTextBoxColumn3
     //
     this.dataGridViewTextBoxColumn3.HeaderText = "零件号";
     this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
     this.dataGridViewTextBoxColumn3.ReadOnly = true;
     this.dataGridViewTextBoxColumn3.Width = 61;
     //
     // dataGridViewTextBoxColumn4
     //
     dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window;
     this.dataGridViewTextBoxColumn4.DefaultCellStyle = dataGridViewCellStyle1;
     this.dataGridViewTextBoxColumn4.HeaderText = "零件类型";
     this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
     this.dataGridViewTextBoxColumn4.ReadOnly = true;
     this.dataGridViewTextBoxColumn4.Width = 61;
     //
     // dataGridViewTextBoxColumn5
     //
     dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window;
     this.dataGridViewTextBoxColumn5.DefaultCellStyle = dataGridViewCellStyle2;
     this.dataGridViewTextBoxColumn5.HeaderText = "零件规格";
     this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5";
     this.dataGridViewTextBoxColumn5.ReadOnly = true;
     this.dataGridViewTextBoxColumn5.Width = 61;
     //
     // dataGridViewTextBoxColumn6
     //
     this.dataGridViewTextBoxColumn6.HeaderText = "预估数量";
     this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6";
     this.dataGridViewTextBoxColumn6.ReadOnly = true;
     this.dataGridViewTextBoxColumn6.Width = 61;
     //
     // dataGridViewTextBoxColumn7
     //
     this.dataGridViewTextBoxColumn7.HeaderText = "项目内库存量";
     this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7";
     this.dataGridViewTextBoxColumn7.ReadOnly = true;
     this.dataGridViewTextBoxColumn7.Width = 72;
     //
     // dataGridViewTextBoxColumn8
     //
     this.dataGridViewTextBoxColumn8.HeaderText = "积压库存";
     this.dataGridViewTextBoxColumn8.Name = "dataGridViewTextBoxColumn8";
     this.dataGridViewTextBoxColumn8.ReadOnly = true;
     this.dataGridViewTextBoxColumn8.Width = 61;
     //
     // dataGridViewTextBoxColumn9
     //
     dataGridViewCellStyle3.ForeColor = System.Drawing.Color.Firebrick;
     this.dataGridViewTextBoxColumn9.DefaultCellStyle = dataGridViewCellStyle3;
     this.dataGridViewTextBoxColumn9.HeaderText = "已申请数量";
     this.dataGridViewTextBoxColumn9.Name = "dataGridViewTextBoxColumn9";
     this.dataGridViewTextBoxColumn9.ReadOnly = true;
     this.dataGridViewTextBoxColumn9.Width = 72;
     //
     // dataGridViewTextBoxColumn10
     //
     dataGridViewCellStyle4.ForeColor = System.Drawing.Color.Firebrick;
     this.dataGridViewTextBoxColumn10.DefaultCellStyle = dataGridViewCellStyle4;
     this.dataGridViewTextBoxColumn10.HeaderText = "申请数量";
     this.dataGridViewTextBoxColumn10.Name = "dataGridViewTextBoxColumn10";
     this.dataGridViewTextBoxColumn10.ReadOnly = true;
     this.dataGridViewTextBoxColumn10.Width = 61;
     //
     // dataGridViewTextBoxColumn11
     //
     dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Window;
     this.dataGridViewTextBoxColumn11.DefaultCellStyle = dataGridViewCellStyle5;
     this.dataGridViewTextBoxColumn11.HeaderText = "单位";
     this.dataGridViewTextBoxColumn11.Name = "dataGridViewTextBoxColumn11";
     this.dataGridViewTextBoxColumn11.ReadOnly = true;
     this.dataGridViewTextBoxColumn11.Width = 51;
     //
     // dataGridViewTextBoxColumn12
     //
     this.dataGridViewTextBoxColumn12.HeaderText = "ERPMEO号";
     this.dataGridViewTextBoxColumn12.Name = "dataGridViewTextBoxColumn12";
     this.dataGridViewTextBoxColumn12.Visible = false;
     this.dataGridViewTextBoxColumn12.Width = 72;
     //
     // calendarColumn2
     //
     this.calendarColumn2.HeaderText = "需求日期";
     this.calendarColumn2.Name = "calendarColumn2";
     this.calendarColumn2.Width = 42;
     //
     // dataGridViewTextBoxColumn13
     //
     this.dataGridViewTextBoxColumn13.DataPropertyName = "project_id";
     this.dataGridViewTextBoxColumn13.Frozen = true;
     this.dataGridViewTextBoxColumn13.HeaderText = "MEO_ID";
     this.dataGridViewTextBoxColumn13.Name = "dataGridViewTextBoxColumn13";
     this.dataGridViewTextBoxColumn13.ReadOnly = true;
     this.dataGridViewTextBoxColumn13.Visible = false;
     this.dataGridViewTextBoxColumn13.Width = 66;
     //
     // dataGridViewTextBoxColumn15
     //
     this.dataGridViewTextBoxColumn15.DataPropertyName = "approveflag";
     this.dataGridViewTextBoxColumn15.Frozen = true;
     this.dataGridViewTextBoxColumn15.HeaderText = "审核";
     this.dataGridViewTextBoxColumn15.Name = "dataGridViewTextBoxColumn15";
     this.dataGridViewTextBoxColumn15.ReadOnly = true;
     this.dataGridViewTextBoxColumn15.Width = 54;
     //
     // dataGridViewTextBoxColumn16
     //
     this.dataGridViewTextBoxColumn16.DataPropertyName = "require_id";
     this.dataGridViewTextBoxColumn16.HeaderText = "MEOID";
     this.dataGridViewTextBoxColumn16.Name = "dataGridViewTextBoxColumn16";
     this.dataGridViewTextBoxColumn16.ReadOnly = true;
     this.dataGridViewTextBoxColumn16.Visible = false;
     this.dataGridViewTextBoxColumn16.Width = 60;
     //
     // dataGridViewTextBoxColumn17
     //
     this.dataGridViewTextBoxColumn17.DataPropertyName = "meolineno";
     this.dataGridViewTextBoxColumn17.Frozen = true;
     this.dataGridViewTextBoxColumn17.HeaderText = "meolineno";
     this.dataGridViewTextBoxColumn17.Name = "dataGridViewTextBoxColumn17";
     this.dataGridViewTextBoxColumn17.ReadOnly = true;
     this.dataGridViewTextBoxColumn17.Visible = false;
     this.dataGridViewTextBoxColumn17.Width = 84;
     //
     // dataGridViewTextBoxColumn18
     //
     this.dataGridViewTextBoxColumn18.DataPropertyName = "require_no";
     this.dataGridViewTextBoxColumn18.Frozen = true;
     this.dataGridViewTextBoxColumn18.HeaderText = "MEO手工号";
     this.dataGridViewTextBoxColumn18.Name = "dataGridViewTextBoxColumn18";
     this.dataGridViewTextBoxColumn18.ReadOnly = true;
     this.dataGridViewTextBoxColumn18.Width = 84;
     //
     // dataGridViewTextBoxColumn19
     //
     this.dataGridViewTextBoxColumn19.DataPropertyName = "system_id";
     this.dataGridViewTextBoxColumn19.HeaderText = "系统ID";
     this.dataGridViewTextBoxColumn19.Name = "dataGridViewTextBoxColumn19";
     this.dataGridViewTextBoxColumn19.ReadOnly = true;
     this.dataGridViewTextBoxColumn19.Visible = false;
     this.dataGridViewTextBoxColumn19.Width = 66;
     //
     // dataGridViewTextBoxColumn20
     //
     this.dataGridViewTextBoxColumn20.DataPropertyName = "id";
     this.dataGridViewTextBoxColumn20.HeaderText = "零件ID";
     this.dataGridViewTextBoxColumn20.Name = "dataGridViewTextBoxColumn20";
     this.dataGridViewTextBoxColumn20.ReadOnly = true;
     this.dataGridViewTextBoxColumn20.Visible = false;
     this.dataGridViewTextBoxColumn20.Width = 66;
     //
     // dataGridViewTextBoxColumn21
     //
     this.dataGridViewTextBoxColumn21.DataPropertyName = "part_no";
     this.dataGridViewTextBoxColumn21.Frozen = true;
     this.dataGridViewTextBoxColumn21.HeaderText = "零件编码";
     this.dataGridViewTextBoxColumn21.Name = "dataGridViewTextBoxColumn21";
     this.dataGridViewTextBoxColumn21.ReadOnly = true;
     this.dataGridViewTextBoxColumn21.Width = 78;
     //
     // dataGridViewTextBoxColumn22
     //
     this.dataGridViewTextBoxColumn22.DataPropertyName = "part_type";
     this.dataGridViewTextBoxColumn22.HeaderText = "零件名称";
     this.dataGridViewTextBoxColumn22.Name = "dataGridViewTextBoxColumn22";
     this.dataGridViewTextBoxColumn22.ReadOnly = true;
     this.dataGridViewTextBoxColumn22.Width = 78;
     //
     // dataGridViewTextBoxColumn23
     //
     this.dataGridViewTextBoxColumn23.DataPropertyName = "part_spec";
     this.dataGridViewTextBoxColumn23.HeaderText = "零件规格";
     this.dataGridViewTextBoxColumn23.Name = "dataGridViewTextBoxColumn23";
     this.dataGridViewTextBoxColumn23.ReadOnly = true;
     this.dataGridViewTextBoxColumn23.Width = 78;
     //
     // dataGridViewTextBoxColumn24
     //
     this.dataGridViewTextBoxColumn24.DataPropertyName = "part_size_stand";
     this.dataGridViewTextBoxColumn24.HeaderText = "尺寸标准";
     this.dataGridViewTextBoxColumn24.Name = "dataGridViewTextBoxColumn24";
     this.dataGridViewTextBoxColumn24.ReadOnly = true;
     this.dataGridViewTextBoxColumn24.Width = 78;
     //
     // dataGridViewTextBoxColumn25
     //
     this.dataGridViewTextBoxColumn25.DataPropertyName = "parentid";
     this.dataGridViewTextBoxColumn25.HeaderText = "零件类ID";
     this.dataGridViewTextBoxColumn25.Name = "dataGridViewTextBoxColumn25";
     this.dataGridViewTextBoxColumn25.ReadOnly = true;
     this.dataGridViewTextBoxColumn25.Visible = false;
     this.dataGridViewTextBoxColumn25.Width = 78;
     //
     // dataGridViewTextBoxColumn26
     //
     this.dataGridViewTextBoxColumn26.DataPropertyName = "contract";
     this.dataGridViewTextBoxColumn26.HeaderText = "所属域";
     this.dataGridViewTextBoxColumn26.Name = "dataGridViewTextBoxColumn26";
     this.dataGridViewTextBoxColumn26.ReadOnly = true;
     this.dataGridViewTextBoxColumn26.Width = 66;
     //
     // dataGridViewTextBoxColumn27
     //
     this.dataGridViewTextBoxColumn27.DataPropertyName = "part_mat";
     this.dataGridViewTextBoxColumn27.HeaderText = "材质";
     this.dataGridViewTextBoxColumn27.Name = "dataGridViewTextBoxColumn27";
     this.dataGridViewTextBoxColumn27.ReadOnly = true;
     this.dataGridViewTextBoxColumn27.Width = 54;
     //
     // dataGridViewTextBoxColumn28
     //
     this.dataGridViewTextBoxColumn28.DataPropertyName = "part_cert";
     this.dataGridViewTextBoxColumn28.HeaderText = "零件证书";
     this.dataGridViewTextBoxColumn28.Name = "dataGridViewTextBoxColumn28";
     this.dataGridViewTextBoxColumn28.ReadOnly = true;
     this.dataGridViewTextBoxColumn28.Width = 78;
     //
     // dataGridViewTextBoxColumn29
     //
     this.dataGridViewTextBoxColumn29.DataPropertyName = "part_unit";
     this.dataGridViewTextBoxColumn29.HeaderText = "单位";
     this.dataGridViewTextBoxColumn29.Name = "dataGridViewTextBoxColumn29";
     this.dataGridViewTextBoxColumn29.ReadOnly = true;
     this.dataGridViewTextBoxColumn29.Width = 54;
     //
     // dataGridViewTextBoxColumn30
     //
     this.dataGridViewTextBoxColumn30.DataPropertyName = "part_unitdensity";
     this.dataGridViewTextBoxColumn30.HeaderText = "单位密度";
     this.dataGridViewTextBoxColumn30.Name = "dataGridViewTextBoxColumn30";
     this.dataGridViewTextBoxColumn30.ReadOnly = true;
     this.dataGridViewTextBoxColumn30.Width = 78;
     //
     // dataGridViewTextBoxColumn31
     //
     this.dataGridViewTextBoxColumn31.DataPropertyName = "part_densityunit";
     this.dataGridViewTextBoxColumn31.HeaderText = "密度单位";
     this.dataGridViewTextBoxColumn31.Name = "dataGridViewTextBoxColumn31";
     this.dataGridViewTextBoxColumn31.ReadOnly = true;
     this.dataGridViewTextBoxColumn31.Width = 78;
     //
     // dataGridViewTextBoxColumn32
     //
     this.dataGridViewTextBoxColumn32.DataPropertyName = "part_level";
     this.dataGridViewTextBoxColumn32.HeaderText = "零件级别";
     this.dataGridViewTextBoxColumn32.Name = "dataGridViewTextBoxColumn32";
     this.dataGridViewTextBoxColumn32.ReadOnly = true;
     this.dataGridViewTextBoxColumn32.Width = 78;
     //
     // dataGridViewTextBoxColumn33
     //
     this.dataGridViewTextBoxColumn33.DataPropertyName = "part_spec1";
     this.dataGridViewTextBoxColumn33.HeaderText = "规格1";
     this.dataGridViewTextBoxColumn33.Name = "dataGridViewTextBoxColumn33";
     this.dataGridViewTextBoxColumn33.ReadOnly = true;
     this.dataGridViewTextBoxColumn33.Visible = false;
     this.dataGridViewTextBoxColumn33.Width = 60;
     //
     // dataGridViewTextBoxColumn34
     //
     this.dataGridViewTextBoxColumn34.DataPropertyName = "part_spec2";
     this.dataGridViewTextBoxColumn34.HeaderText = "规格2";
     this.dataGridViewTextBoxColumn34.Name = "dataGridViewTextBoxColumn34";
     this.dataGridViewTextBoxColumn34.ReadOnly = true;
     this.dataGridViewTextBoxColumn34.Visible = false;
     this.dataGridViewTextBoxColumn34.Width = 60;
     //
     // dataGridViewTextBoxColumn35
     //
     this.dataGridViewTextBoxColumn35.DataPropertyName = "part_spec3";
     this.dataGridViewTextBoxColumn35.HeaderText = "规格3";
     this.dataGridViewTextBoxColumn35.Name = "dataGridViewTextBoxColumn35";
     this.dataGridViewTextBoxColumn35.ReadOnly = true;
     this.dataGridViewTextBoxColumn35.Visible = false;
     this.dataGridViewTextBoxColumn35.Width = 60;
     //
     // dataGridViewTextBoxColumn36
     //
     this.dataGridViewTextBoxColumn36.DataPropertyName = "part_spec4";
     this.dataGridViewTextBoxColumn36.HeaderText = "规格4";
     this.dataGridViewTextBoxColumn36.Name = "dataGridViewTextBoxColumn36";
     this.dataGridViewTextBoxColumn36.ReadOnly = true;
     this.dataGridViewTextBoxColumn36.Visible = false;
     this.dataGridViewTextBoxColumn36.Width = 60;
     //
     // dataGridViewTextBoxColumn37
     //
     this.dataGridViewTextBoxColumn37.DataPropertyName = "part_spec5";
     this.dataGridViewTextBoxColumn37.HeaderText = "规格5";
     this.dataGridViewTextBoxColumn37.Name = "dataGridViewTextBoxColumn37";
     this.dataGridViewTextBoxColumn37.ReadOnly = true;
     this.dataGridViewTextBoxColumn37.Visible = false;
     this.dataGridViewTextBoxColumn37.Width = 60;
     //
     // dataGridViewTextBoxColumn38
     //
     this.dataGridViewTextBoxColumn38.DataPropertyName = "creator";
     this.dataGridViewTextBoxColumn38.HeaderText = "创建人";
     this.dataGridViewTextBoxColumn38.Name = "dataGridViewTextBoxColumn38";
     this.dataGridViewTextBoxColumn38.ReadOnly = true;
     this.dataGridViewTextBoxColumn38.Visible = false;
     this.dataGridViewTextBoxColumn38.Width = 66;
     //
     // dataGridViewTextBoxColumn39
     //
     this.dataGridViewTextBoxColumn39.DataPropertyName = "createdate";
     this.dataGridViewTextBoxColumn39.HeaderText = "创建日期";
     this.dataGridViewTextBoxColumn39.Name = "dataGridViewTextBoxColumn39";
     this.dataGridViewTextBoxColumn39.ReadOnly = true;
     this.dataGridViewTextBoxColumn39.Visible = false;
     this.dataGridViewTextBoxColumn39.Width = 78;
     //
     // dataGridViewTextBoxColumn40
     //
     this.dataGridViewTextBoxColumn40.DataPropertyName = "updater";
     this.dataGridViewTextBoxColumn40.HeaderText = "更新人";
     this.dataGridViewTextBoxColumn40.Name = "dataGridViewTextBoxColumn40";
     this.dataGridViewTextBoxColumn40.ReadOnly = true;
     this.dataGridViewTextBoxColumn40.Visible = false;
     this.dataGridViewTextBoxColumn40.Width = 66;
     //
     // dataGridViewTextBoxColumn41
     //
     this.dataGridViewTextBoxColumn41.DataPropertyName = "updatedate";
     this.dataGridViewTextBoxColumn41.HeaderText = "更新日期";
     this.dataGridViewTextBoxColumn41.Name = "dataGridViewTextBoxColumn41";
     this.dataGridViewTextBoxColumn41.ReadOnly = true;
     this.dataGridViewTextBoxColumn41.Visible = false;
     this.dataGridViewTextBoxColumn41.Width = 78;
     //
     // dataGridViewTextBoxColumn42
     //
     this.dataGridViewTextBoxColumn42.DataPropertyName = "supplycircle";
     this.dataGridViewTextBoxColumn42.HeaderText = "采购周期";
     this.dataGridViewTextBoxColumn42.Name = "dataGridViewTextBoxColumn42";
     this.dataGridViewTextBoxColumn42.ReadOnly = true;
     this.dataGridViewTextBoxColumn42.Width = 78;
     //
     // dataGridViewTextBoxColumn43
     //
     this.dataGridViewTextBoxColumn43.DataPropertyName = "require_qty";
     this.dataGridViewTextBoxColumn43.HeaderText = "申请数量";
     this.dataGridViewTextBoxColumn43.Name = "dataGridViewTextBoxColumn43";
     this.dataGridViewTextBoxColumn43.ReadOnly = true;
     this.dataGridViewTextBoxColumn43.Width = 78;
     //
     // dataGridViewTextBoxColumn44
     //
     this.dataGridViewTextBoxColumn44.DataPropertyName = "dmssqty";
     this.dataGridViewTextBoxColumn44.HeaderText = "已下发数量";
     this.dataGridViewTextBoxColumn44.Name = "dataGridViewTextBoxColumn44";
     this.dataGridViewTextBoxColumn44.ReadOnly = true;
     this.dataGridViewTextBoxColumn44.Width = 90;
     //
     // dataGridViewTextBoxColumn45
     //
     this.dataGridViewTextBoxColumn45.DataPropertyName = "require_date";
     this.dataGridViewTextBoxColumn45.HeaderText = "需求日期";
     this.dataGridViewTextBoxColumn45.Name = "dataGridViewTextBoxColumn45";
     this.dataGridViewTextBoxColumn45.ReadOnly = true;
     this.dataGridViewTextBoxColumn45.Width = 78;
     //
     // dataGridViewTextBoxColumn46
     //
     this.dataGridViewTextBoxColumn46.DataPropertyName = "reason_code";
     this.dataGridViewTextBoxColumn46.HeaderText = "申请原因";
     this.dataGridViewTextBoxColumn46.Name = "dataGridViewTextBoxColumn46";
     this.dataGridViewTextBoxColumn46.ReadOnly = true;
     this.dataGridViewTextBoxColumn46.Width = 78;
     //
     // dataGridViewTextBoxColumn47
     //
     this.dataGridViewTextBoxColumn47.DataPropertyName = "information";
     this.dataGridViewTextBoxColumn47.HeaderText = "备注";
     this.dataGridViewTextBoxColumn47.Name = "dataGridViewTextBoxColumn47";
     this.dataGridViewTextBoxColumn47.ReadOnly = true;
     this.dataGridViewTextBoxColumn47.Visible = false;
     this.dataGridViewTextBoxColumn47.Width = 54;
     //
     // dataGridViewTextBoxColumn48
     //
     this.dataGridViewTextBoxColumn48.DataPropertyName = "creater";
     this.dataGridViewTextBoxColumn48.HeaderText = "申请人";
     this.dataGridViewTextBoxColumn48.Name = "dataGridViewTextBoxColumn48";
     this.dataGridViewTextBoxColumn48.ReadOnly = true;
     this.dataGridViewTextBoxColumn48.Width = 66;
     //
     // dataGridViewTextBoxColumn49
     //
     this.dataGridViewTextBoxColumn49.DataPropertyName = "create_date";
     this.dataGridViewTextBoxColumn49.HeaderText = "申请日期";
     this.dataGridViewTextBoxColumn49.Name = "dataGridViewTextBoxColumn49";
     this.dataGridViewTextBoxColumn49.ReadOnly = true;
     this.dataGridViewTextBoxColumn49.Width = 78;
     //
     // dataGridViewTextBoxColumn50
     //
     this.dataGridViewTextBoxColumn50.DataPropertyName = "updator";
     this.dataGridViewTextBoxColumn50.HeaderText = "更新人";
     this.dataGridViewTextBoxColumn50.Name = "dataGridViewTextBoxColumn50";
     this.dataGridViewTextBoxColumn50.ReadOnly = true;
     this.dataGridViewTextBoxColumn50.Width = 66;
     //
     // dataGridViewTextBoxColumn51
     //
     this.dataGridViewTextBoxColumn51.DataPropertyName = "update_date";
     this.dataGridViewTextBoxColumn51.HeaderText = "更新日期";
     this.dataGridViewTextBoxColumn51.Name = "dataGridViewTextBoxColumn51";
     this.dataGridViewTextBoxColumn51.ReadOnly = true;
     this.dataGridViewTextBoxColumn51.Visible = false;
     this.dataGridViewTextBoxColumn51.Width = 78;
     //
     // dataGridViewTextBoxColumn52
     //
     this.dataGridViewTextBoxColumn52.DataPropertyName = "remark";
     this.dataGridViewTextBoxColumn52.HeaderText = "申请备注";
     this.dataGridViewTextBoxColumn52.Name = "dataGridViewTextBoxColumn52";
     this.dataGridViewTextBoxColumn52.ReadOnly = true;
     this.dataGridViewTextBoxColumn52.Width = 78;
     //
     // dateColumn1
     //
     this.dateColumn1.HeaderText = "需求日期";
     this.dateColumn1.Name = "dateColumn1";
     this.dateColumn1.Width = 42;
     //
     // remark
     //
     this.remark.DataPropertyName = "remark";
     this.remark.HeaderText = "申请备注";
     this.remark.Name = "remark";
     this.remark.ReadOnly = true;
     this.remark.Width = 78;
     //
     // update_date
     //
     this.update_date.DataPropertyName = "update_date";
     this.update_date.HeaderText = "更新日期";
     this.update_date.Name = "update_date";
     this.update_date.ReadOnly = true;
     this.update_date.Visible = false;
     this.update_date.Width = 78;
     //
     // updator
     //
     this.updator.DataPropertyName = "updator";
     this.updator.HeaderText = "更新人";
     this.updator.Name = "updator";
     this.updator.ReadOnly = true;
     this.updator.Width = 66;
     //
     // create_date
     //
     this.create_date.DataPropertyName = "create_date";
     this.create_date.HeaderText = "申请日期";
     this.create_date.Name = "create_date";
     this.create_date.ReadOnly = true;
     this.create_date.Width = 78;
     //
     // creater
     //
     this.creater.DataPropertyName = "creater";
     this.creater.HeaderText = "申请人";
     this.creater.Name = "creater";
     this.creater.ReadOnly = true;
     this.creater.Width = 66;
     //
     // information
     //
     this.information.DataPropertyName = "information";
     this.information.HeaderText = "备注";
     this.information.Name = "information";
     this.information.ReadOnly = true;
     this.information.Visible = false;
     this.information.Width = 54;
     //
     // reason_code
     //
     this.reason_code.DataPropertyName = "reason_code";
     this.reason_code.HeaderText = "申请原因";
     this.reason_code.Name = "reason_code";
     this.reason_code.ReadOnly = true;
     this.reason_code.Width = 78;
     //
     // require_date
     //
     this.require_date.DataPropertyName = "require_date";
     this.require_date.HeaderText = "需求日期";
     this.require_date.Name = "require_date";
     this.require_date.ReadOnly = true;
     this.require_date.Width = 78;
     //
     // dmssqty
     //
     this.dmssqty.DataPropertyName = "dmssqty";
     this.dmssqty.HeaderText = "已下发数量";
     this.dmssqty.Name = "dmssqty";
     this.dmssqty.ReadOnly = true;
     this.dmssqty.Width = 90;
     //
     // require_qty
     //
     this.require_qty.DataPropertyName = "require_qty";
     this.require_qty.HeaderText = "申请数量";
     this.require_qty.Name = "require_qty";
     this.require_qty.ReadOnly = true;
     this.require_qty.Width = 78;
     //
     // supplycircle
     //
     this.supplycircle.DataPropertyName = "supplycircle";
     this.supplycircle.HeaderText = "采购周期";
     this.supplycircle.Name = "supplycircle";
     this.supplycircle.ReadOnly = true;
     this.supplycircle.Width = 78;
     //
     // updatedate
     //
     this.updatedate.DataPropertyName = "updatedate";
     this.updatedate.HeaderText = "更新日期";
     this.updatedate.Name = "updatedate";
     this.updatedate.ReadOnly = true;
     this.updatedate.Visible = false;
     this.updatedate.Width = 78;
     //
     // updater
     //
     this.updater.DataPropertyName = "updater";
     this.updater.HeaderText = "更新人";
     this.updater.Name = "updater";
     this.updater.ReadOnly = true;
     this.updater.Visible = false;
     this.updater.Width = 66;
     //
     // createdate
     //
     this.createdate.DataPropertyName = "createdate";
     this.createdate.HeaderText = "创建日期";
     this.createdate.Name = "createdate";
     this.createdate.ReadOnly = true;
     this.createdate.Visible = false;
     this.createdate.Width = 78;
     //
     // creator
     //
     this.creator.DataPropertyName = "creator";
     this.creator.HeaderText = "创建人";
     this.creator.Name = "creator";
     this.creator.ReadOnly = true;
     this.creator.Visible = false;
     this.creator.Width = 66;
     //
     // part_unit
     //
     this.part_unit.DataPropertyName = "unit_meas";
     this.part_unit.HeaderText = "单位";
     this.part_unit.Name = "part_unit";
     this.part_unit.ReadOnly = true;
     this.part_unit.Width = 54;
     //
     // contract
     //
     this.contract.DataPropertyName = "contract";
     this.contract.HeaderText = "所属域";
     this.contract.Name = "contract";
     this.contract.ReadOnly = true;
     this.contract.Width = 66;
     //
     // part_no
     //
     this.part_no.DataPropertyName = "part_no";
     this.part_no.Frozen = true;
     this.part_no.HeaderText = "零件编码";
     this.part_no.Name = "part_no";
     this.part_no.ReadOnly = true;
     this.part_no.Width = 78;
     //
     // system_id
     //
     this.system_id.DataPropertyName = "system_id";
     this.system_id.Frozen = true;
     this.system_id.HeaderText = "区域";
     this.system_id.Name = "system_id";
     this.system_id.ReadOnly = true;
     this.system_id.Visible = false;
     this.system_id.Width = 54;
     //
     // require_no
     //
     this.require_no.DataPropertyName = "require_no";
     this.require_no.Frozen = true;
     this.require_no.HeaderText = "MEO手工号";
     this.require_no.Name = "require_no";
     this.require_no.ReadOnly = true;
     this.require_no.Width = 84;
     //
     // meolineno
     //
     this.meolineno.DataPropertyName = "meolineno";
     this.meolineno.Frozen = true;
     this.meolineno.HeaderText = "meolineno";
     this.meolineno.Name = "meolineno";
     this.meolineno.ReadOnly = true;
     this.meolineno.Visible = false;
     this.meolineno.Width = 84;
     //
     // require_id
     //
     this.require_id.DataPropertyName = "require_id";
     this.require_id.Frozen = true;
     this.require_id.HeaderText = "MEOID";
     this.require_id.Name = "require_id";
     this.require_id.ReadOnly = true;
     this.require_id.Visible = false;
     this.require_id.Width = 60;
     //
     // dataGridViewTextBoxColumn14
     //
     this.dataGridViewTextBoxColumn14.DataPropertyName = "MEO_ERP";
     this.dataGridViewTextBoxColumn14.Frozen = true;
     this.dataGridViewTextBoxColumn14.HeaderText = "ERP_MEO号";
     this.dataGridViewTextBoxColumn14.Name = "dataGridViewTextBoxColumn14";
     this.dataGridViewTextBoxColumn14.ReadOnly = true;
     this.dataGridViewTextBoxColumn14.Width = 84;
     //
     // State
     //
     this.State.DataPropertyName = "state";
     this.State.Frozen = true;
     this.State.HeaderText = "状态";
     this.State.Name = "State";
     this.State.ReadOnly = true;
     this.State.Resizable = System.Windows.Forms.DataGridViewTriState.True;
     this.State.Width = 54;
     //
     // project_id
     //
     this.project_id.DataPropertyName = "project_id";
     this.project_id.Frozen = true;
     this.project_id.HeaderText = "项目ID";
     this.project_id.Name = "project_id";
     this.project_id.ReadOnly = true;
     this.project_id.Visible = false;
     this.project_id.Width = 66;
     //
     // btn_query
     //
     this.btn_query.Location = new System.Drawing.Point(7, 164);
     this.btn_query.Name = "btn_query";
     this.btn_query.Size = new System.Drawing.Size(73, 23);
     this.btn_query.TabIndex = 35;
     this.btn_query.Text = "查询(内部)";
     this.btn_query.UseVisualStyleBackColor = true;
     this.btn_query.Click += new System.EventHandler(this.btn_query_Click);
     //
     // label17
     //
     this.label17.AutoSize = true;
     this.label17.Location = new System.Drawing.Point(8, 91);
     this.label17.Name = "label17";
     this.label17.Size = new System.Drawing.Size(53, 12);
     this.label17.TabIndex = 38;
     //
     // cmb_reason
     //
     this.cmb_reason.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.cmb_reason.FormattingEnabled = true;
     this.cmb_reason.Location = new System.Drawing.Point(60, 87);
     this.cmb_reason.Name = "cmb_reason";
     this.cmb_reason.Size = new System.Drawing.Size(180, 20);
     this.cmb_reason.TabIndex = 39;
     //
     // label16
     //
     this.label16.AutoSize = true;
     this.label16.Location = new System.Drawing.Point(480, 42);
     this.label16.Name = "label16";
     this.label16.Size = new System.Drawing.Size(53, 12);
     this.label16.TabIndex = 40;
     //
     // textBox1
     //
     this.textBox1.Location = new System.Drawing.Point(557, 38);
     this.textBox1.Name = "textBox1";
     this.textBox1.Size = new System.Drawing.Size(139, 21);
     this.textBox1.TabIndex = 41;
     //
     // btn_queryERP
     //
     this.btn_queryERP.Location = new System.Drawing.Point(295, 164);
     this.btn_queryERP.Name = "btn_queryERP";
     this.btn_queryERP.Size = new System.Drawing.Size(73, 23);
     this.btn_queryERP.TabIndex = 42;
     this.btn_queryERP.Text = "查询(ERP)";
     this.btn_queryERP.UseVisualStyleBackColor = true;
     this.btn_queryERP.Visible = false;
     this.btn_queryERP.Click += new System.EventHandler(this.btn_queryERP_Click);
     //
     // btn_export
     //
     this.btn_export.Location = new System.Drawing.Point(151, 164);
     this.btn_export.Name = "btn_export";
     this.btn_export.Size = new System.Drawing.Size(73, 23);
     this.btn_export.TabIndex = 43;
     this.btn_export.Text = "导出";
     this.btn_export.UseVisualStyleBackColor = true;
     //
     // label15
     //
     this.label15.AutoSize = true;
     this.label15.Location = new System.Drawing.Point(8, 115);
     this.label15.Name = "label15";
     this.label15.Size = new System.Drawing.Size(77, 12);
     this.label15.TabIndex = 44;
     //
     // dateTimePicker1
     //
     this.dateTimePicker1.Checked = false;
     this.dateTimePicker1.CustomFormat = "yyyy-MM-dd";
     this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
     this.dateTimePicker1.Location = new System.Drawing.Point(99, 111);
     this.dateTimePicker1.Name = "dateTimePicker1";
     this.dateTimePicker1.ShowCheckBox = true;
     this.dateTimePicker1.Size = new System.Drawing.Size(140, 21);
     this.dateTimePicker1.TabIndex = 45;
     //
     // label13
     //
     this.label13.AutoSize = true;
     this.label13.Location = new System.Drawing.Point(246, 115);
     this.label13.Name = "label13";
     this.label13.Size = new System.Drawing.Size(77, 12);
     this.label13.TabIndex = 46;
     //
     // dateTimePicker2
     //
     this.dateTimePicker2.Checked = false;
     this.dateTimePicker2.CustomFormat = "yyyy-MM-dd";
     this.dateTimePicker2.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
     this.dateTimePicker2.Location = new System.Drawing.Point(339, 111);
     this.dateTimePicker2.Name = "dateTimePicker2";
     this.dateTimePicker2.ShowCheckBox = true;
     this.dateTimePicker2.Size = new System.Drawing.Size(136, 21);
     this.dateTimePicker2.TabIndex = 47;
     //
     // label11
     //
     this.label11.AutoSize = true;
     this.label11.Location = new System.Drawing.Point(7, 140);
     this.label11.Name = "label11";
     this.label11.Size = new System.Drawing.Size(77, 12);
     this.label11.TabIndex = 48;
     //
     // label10
     //
     this.label10.AutoSize = true;
     this.label10.Location = new System.Drawing.Point(246, 140);
     this.label10.Name = "label10";
     this.label10.Size = new System.Drawing.Size(77, 12);
     this.label10.TabIndex = 49;
     //
     // dateTimePicker3
     //
     this.dateTimePicker3.Checked = false;
     this.dateTimePicker3.CustomFormat = "yyyy-MM-dd";
     this.dateTimePicker3.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
     this.dateTimePicker3.Location = new System.Drawing.Point(99, 136);
     this.dateTimePicker3.Name = "dateTimePicker3";
     this.dateTimePicker3.ShowCheckBox = true;
     this.dateTimePicker3.Size = new System.Drawing.Size(140, 21);
     this.dateTimePicker3.TabIndex = 50;
     //
     // dateTimePicker4
     //
     this.dateTimePicker4.Checked = false;
     this.dateTimePicker4.CustomFormat = "yyyy-MM-dd";
     this.dateTimePicker4.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
     this.dateTimePicker4.Location = new System.Drawing.Point(340, 136);
     this.dateTimePicker4.Name = "dateTimePicker4";
     this.dateTimePicker4.ShowCheckBox = true;
     this.dateTimePicker4.Size = new System.Drawing.Size(135, 21);
     this.dateTimePicker4.TabIndex = 51;
     //
     // button3
     //
     this.button3.Location = new System.Drawing.Point(223, 164);
     this.button3.Name = "button3";
     this.button3.Size = new System.Drawing.Size(73, 23);
     this.button3.TabIndex = 90;
     this.button3.Text = "关闭";
     this.button3.UseVisualStyleBackColor = true;
     this.button3.Click += new System.EventHandler(this.button3_Click);
     //
     // label8
     //
     this.label8.AutoSize = true;
     this.label8.Location = new System.Drawing.Point(481, 67);
     this.label8.Name = "label8";
     this.label8.Size = new System.Drawing.Size(47, 12);
     this.label8.TabIndex = 91;
     //
     // cmb_state
     //
     this.cmb_state.FormattingEnabled = true;
     this.cmb_state.Items.AddRange(new object[] {
     "已审核",
     "未审核"});
     this.cmb_state.Location = new System.Drawing.Point(557, 63);
     this.cmb_state.Name = "cmb_state";
     this.cmb_state.Size = new System.Drawing.Size(139, 20);
     this.cmb_state.TabIndex = 92;
     //
     // button2
     //
     this.button2.Location = new System.Drawing.Point(79, 164);
     this.button2.Name = "button2";
     this.button2.Size = new System.Drawing.Size(73, 23);
     this.button2.TabIndex = 93;
     this.button2.Text = "保存";
     this.button2.UseVisualStyleBackColor = true;
     //
     // label7
     //
     this.label7.AutoSize = true;
     this.label7.Location = new System.Drawing.Point(480, 18);
     this.label7.Name = "label7";
     this.label7.Size = new System.Drawing.Size(59, 12);
     this.label7.TabIndex = 19;
     //
     // txt_meono
     //
     this.txt_meono.Location = new System.Drawing.Point(557, 14);
     this.txt_meono.Name = "txt_meono";
     this.txt_meono.Size = new System.Drawing.Size(139, 21);
     this.txt_meono.TabIndex = 94;
     //
     // label23
     //
     this.label23.AutoSize = true;
     this.label23.Location = new System.Drawing.Point(247, 42);
     this.label23.Name = "label23";
     this.label23.Size = new System.Drawing.Size(29, 12);
     this.label23.TabIndex = 123;
     //
     // label22
     //
     this.label22.AutoSize = true;
     this.label22.Location = new System.Drawing.Point(6, 42);
     this.label22.Name = "label22";
     this.label22.Size = new System.Drawing.Size(29, 12);
     this.label22.TabIndex = 124;
     //
     // label21
     //
     this.label21.AutoSize = true;
     this.label21.Location = new System.Drawing.Point(8, 18);
     this.label21.Name = "label21";
     this.label21.Size = new System.Drawing.Size(29, 12);
     this.label21.TabIndex = 125;
     //
     // textBox5
     //
     this.textBox5.BackColor = System.Drawing.Color.White;
     this.textBox5.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
     this.textBox5.ForeColor = System.Drawing.SystemColors.Desktop;
     this.textBox5.Location = new System.Drawing.Point(59, 14);
     this.textBox5.Name = "textBox5";
     this.textBox5.ReadOnly = true;
     this.textBox5.Size = new System.Drawing.Size(180, 21);
     this.textBox5.TabIndex = 126;
     //
     // label12
     //
     this.label12.AutoSize = true;
     this.label12.Location = new System.Drawing.Point(247, 18);
     this.label12.Name = "label12";
     this.label12.Size = new System.Drawing.Size(29, 12);
     this.label12.TabIndex = 127;
     //
     // textBox4
     //
     this.textBox4.BackColor = System.Drawing.Color.White;
     this.textBox4.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
     this.textBox4.ForeColor = System.Drawing.SystemColors.Desktop;
     this.textBox4.Location = new System.Drawing.Point(300, 14);
     this.textBox4.Name = "textBox4";
     this.textBox4.ReadOnly = true;
     this.textBox4.Size = new System.Drawing.Size(174, 21);
     this.textBox4.TabIndex = 128;
     //
     // textBox3
     //
     this.textBox3.BackColor = System.Drawing.Color.White;
     this.textBox3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
     this.textBox3.ForeColor = System.Drawing.SystemColors.Desktop;
     this.textBox3.Location = new System.Drawing.Point(300, 38);
     this.textBox3.Name = "textBox3";
     this.textBox3.ReadOnly = true;
     this.textBox3.Size = new System.Drawing.Size(174, 21);
     this.textBox3.TabIndex = 129;
     //
     // textBox2
     //
     this.textBox2.BackColor = System.Drawing.Color.White;
     this.textBox2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
     this.textBox2.ForeColor = System.Drawing.SystemColors.Desktop;
     this.textBox2.Location = new System.Drawing.Point(59, 38);
     this.textBox2.Name = "textBox2";
     this.textBox2.ReadOnly = true;
     this.textBox2.Size = new System.Drawing.Size(180, 21);
     this.textBox2.TabIndex = 130;
     //
     // cmb_site2
     //
     this.cmb_site2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.cmb_site2.FormattingEnabled = true;
     this.cmb_site2.Location = new System.Drawing.Point(59, 63);
     this.cmb_site2.Name = "cmb_site2";
     this.cmb_site2.Size = new System.Drawing.Size(181, 20);
     this.cmb_site2.TabIndex = 131;
     //
     // cmb_discipline2
     //
     this.cmb_discipline2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.cmb_discipline2.FormattingEnabled = true;
     this.cmb_discipline2.Location = new System.Drawing.Point(300, 63);
     this.cmb_discipline2.Name = "cmb_discipline2";
     this.cmb_discipline2.Size = new System.Drawing.Size(174, 20);
     this.cmb_discipline2.TabIndex = 132;
     //
     // label25
     //
     this.label25.AutoSize = true;
     this.label25.Location = new System.Drawing.Point(8, 67);
     this.label25.Name = "label25";
     this.label25.Size = new System.Drawing.Size(17, 12);
     this.label25.TabIndex = 133;
     //
     // label24
     //
     this.label24.AutoSize = true;
     this.label24.Location = new System.Drawing.Point(247, 67);
     this.label24.Name = "label24";
     this.label24.Size = new System.Drawing.Size(29, 12);
     this.label24.TabIndex = 134;
     //
     // label20
     //
     this.label20.AutoSize = true;
     this.label20.Location = new System.Drawing.Point(247, 91);
     this.label20.Name = "label20";
     this.label20.Size = new System.Drawing.Size(53, 12);
     this.label20.TabIndex = 135;
     //
     // label19
     //
     this.label19.AutoSize = true;
     this.label19.Location = new System.Drawing.Point(480, 91);
     this.label19.Name = "label19";
     this.label19.Size = new System.Drawing.Size(53, 12);
     this.label19.TabIndex = 136;
     //
     // cmb_partno
     //
     this.cmb_partno.FormattingEnabled = true;
     this.cmb_partno.Location = new System.Drawing.Point(300, 87);
     this.cmb_partno.Name = "cmb_partno";
     this.cmb_partno.Size = new System.Drawing.Size(174, 20);
     this.cmb_partno.TabIndex = 137;
     //
     // cmb_partname
     //
     this.cmb_partname.FormattingEnabled = true;
     this.cmb_partname.Location = new System.Drawing.Point(557, 87);
     this.cmb_partname.Name = "cmb_partname";
     this.cmb_partname.Size = new System.Drawing.Size(139, 20);
     this.cmb_partname.TabIndex = 138;
     //
     // label18
     //
     this.label18.AutoSize = true;
     this.label18.Location = new System.Drawing.Point(482, 115);
     this.label18.Name = "label18";
     this.label18.Size = new System.Drawing.Size(59, 12);
     this.label18.TabIndex = 141;
     //
     // tb_manual
     //
     this.tb_manual.Location = new System.Drawing.Point(558, 111);
     this.tb_manual.Name = "tb_manual";
     this.tb_manual.Size = new System.Drawing.Size(138, 21);
     this.tb_manual.TabIndex = 142;
     //
     // label26
     //
     this.label26.AutoSize = true;
     this.label26.Location = new System.Drawing.Point(482, 140);
     this.label26.Name = "label26";
     this.label26.Size = new System.Drawing.Size(41, 12);
     this.label26.TabIndex = 143;
     //
     // txt_creator
     //
     this.txt_creator.Location = new System.Drawing.Point(557, 136);
     this.txt_creator.Name = "txt_creator";
     this.txt_creator.Size = new System.Drawing.Size(139, 21);
     this.txt_creator.TabIndex = 144;
     //
     // tabPage1
     //
     this.tabPage1.BackColor = System.Drawing.SystemColors.InactiveCaptionText;
     this.tabPage1.Controls.Add(this.groupBox4);
     this.tabPage1.Location = new System.Drawing.Point(4, 21);
     this.tabPage1.Name = "tabPage1";
     this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
     this.tabPage1.Size = new System.Drawing.Size(1038, 526);
     this.tabPage1.TabIndex = 0;
     this.tabPage1.Text = "下发材料";
     //
     // groupBox4
     //
     this.groupBox4.Controls.Add(this.groupBox2);
     this.groupBox4.Controls.Add(this.groupBox1);
     this.groupBox4.Dock = System.Windows.Forms.DockStyle.Fill;
     this.groupBox4.Location = new System.Drawing.Point(3, 3);
     this.groupBox4.Name = "groupBox4";
     this.groupBox4.Size = new System.Drawing.Size(1032, 520);
     this.groupBox4.TabIndex = 46;
     this.groupBox4.TabStop = false;
     //
     // groupBox2
     //
     this.groupBox2.Controls.Add(this.dgv1);
     this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill;
     this.groupBox2.Location = new System.Drawing.Point(3, 112);
     this.groupBox2.Name = "groupBox2";
     this.groupBox2.Size = new System.Drawing.Size(1026, 405);
     this.groupBox2.TabIndex = 43;
     this.groupBox2.TabStop = false;
     this.groupBox2.Text = "MSS材料列表";
     //
     // dgv1
     //
     this.dgv1.AllowUserToAddRows = false;
     this.dgv1.AllowUserToOrderColumns = true;
     this.dgv1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.DisplayedCells;
     this.dgv1.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.DisplayedCells;
     dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
     dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control;
     dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
     dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText;
     dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight;
     dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
     dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
     this.dgv1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle6;
     this.dgv1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
     this.dgv1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
     this.行,
     this.Ration_id,
     this.dt_qy,
     this.dt_fx,
     this.dt_zy,
     this.dt_zl,
     this.零件号,
     this.零件描述,
     this.total_qty,
     this.meo_qty,
     this.left_qty,
     this.reserved_qty,
     this.需求数量,
     this.单位,
     this.MEO_ERP,
     this.txt_drawingno,
     this.blockid,
     this.需求日期,
     this.备注,
     this.MEO_ID});
     this.dgv1.ContextMenuStrip = this.contextMenuStrip1;
     dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
     dataGridViewCellStyle15.BackColor = System.Drawing.SystemColors.Window;
     dataGridViewCellStyle15.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
     dataGridViewCellStyle15.ForeColor = System.Drawing.SystemColors.ControlText;
     dataGridViewCellStyle15.SelectionBackColor = System.Drawing.SystemColors.Highlight;
     dataGridViewCellStyle15.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
     dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
     this.dgv1.DefaultCellStyle = dataGridViewCellStyle15;
     this.dgv1.Dock = System.Windows.Forms.DockStyle.Fill;
     this.dgv1.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter;
     this.dgv1.Location = new System.Drawing.Point(3, 17);
     this.dgv1.Name = "dgv1";
     dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
     dataGridViewCellStyle16.BackColor = System.Drawing.SystemColors.Control;
     dataGridViewCellStyle16.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
     dataGridViewCellStyle16.ForeColor = System.Drawing.SystemColors.WindowText;
     dataGridViewCellStyle16.SelectionBackColor = System.Drawing.SystemColors.Highlight;
     dataGridViewCellStyle16.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
     dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
     this.dgv1.RowHeadersDefaultCellStyle = dataGridViewCellStyle16;
     this.dgv1.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.AutoSizeToAllHeaders;
     dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
     this.dgv1.RowsDefaultCellStyle = dataGridViewCellStyle17;
     this.dgv1.RowTemplate.Height = 23;
     this.dgv1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
     this.dgv1.Size = new System.Drawing.Size(1020, 385);
     this.dgv1.TabIndex = 34;
     this.dgv1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgv1_CellContentClick);
     this.dgv1.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgv1_CellDoubleClick);
     this.dgv1.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgv1_CellValueChanged);
     //
     // 行
     //
     this.行.HeaderText = "行";
     this.行.Name = "行";
     this.行.ReadOnly = true;
     this.行.Width = 42;
     //
     // Ration_id
     //
     this.Ration_id.HeaderText = "mssid";
     this.Ration_id.Name = "Ration_id";
     this.Ration_id.Visible = false;
     this.Ration_id.Width = 60;
     //
     // dt_qy
     //
     this.dt_qy.HeaderText = "区域";
     this.dt_qy.Name = "dt_qy";
     this.dt_qy.ReadOnly = true;
     this.dt_qy.Width = 51;
     //
     // dt_fx
     //
     this.dt_fx.HeaderText = "分项";
     this.dt_fx.Name = "dt_fx";
     this.dt_fx.ReadOnly = true;
     this.dt_fx.Width = 51;
     //
     // dt_zy
     //
     this.dt_zy.HeaderText = "专业";
     this.dt_zy.Name = "dt_zy";
     this.dt_zy.ReadOnly = true;
     this.dt_zy.Width = 51;
     //
     // dt_zl
     //
     this.dt_zl.HeaderText = "种类";
     this.dt_zl.Name = "dt_zl";
     this.dt_zl.ReadOnly = true;
     this.dt_zl.Width = 51;
     //
     // 零件号
     //
     this.零件号.HeaderText = "零件号";
     this.零件号.Name = "零件号";
     this.零件号.Width = 61;
     //
     // 零件描述
     //
     dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Window;
     this.零件描述.DefaultCellStyle = dataGridViewCellStyle7;
     this.零件描述.HeaderText = "零件描述";
     this.零件描述.Name = "零件描述";
     this.零件描述.ReadOnly = true;
     this.零件描述.Width = 61;
     //
     // total_qty
     //
     dataGridViewCellStyle8.ForeColor = System.Drawing.Color.Red;
     this.total_qty.DefaultCellStyle = dataGridViewCellStyle8;
     this.total_qty.HeaderText = "总申请数量";
     this.total_qty.Name = "total_qty";
     this.total_qty.ReadOnly = true;
     this.total_qty.Width = 72;
     //
     // meo_qty
     //
     dataGridViewCellStyle9.ForeColor = System.Drawing.Color.Red;
     this.meo_qty.DefaultCellStyle = dataGridViewCellStyle9;
     this.meo_qty.HeaderText = "已下发数量";
     this.meo_qty.Name = "meo_qty";
     this.meo_qty.ReadOnly = true;
     this.meo_qty.Width = 72;
     //
     // left_qty
     //
     dataGridViewCellStyle10.ForeColor = System.Drawing.Color.Red;
     this.left_qty.DefaultCellStyle = dataGridViewCellStyle10;
     this.left_qty.HeaderText = "余下申请数量";
     this.left_qty.Name = "left_qty";
     this.left_qty.ReadOnly = true;
     this.left_qty.Width = 72;
     //
     // reserved_qty
     //
     dataGridViewCellStyle11.ForeColor = System.Drawing.Color.Red;
     this.reserved_qty.DefaultCellStyle = dataGridViewCellStyle11;
     this.reserved_qty.HeaderText = "可用项目预留";
     this.reserved_qty.Name = "reserved_qty";
     this.reserved_qty.ReadOnly = true;
     this.reserved_qty.Width = 72;
     //
     // 需求数量
     //
     dataGridViewCellStyle12.ForeColor = System.Drawing.Color.Blue;
     this.需求数量.DefaultCellStyle = dataGridViewCellStyle12;
     this.需求数量.HeaderText = "需求数量";
     this.需求数量.Name = "需求数量";
     this.需求数量.Width = 61;
     //
     // 单位
     //
     dataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Window;
     this.单位.DefaultCellStyle = dataGridViewCellStyle13;
     this.单位.HeaderText = "单位";
     this.单位.Name = "单位";
     this.单位.ReadOnly = true;
     this.单位.Width = 51;
     //
     // MEO_ERP
     //
     this.MEO_ERP.HeaderText = "ERPMEO号";
     this.MEO_ERP.Name = "MEO_ERP";
     this.MEO_ERP.Width = 72;
     //
     // txt_drawingno
     //
     this.txt_drawingno.HeaderText = "图纸号";
     this.txt_drawingno.Name = "txt_drawingno";
     this.txt_drawingno.Width = 61;
     //
     // blockid
     //
     this.blockid.HeaderText = "分段号";
     this.blockid.Name = "blockid";
     this.blockid.Width = 61;
     //
     // 需求日期
     //
     dataGridViewCellStyle14.Format = "yyyy-MM-dd";
     dataGridViewCellStyle14.NullValue = null;
     this.需求日期.DefaultCellStyle = dataGridViewCellStyle14;
     this.需求日期.HeaderText = "需求日期";
     this.需求日期.Name = "需求日期";
     this.需求日期.Width = 42;
     //
     // 备注
     //
     this.备注.HeaderText = "备注";
     this.备注.Name = "备注";
     this.备注.Width = 51;
     //
     // MEO_ID
     //
     this.MEO_ID.HeaderText = "MEO_ID";
     this.MEO_ID.Name = "MEO_ID";
     this.MEO_ID.Visible = false;
     this.MEO_ID.Width = 66;
     //
     // groupBox1
     //
     this.groupBox1.Controls.Add(this.label9);
     this.groupBox1.Controls.Add(this.cmb_block);
     this.groupBox1.Controls.Add(this.label3);
     this.groupBox1.Controls.Add(this.tb_discipline);
     this.groupBox1.Controls.Add(this.tb_type);
     this.groupBox1.Controls.Add(this.cmb_discipline);
     this.groupBox1.Controls.Add(this.label6);
     this.groupBox1.Controls.Add(this.btn_select);
     this.groupBox1.Controls.Add(this.tb_fx);
     this.groupBox1.Controls.Add(this.label5);
     this.groupBox1.Controls.Add(this.tb_area);
     this.groupBox1.Controls.Add(this.label4);
     this.groupBox1.Controls.Add(this.label1);
     this.groupBox1.Controls.Add(this.button1);
     this.groupBox1.Controls.Add(this.btn_new);
     this.groupBox1.Controls.Add(this.cmb_site);
     this.groupBox1.Controls.Add(this.label14);
     this.groupBox1.Controls.Add(this.btn_del);
     this.groupBox1.Controls.Add(this.btn_save);
     this.groupBox1.Controls.Add(this.label2);
     this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top;
     this.groupBox1.Location = new System.Drawing.Point(3, 17);
     this.groupBox1.Name = "groupBox1";
     this.groupBox1.Size = new System.Drawing.Size(1026, 95);
     this.groupBox1.TabIndex = 42;
     this.groupBox1.TabStop = false;
     this.groupBox1.Text = "MSS基本信息";
     //
     // label9
     //
     this.label9.AutoSize = true;
     this.label9.ForeColor = System.Drawing.Color.Red;
     this.label9.Location = new System.Drawing.Point(511, 43);
     this.label9.Name = "label9";
     this.label9.Size = new System.Drawing.Size(11, 12);
     this.label9.TabIndex = 157;
     this.label9.Text = "*";
     //
     // cmb_block
     //
     this.cmb_block.FormattingEnabled = true;
     this.cmb_block.Location = new System.Drawing.Point(524, 41);
     this.cmb_block.Name = "cmb_block";
     this.cmb_block.Size = new System.Drawing.Size(200, 20);
     this.cmb_block.TabIndex = 156;
     //
     // label3
     //
     this.label3.AutoSize = true;
     this.label3.ForeColor = System.Drawing.Color.Red;
     this.label3.Location = new System.Drawing.Point(483, 44);
     this.label3.Name = "label3";
     this.label3.Size = new System.Drawing.Size(29, 12);
     this.label3.TabIndex = 155;
     this.label3.Text = "分段";
     //
     // tb_discipline
     //
     this.tb_discipline.BackColor = System.Drawing.Color.White;
     this.tb_discipline.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
     this.tb_discipline.ForeColor = System.Drawing.SystemColors.MenuHighlight;
     this.tb_discipline.Location = new System.Drawing.Point(524, 13);
     this.tb_discipline.Name = "tb_discipline";
     this.tb_discipline.ReadOnly = true;
     this.tb_discipline.Size = new System.Drawing.Size(200, 21);
     this.tb_discipline.TabIndex = 122;
     //
     // tb_type
     //
     this.tb_type.BackColor = System.Drawing.Color.White;
     this.tb_type.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
     this.tb_type.ForeColor = System.Drawing.SystemColors.MenuHighlight;
     this.tb_type.Location = new System.Drawing.Point(780, 13);
     this.tb_type.Name = "tb_type";
     this.tb_type.ReadOnly = true;
     this.tb_type.Size = new System.Drawing.Size(199, 21);
     this.tb_type.TabIndex = 121;
     //
     // cmb_discipline
     //
     this.cmb_discipline.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.cmb_discipline.FormattingEnabled = true;
     this.cmb_discipline.Location = new System.Drawing.Point(279, 40);
     this.cmb_discipline.Name = "cmb_discipline";
     this.cmb_discipline.Size = new System.Drawing.Size(199, 20);
     this.cmb_discipline.TabIndex = 120;
     //
     // label6
     //
     this.label6.AutoSize = true;
     this.label6.Location = new System.Drawing.Point(246, 43);
     this.label6.Name = "label6";
     this.label6.Size = new System.Drawing.Size(29, 12);
     this.label6.TabIndex = 119;
     this.label6.Text = "专业";
     //
     // btn_select
     //
     this.btn_select.Enabled = false;
     this.btn_select.Location = new System.Drawing.Point(84, 66);
     this.btn_select.Name = "btn_select";
     this.btn_select.Size = new System.Drawing.Size(75, 24);
     this.btn_select.TabIndex = 116;
     this.btn_select.Text = "查询";
     this.btn_select.UseVisualStyleBackColor = true;
     this.btn_select.Click += new System.EventHandler(this.btn_select_Click);
     //
     // tb_fx
     //
     this.tb_fx.BackColor = System.Drawing.Color.White;
     this.tb_fx.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
     this.tb_fx.ForeColor = System.Drawing.SystemColors.MenuHighlight;
     this.tb_fx.Location = new System.Drawing.Point(279, 13);
     this.tb_fx.Name = "tb_fx";
     this.tb_fx.ReadOnly = true;
     this.tb_fx.Size = new System.Drawing.Size(199, 21);
     this.tb_fx.TabIndex = 115;
     //
     // label5
     //
     this.label5.AutoSize = true;
     this.label5.Location = new System.Drawing.Point(245, 18);
     this.label5.Name = "label5";
     this.label5.Size = new System.Drawing.Size(29, 12);
     this.label5.TabIndex = 114;
     this.label5.Text = "分项";
     //
     // tb_area
     //
     this.tb_area.BackColor = System.Drawing.Color.White;
     this.tb_area.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
     this.tb_area.ForeColor = System.Drawing.SystemColors.MenuHighlight;
     this.tb_area.Location = new System.Drawing.Point(41, 13);
     this.tb_area.Name = "tb_area";
     this.tb_area.ReadOnly = true;
     this.tb_area.Size = new System.Drawing.Size(200, 21);
     this.tb_area.TabIndex = 113;
     //
     // label4
     //
     this.label4.AutoSize = true;
     this.label4.Location = new System.Drawing.Point(7, 17);
     this.label4.Name = "label4";
     this.label4.Size = new System.Drawing.Size(29, 12);
     this.label4.TabIndex = 112;
     this.label4.Text = "区域";
     //
     // label1
     //
     this.label1.AutoSize = true;
     this.label1.Location = new System.Drawing.Point(483, 16);
     this.label1.Name = "label1";
     this.label1.Size = new System.Drawing.Size(29, 12);
     this.label1.TabIndex = 111;
     this.label1.Text = "专业";
     //
     // button1
     //
     this.button1.Location = new System.Drawing.Point(234, 66);
     this.button1.Name = "button1";
     this.button1.Size = new System.Drawing.Size(75, 24);
     this.button1.TabIndex = 108;
     this.button1.Text = "关闭";
     this.button1.UseVisualStyleBackColor = true;
     this.button1.Click += new System.EventHandler(this.button1_Click);
     //
     // btn_new
     //
     this.btn_new.Location = new System.Drawing.Point(309, 66);
     this.btn_new.Name = "btn_new";
     this.btn_new.Size = new System.Drawing.Size(75, 24);
     this.btn_new.TabIndex = 68;
     this.btn_new.Text = "清空";
     this.btn_new.UseVisualStyleBackColor = true;
     this.btn_new.Visible = false;
     //
     // cmb_site
     //
     this.cmb_site.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.cmb_site.FormattingEnabled = true;
     this.cmb_site.Location = new System.Drawing.Point(41, 40);
     this.cmb_site.Name = "cmb_site";
     this.cmb_site.Size = new System.Drawing.Size(200, 20);
     this.cmb_site.TabIndex = 66;
     //
     // label14
     //
     this.label14.AutoSize = true;
     this.label14.Location = new System.Drawing.Point(6, 44);
     this.label14.Name = "label14";
     this.label14.Size = new System.Drawing.Size(17, 12);
     this.label14.TabIndex = 65;
     this.label14.Text = "域";
     //
     // btn_del
     //
     this.btn_del.Location = new System.Drawing.Point(159, 66);
     this.btn_del.Name = "btn_del";
     this.btn_del.Size = new System.Drawing.Size(75, 24);
     this.btn_del.TabIndex = 64;
     this.btn_del.Text = "导出";
     this.btn_del.UseVisualStyleBackColor = true;
     this.btn_del.Click += new System.EventHandler(this.btn_del_Click);
     //
     // btn_save
     //
     this.btn_save.Enabled = false;
     this.btn_save.Location = new System.Drawing.Point(9, 66);
     this.btn_save.Name = "btn_save";
     this.btn_save.Size = new System.Drawing.Size(75, 24);
     this.btn_save.TabIndex = 61;
     this.btn_save.Text = "保存";
     this.btn_save.UseVisualStyleBackColor = true;
     this.btn_save.Click += new System.EventHandler(this.btn_save_Click);
     //
     // label2
     //
     this.label2.AutoSize = true;
     this.label2.Location = new System.Drawing.Point(739, 17);
     this.label2.Name = "label2";
     this.label2.Size = new System.Drawing.Size(29, 12);
     this.label2.TabIndex = 42;
     this.label2.Text = "种类";
     //
     // tabControl1
     //
     this.tabControl1.Controls.Add(this.tabPage1);
     this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
     this.tabControl1.Location = new System.Drawing.Point(0, 25);
     this.tabControl1.Name = "tabControl1";
     this.tabControl1.SelectedIndex = 0;
     this.tabControl1.Size = new System.Drawing.Size(1046, 551);
     this.tabControl1.TabIndex = 7;
     this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged);
     this.tabControl1.TabIndexChanged += new System.EventHandler(this.tabControl1_TabIndexChanged);
     //
     // MaterialRation
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize = new System.Drawing.Size(1046, 576);
     this.Controls.Add(this.tabControl1);
     this.Controls.Add(this.toolStrip1);
     this.Name = "MaterialRation";
     this.Text = "材料下发页面";
     this.Load += new System.EventHandler(this.MaterialRationAdd_Load);
     this.toolStrip1.ResumeLayout(false);
     this.toolStrip1.PerformLayout();
     this.contextMenuStrip1.ResumeLayout(false);
     this.tabPage1.ResumeLayout(false);
     this.groupBox4.ResumeLayout(false);
     this.groupBox2.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.dgv1)).EndInit();
     this.groupBox1.ResumeLayout(false);
     this.groupBox1.PerformLayout();
     this.tabControl1.ResumeLayout(false);
     this.ResumeLayout(false);
     this.PerformLayout();
 }
コード例 #27
0
 private void AddActualDatesColoumn()
 {
     CalendarColumn c = new CalendarColumn();
     FlightGridView.Columns.Add(c);
 }
コード例 #28
0
        public static DataGridViewColumn CreateDataGridViewColumn(RuleColumn rcolumn)
        {
            if (rcolumn == null)
            {
                return(null);
            }

            DataGridViewColumn gcolumn = null;

            switch (rcolumn.DataType)
            {
            case DataTypes.dtBoolean:
                gcolumn = new DataGridViewCheckBoxColumn();
                break;

            case DataTypes.dtDateTime:
                gcolumn = new CalendarColumn("yyyy-MM-dd HH:mm:ss");
                break;

            case DataTypes.dtDate:
                gcolumn = new CalendarColumn("yyyy-MM-dd");
                break;

            case DataTypes.dtTime:
                gcolumn = new CalendarColumn("HH:mm:ss");
                break;

            case DataTypes.dtBLOB:
                gcolumn = new DataGridViewImageColumn();
                break;

            default:
                if (rcolumn.HasMapInfo)
                {
                    DataMap dm = SystemContext.MapManager.FromMapInfo(rcolumn.MapInfo);
                    if (dm != null)
                    {
                        DataTable mtable = dm.GetMapTable(rcolumn.GetLocalType());
                        if (mtable != null && mtable.Rows.Count > 0)
                        {
                            gcolumn = new DataGridViewComboBoxColumn();
                            DataGridViewComboBoxCell combboxcell = gcolumn.CellTemplate as DataGridViewComboBoxCell;
                            if (combboxcell != null)
                            {
                                combboxcell.DataSource    = mtable;
                                combboxcell.ValueMember   = "Key";
                                combboxcell.DisplayMember = "Value";
                            }
                        }
                    }
                }
                else if (rcolumn.HasMask)
                {
                    gcolumn = new MaskedTextBoxColumn(rcolumn.Mask);
                }
                else
                {
                    switch (rcolumn.UiCtrOpt)
                    {
                    case UICtrOpt.TextButton:
                        gcolumn = new TextBoxButtonColumn();
                        break;

                    default:
                        gcolumn = new DataGridViewTextBoxColumn();
                        break;
                    }
                }
                break;
            }

            if (gcolumn == null)
            {
                gcolumn = new DataGridViewTextBoxColumn();
            }

            gcolumn.Name             = rcolumn.ColumnName;
            gcolumn.HeaderText       = rcolumn.Label;
            gcolumn.DataPropertyName = rcolumn.ColumnName;
            gcolumn.Width            = rcolumn.Width;
            gcolumn.Visible          = rcolumn.ListCtrlVision; //rcolumn.Visible;
            gcolumn.SortMode         = DataGridViewColumnSortMode.Automatic;

            if (rcolumn.HasDisplayFormat)
            {
                gcolumn.CellTemplate.Style.Format = rcolumn.DisplayFormat;
            }

            if (gcolumn.Visible && gcolumn.Width < 100)
            {
                if (gcolumn.Width == 0)
                {
                    gcolumn.AutoSizeMode = DataGridViewAutoSizeColumnMode.ColumnHeader;
                }
                else
                {
                    gcolumn.Width = 100;
                }
            }

            return(gcolumn);
        }
コード例 #29
0
        public void listviewBind(string sql)
        {
            //���IJ������������Լ�����

            ds = PartParameter.QueryPartPara(sql);
            dgv1.DataSource = ds.Tables[0].DefaultView;
            DataGridViewComboBoxColumn dgvcom = new DataGridViewComboBoxColumn();
            DataSet blockds = PartParameter.QueryPartPara("select block_id,description from project_block_tab where project_id=" + ecprojectid.ToString()+" order by description");
            DataRow rowdim = blockds.Tables[0].NewRow();
            rowdim[0]=1;
            blockds.Tables[0].Rows.InsertAt(rowdim, 0);
            dgvcom.DataSource = blockds.Tables[0].DefaultView;
            dgvcom.DisplayMember = "description";
            dgvcom.ValueMember = "description";
            dgvcom.HeaderText="�ֶ�";
            dgvcom.Name = "�ֶ�";
            dgvcom.ReadOnly= false;
            CalendarColumn dgvcal = new CalendarColumn();
            dgvcal.HeaderText = "Ԥ������";
            dgvcal.Name = "Ԥ������";

            //DateColumn dgvcaln = new DateColumn();
            //dgvcaln.HeaderText = "������";
            if (!dgv1.Columns.Contains("Ԥ������"))
            {
                //dgv1.Columns.Add(dgvcom);
                //dgv1.Columns.Add(dgvcal);
                //dgv1.Columns.Add(dgvcaln);
                //dgv1.Columns["Ԥ������"].Width = 200;
            }
            dgv1.Columns["Ԥ����"].Width = 100;
            //dgv1.Columns["�ֶ�"].Width = 100;
            dgv1.Columns["Ԥ����"].ValueType = typeof(double);
            dgv1.Columns["��"].ReadOnly = true;
            dgv1.Columns["���"].ReadOnly = true;
            dgv1.Columns["�����"].ReadOnly = true;
            dgv1.Columns["������"].ReadOnly = true;
            dgv1.Columns["������"].ReadOnly = true;
            dgv1.Columns["����"].ReadOnly = true;
            dgv1.Columns["֤��"].ReadOnly = true;
            dgv1.Columns["��λ"].ReadOnly = true;
            dgv1.Columns["�ܶȵ�λ"].ReadOnly = true;
            dgv1.Columns["�ȼ�"].ReadOnly = true;
            dgv1.Columns["��λ�ܶ�"].ReadOnly = true;
            dgv1.Columns["parentid"].Visible = false;
            #region �����е�ֻ����
            //int specnum = PartParameter.GetSpecCou(activity);
            //if (specnum != 0)
            //{
            //    if (specnum > 0)
            //    {
            //        string colstr = PartParameter.GetSpecName(activity, "1").Trim();
            //        dgv1.Columns[colstr].ReadOnly = true;
            //    }
            //    if (specnum > 1)
            //    {
            //        string colstr = PartParameter.GetSpecName(activity, "2").Trim();
            //        dgv1.Columns[colstr].ReadOnly = true;
            //    }
            //    if (specnum > 2)
            //    {
            //        string colstr = PartParameter.GetSpecName(activity, "3").Trim();
            //        dgv1.Columns[colstr].ReadOnly = true;
            //    }
            //    if (specnum > 3)
            //    {
            //        string colstr = PartParameter.GetSpecName(activity, "4").Trim();
            //        dgv1.Columns[colstr].ReadOnly = true;
            //    }
            //}
            #endregion

            #region �������ù���Ԥ��ֵ������
            //if (dgv1.RowCount != 0)
            //{
            //    List<PartParameter> pp = PartParameter.FindPartList(systemid,mmtypeid, ProjectId,LoginUser,1);
            //    //if (pp.Count != 0)
            //    // {
            //    for (int i = 0; i < dgv1.Rows.Count; i++)
            //    {

            //        int partid = int.Parse(dgv1.Rows[i].Cells["���"].Value.ToString());
            //        PartParameter pone = pp.Find(delegate(PartParameter bb) { return bb.ID == partid; });
            //        if (pone != null)
            //        {
            //            dgv1.Rows[i].Cells["Ԥ����"].Value = pone.PREDICTION_QTY;
            //            //DataGridViewComboBoxCell combo = new DataGridViewComboBoxCell();

            //            dgv1.Rows[i].Cells["Ԥ��ϵ��"].Value = pone.PREDICTION_ALERT;
            //            if (pone.BLOCKID != "0")
            //            {
            //                dgv1.Rows[i].Cells["����"].Value = pone.CREATEDATE;
            //                dgv1.Rows[i].Cells["�ֶ�"].Value = pone.BLOCKID;
            //                //DataGridViewComboBoxCell combo = dgv1.Rows[i].Cells["�ֶ�"] as DataGridViewComboBoxCell;
            //                //combo.DataSource = blockds.Tables[0];
            //                //combo.DisplayMember = "description";
            //                //combo.ValueMember = "block_id";
            //                //combo.Value = pone.BLOCKID;
            //            }
            //        }
            //        else
            //        {
            //            dgv1.Rows[i].Cells["Ԥ����"].Value = 0;
            //            dgv1.Rows[i].Cells["Ԥ��ϵ��"].Value = 0;
            //        }

            //    }
            //    //}
            //}
            #endregion
        }
コード例 #30
0
        private void But_connect_Click(object sender, EventArgs e)
        {
            connection = new SqlConnection(connectString);
            connection.Open();
            //MessageBox.Show(connection.State.ToString());

            ds = new DataSet("Northwind");

            SqlCommand command;

            daState = new SqlDataAdapter();
            command = new SqlCommand("Select * From State", connection);
            daState.SelectCommand = command;

            dtState = ds.Tables.Add("State");
            daState.Fill(dtState);


            daCustomer = new SqlDataAdapter();

            // - SELECT
            command = new SqlCommand("Select ':)' as Etykieta,* From Customer", connection);
            daCustomer.SelectCommand = command;
            // - INSERT
            command = new SqlCommand("INSERT INTO Customer (FirstName,LastName,Address,City,State,ZipCode,AccountNumber) VALUES (@FirstName,@LastName,@Address,@City,@State,@ZipCode,@AccountNumber)", connection);
            //command.Parameters.Add("@id", SqlDbType.Int, 0, "id");
            command.Parameters.Add("@FirstName", SqlDbType.NVarChar, 40, "FirstName");
            command.Parameters.Add("@LastName", SqlDbType.NVarChar, 40, "LastName");
            command.Parameters.Add("@Address", SqlDbType.NVarChar, 40, "Address");
            command.Parameters.Add("@City", SqlDbType.NVarChar, 40, "City");
            command.Parameters.Add("@State", SqlDbType.NVarChar, 40, "State");
            command.Parameters.Add("@ZipCode", SqlDbType.NVarChar, 40, "ZipCode");
            command.Parameters.Add("@AccountNumber", SqlDbType.NVarChar, 40, "AccountNumber");
            daCustomer.InsertCommand = command;
            // - UPDATE
            command = new SqlCommand("UPDATE Customer SET FirstName = @FirstName, LastName = @LastName, Address = @Address, City = @City, State = @State, ZipCode = @ZipCode, AccountNumber = @AccountNumber WHERE id = @oldid", connection);
            //command.Parameters.Add("@id", SqlDbType.NChar, 5, "id");
            command.Parameters.Add("@FirstName", SqlDbType.NVarChar, 40, "FirstName");
            command.Parameters.Add("@LastName", SqlDbType.NVarChar, 40, "LastName");
            command.Parameters.Add("@Address", SqlDbType.NVarChar, 40, "Address");
            command.Parameters.Add("@City", SqlDbType.NVarChar, 40, "City");
            command.Parameters.Add("@State", SqlDbType.NVarChar, 40, "State");
            command.Parameters.Add("@ZipCode", SqlDbType.NVarChar, 40, "ZipCode");
            command.Parameters.Add("@AccountNumber", SqlDbType.NVarChar, 40, "AccountNumber");
            SqlParameter parameter = command.Parameters.Add("@oldid", SqlDbType.Int, 0, "id");

            parameter.SourceVersion  = DataRowVersion.Original;
            daCustomer.UpdateCommand = command;
            // - DELETE
            command = new SqlCommand("DELETE FROM Customer WHERE id = @id", connection);
            // Add the parameters for the DeleteCommand.
            parameter = command.Parameters.Add("@id", SqlDbType.Int, 0, "id");
            parameter.SourceVersion  = DataRowVersion.Original;
            daCustomer.DeleteCommand = command;

            dtCustomer = ds.Tables.Add("Customer");
            daCustomer.Fill(dtCustomer);

            bsCustomer            = new BindingSource();
            bsCustomer.DataSource = dtCustomer;
            //bsCustomer.CurrentChanged += new EventHandler(Current_Changed);

            GridCustomer.AutoSize           = false;
            GridCustomer.DataSource         = bsCustomer;
            NavigatorCustomer.BindingSource = bsCustomer;

            GridCustomer.Use(p =>
            {
                p.ColumnHeadersDefaultCellStyle.Font      = new Font("Tahoma", 9, FontStyle.Bold);
                p.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black;
                p.ColumnHeadersDefaultCellStyle.BackColor = Color.Yellow;
                p.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.TopLeft;
                p.EnableHeadersVisualStyles = false;
                p.AutoGenerateColumns       = false;
                p.Columns.Clear();
                int iCol;
                iCol = p.Columns.Add("col_FirstName", "Imię");
                p.Columns[iCol].DataPropertyName = "FirstName";
                iCol = p.Columns.Add("col_LastName", "Nazwisko");
                p.Columns[iCol].DataPropertyName = "LastName";
                iCol = p.Columns.Add("col_Address", "Ulica");
                p.Columns[iCol].DataPropertyName = "Address";
                iCol = p.Columns.Add("col_City", "Miejscowość");
                p.Columns[iCol].DataPropertyName = "City";

                //iCol = p.Columns.Add("col_State", "Województwo");
                //p.Columns[iCol].DataPropertyName = "State";

                DataGridViewComboBoxColumn cb = new DataGridViewComboBoxColumn();
                cb.HeaderText       = "Województwo";
                cb.DataPropertyName = "State";
                cb.Name             = "col_State";
                cb.MaxDropDownItems = 4;
                cb.DisplayStyle     = DataGridViewComboBoxDisplayStyle.Nothing;
                //cb.Items.Add("Śląskie");
                //cb.Items.Add("Małopolskie");
                cb.DataSource    = dtState;
                cb.ValueMember   = "name";
                cb.DisplayMember = "name";
                p.Columns.Add(cb);

                iCol = p.Columns.Add("col_ZipCode", "Kod pocztowy");
                p.Columns[iCol].DataPropertyName = "ZipCode";
                iCol = p.Columns.Add("col_AccountNumber", "Nr konta");
                p.Columns[iCol].DataPropertyName = "AccountNumber";
                //p.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
            });

            daOrder = new SqlDataAdapter();
            // - SELECT
            command = new SqlCommand("Select * From Orders", connection);
            daOrder.SelectCommand = command;
            // - INSERT
            command = new SqlCommand("INSERT INTO ORDERS (CustomerId,OrderDate,Invoice,Paymend,Price) VALUES (@CustomerId,@OrderDate,@Invoice,@Paymend,@Price)", connection);
            command.Parameters.Add("@CustomerId", SqlDbType.Int, 0, "CustomerId");
            command.Parameters.Add("@OrderDate", SqlDbType.Date, 0, "OrderDate");
            command.Parameters.Add("@Invoice", SqlDbType.NVarChar, 100, "Invoice");
            command.Parameters.Add("@Paymend", SqlDbType.Int, 0, "Paymend");
            command.Parameters.Add("@Price", SqlDbType.Money, 0, "Price");
            daOrder.InsertCommand = command;
            // - UPDATE
            command = new SqlCommand("UPDATE ORDERS SET OrderDate = @OrderDate, Invoice = @Invoice, Paymend = @Paymend, Price = @Price WHERE id = @oldid", connection);
            command.Parameters.Add("@OrderDate", SqlDbType.Date, 0, "OrderDate");
            command.Parameters.Add("@Invoice", SqlDbType.NVarChar, 100, "Invoice");
            command.Parameters.Add("@Paymend", SqlDbType.Int, 0, "Paymend");
            command.Parameters.Add("@Price", SqlDbType.Money, 0, "Price");
            parameter = command.Parameters.Add("@oldid", SqlDbType.Int, 0, "id");
            parameter.SourceVersion = DataRowVersion.Original;
            daOrder.UpdateCommand   = command;
            // - DELETE
            command = new SqlCommand("DELETE FROM ORDERS WHERE id = @id", connection);
            // Add the parameters for the DeleteCommand.
            parameter = command.Parameters.Add("@id", SqlDbType.Int, 0, "id");
            parameter.SourceVersion = DataRowVersion.Original;
            daOrder.DeleteCommand   = command;

            dtOrder = ds.Tables.Add("Orders");
            daOrder.Fill(dtOrder);

            DataRelation relCustOrder = new DataRelation("CustomersOrders", dtCustomer.Columns["id"], dtOrder.Columns["customerID"]);

            // Add the relation to the DataSet.
            ds.Relations.Add(relCustOrder);

            bsOrder            = new BindingSource();
            bsOrder.DataSource = bsCustomer;
            bsOrder.DataMember = "CustomersOrders";

            // --
            NavigatorOrder.BindingSource = bsOrder;

            GridOrder.Use(p =>
            {
                p.DataSource = bsOrder;
                p.AutoSize   = false;
                p.ColumnHeadersDefaultCellStyle.Font      = new Font("Tahoma", 9, FontStyle.Bold);
                p.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black;
                p.ColumnHeadersDefaultCellStyle.BackColor = Color.Yellow;
                p.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.TopLeft;
                p.EnableHeadersVisualStyles = false;
                p.AutoGenerateColumns       = false;
                p.Columns.Clear();
                //p.Columns.Add("OrderDate", "Data zamówienia");
                DataGridViewColumn col1 = new DataGridViewTextBoxColumn();
                col1.DataPropertyName   = "Invoice";
                col1.Name       = "Invoice";
                col1.HeaderText = "Nr paragonu";
                col1.ValueType  = typeof(string);
                p.Columns.Add(col1);
                col1.Dispose();
                //DataGridViewColumn col2 = new DataGridViewTextBoxColumn();
                CalendarColumn col2   = new CalendarColumn();
                col2.DataPropertyName = "OrderDate";
                col2.Name             = "OrderDate";
                col2.HeaderText       = "Data zamówienia";
                col2.ValueType        = typeof(DateTime);
                p.Columns.Add(col2);
                col2.Dispose();
                DataGridViewCheckBoxColumn chbox = new DataGridViewCheckBoxColumn();
                chbox.DataPropertyName           = "Paymend";
                chbox.Name       = "Paymend";
                chbox.HeaderText = "Czy zapłacone";
                chbox.ValueType  = typeof(int);
                p.Columns.Add(chbox);

                DataGridViewTextBoxColumn col4 = new DataGridViewTextBoxColumn();
                col4.DataPropertyName          = "Price";
                col4.Name       = "Price";
                col4.HeaderText = "Kwota";
                col4.ValueType  = typeof(float);
                col4.DefaultCellStyle.Format = "c";
                p.Columns.Add(col4);

                DataGridViewImageColumn img = new DataGridViewImageColumn();
                img.Name           = "Image";
                img.HeaderText     = "Ikona";
                img.ValuesAreIcons = true;
                p.Columns.Add(img);
            });
            ControlsStat();
        }
コード例 #31
0
ファイル: frmCartera.cs プロジェクト: jenesepas/csharp
        private void consultaDatos(string codigoClienteConsulta)
        {
            #region " Creamos la tabla del datagridview que contendrá los datos "

            DataGridViewColumn columnaDgw;

            columnaDgw            = new DataGridViewTextBoxColumn();
            columnaDgw.HeaderText = "Id";
            columnaDgw.Name       = "Id";
            columnaDgw.Resizable  = DataGridViewTriState.False;
            columnaDgw.Width      = 100;
            this.dgvRejillaDatos.Columns.Add(columnaDgw);

            columnaDgw            = new DataGridViewTextBoxColumn();
            columnaDgw.HeaderText = "Factura";
            columnaDgw.Name       = "Factura";
            columnaDgw.Resizable  = DataGridViewTriState.False;
            columnaDgw.Width      = 100;
            this.dgvRejillaDatos.Columns.Add(columnaDgw);

            columnaDgw            = new DataGridViewTextBoxColumn();
            columnaDgw.HeaderText = "Fecha";
            columnaDgw.Name       = "Fecha";
            columnaDgw.Resizable  = DataGridViewTriState.False;
            columnaDgw.Width      = 100;
            this.dgvRejillaDatos.Columns.Add(columnaDgw);

            columnaDgw            = new DataGridViewTextBoxColumn();
            columnaDgw.HeaderText = "Cliente";
            columnaDgw.Name       = "Cliente";
            columnaDgw.Resizable  = DataGridViewTriState.False;
            columnaDgw.Width      = 300;
            this.dgvRejillaDatos.Columns.Add(columnaDgw);

            columnaDgw            = new DataGridViewTextBoxColumn();
            columnaDgw.HeaderText = "Importe";
            columnaDgw.Name       = "Importe";
            columnaDgw.Resizable  = DataGridViewTriState.False;
            columnaDgw.Width      = 100;
            this.dgvRejillaDatos.Columns.Add(columnaDgw);

            columnaDgw            = new CalendarColumn();
            columnaDgw.HeaderText = "Fec.Anotación";
            columnaDgw.Name       = "Fec.Anotación";
            columnaDgw.Resizable  = DataGridViewTriState.False;
            columnaDgw.Width      = 100;
            this.dgvRejillaDatos.Columns.Add(columnaDgw);

            columnaDgw            = new DataGridViewTextBoxColumn();
            columnaDgw.HeaderText = "Anotación";
            columnaDgw.Name       = "Anotación";
            columnaDgw.Resizable  = DataGridViewTriState.False;
            columnaDgw.Width      = 100;
            this.dgvRejillaDatos.Columns.Add(columnaDgw);

            columnaDgw            = new DataGridViewCheckBoxColumn();
            columnaDgw.HeaderText = "Punteado";
            columnaDgw.Name       = "Punteado";
            columnaDgw.Resizable  = DataGridViewTriState.False;
            columnaDgw.Width      = 80;
            this.dgvRejillaDatos.Columns.Add(columnaDgw);

            #endregion

            // La primera columna, que es la que tiene el Id, no debe ser visible.
            this.dgvRejillaDatos.Columns[0].Visible = false;

            #region " Realizamos las consultas pertinentes "

            decimal idCliente;
            string  codigoCliente;
            string  nombreCliente;
            //decimal idCobro;
            decimal idFacturaVenta;
            string  factura;
            string  fechaFactura;
            string  importe;
            string  fechaAnotacion = "";
            string  anotacion      = "";
            decimal punteado       = 0;

            // Variables de trabajo.
            decimal ejercicio        = 0;
            decimal serie            = 0;
            decimal numero           = 0;
            decimal variableTemporal = 0;
            int     indiceRegistro   = 0;
            string  consultaCobros   = "select * from Cobros";

            //if (codigoClienteConsulta == "*")
            //{
            //    consultaCobros = "select * from Cobros";
            //}
            //else
            //{
            //    consultaCobros = "select * from Cobros where IdCliente = '" + codigoClienteConsulta + "'";
            //}

            // Obtenemos los datos guardados en el fichero cp.
            //this.tablaConsulta.Clear();
            //Kripto.CargaDatos(this.tablaConsulta);

            // Recogemos todos los datos de cobros y los respasamos para ir montando la tabla a mostrar.
            //sql.ConsultarSQL(consultaCobros, this.tablaCobros, false);
            //for (int a = 0; a != this.tablaCobros.Rows.Count; a++)
            //{
            //    // Obtenemos la factura.
            //    ejercicio = Convert.ToDecimal(this.tablaCobros.Rows[a].ItemArray[5]);
            //    serie = Convert.ToDecimal(this.tablaCobros.Rows[a].ItemArray[6]);
            //    numero = Convert.ToDecimal(this.tablaCobros.Rows[a].ItemArray[7]);
            //    factura = ejercicio + "-" + string.Format("{0:00}", serie) + "-" + string.Format("{0:000000}", numero);
            //    // Obtenemos la fecha de la factura.
            //    fechaFactura = Convert.ToDateTime(this.tablaCobros.Rows[a].ItemArray[8]).ToShortDateString();
            //    // Obtenemos el importe del descuento.
            //    variableTemporal = Convert.ToDecimal(this.tablaCobros.Rows[a].ItemArray[19]);
            //    importe = string.Format("{0:C}", variableTemporal);

            //    // Obtenemos el idFacturaVenta.
            //    idFacturaVenta = Convert.ToDecimal(this.tablaCobros.Rows[a].ItemArray[3]);
            //    // Obtenemos el id del cliente para pintar su nombre.
            //    idCliente = Convert.ToDecimal(this.tablaCobros.Rows[a].ItemArray[10]);
            //    sql.ConsultarSQL("select * from Clientes where Id = '" + idCliente + "'", this.tablaClientes, false);
            //    // Obtenemos el código del cliente.
            //    codigoCliente = Convert.ToString(this.tablaClientes.Rows[0].ItemArray[3]);
            //    // Obtenemos el nombre del cliente.
            //    nombreCliente = Convert.ToString(this.tablaClientes.Rows[0].ItemArray[8]);

            // Insertamos un nuevo registro.
            this.dgvRejillaDatos.Rows.Add();

            this.configuraDataGridView(indiceRegistro, false);

            // Rellenamos los datos del nuevo registro creado.
            this.dgvRejillaDatos.Rows[indiceRegistro].Cells["Id"].Value = 0;                      // idFacturaVenta;

            this.dgvRejillaDatos.Rows[indiceRegistro].Cells["Factura"].Value = "100";             //factura;

            this.dgvRejillaDatos.Rows[indiceRegistro].Cells["Fecha"].Value = "10/10/2015";        // fechaFactura;

            this.dgvRejillaDatos.Rows[indiceRegistro].Cells["Cliente"].Value = "Nombre Cliente "; // codigoCliente + " " + nombreCliente;

            this.dgvRejillaDatos.Rows[indiceRegistro].Cells["Importe"].Value = "1200";            // importe;

            this.dgvRejillaDatos.Rows[indiceRegistro].Cells["Fec.Anotación"].Value = "";          // fechaAnotacion;

            this.dgvRejillaDatos.Rows[indiceRegistro].Cells["Anotación"].Value = "120";           // anotacion;

            this.dgvRejillaDatos.Rows[indiceRegistro].Cells["Punteado"].Value = punteado;

            // Incrementamos el indiceRegistro para que apunte bien al registro correspondiente de la rejilla.
            indiceRegistro++;

            //    // Insertamos las líneas correspondientes a las anotaciones.
            //    // Esto sale del fichero cp
            //    if (tablaConsulta.Rows.Count > 0)
            //    {
            //        tablaConsulta.DefaultView.RowFilter = "IdFactura = " + idFacturaVenta;
            //        DataView vista = tablaConsulta.DefaultView;

            //        for (int b = 0; b != vista.Count; b++)
            //        {
            //            this.dgvRejillaDatos.Rows.Add();

            //            this.configuraDataGridView(indiceRegistro, true);

            //            // Rellenamos los datos del nuevo registro creado.
            //            this.dgvRejillaDatos.Rows[indiceRegistro].Cells["Id"].Value = vista[b].Row.ItemArray[0];
            //            this.dgvRejillaDatos.Rows[indiceRegistro].Cells["Factura"].Value = "";
            //            this.dgvRejillaDatos.Rows[indiceRegistro].Cells["Fecha"].Value = "";
            //            this.dgvRejillaDatos.Rows[indiceRegistro].Cells["Cliente"].Value = "";
            //            this.dgvRejillaDatos.Rows[indiceRegistro].Cells["Importe"].Value = "";
            //            this.dgvRejillaDatos.Rows[indiceRegistro].Cells["Fec.Anotación"].Value = vista[b].Row.ItemArray[3];
            //            this.dgvRejillaDatos.Rows[indiceRegistro].Cells["Anotación"].Value = vista[b].Row.ItemArray[4];
            //            this.dgvRejillaDatos.Rows[indiceRegistro].Cells["Punteado"].Value = Convert.ToInt32(vista[b].Row.ItemArray[5]);

            //            // Incrementamos el indiceRegistro para que apunte bien al registro correspondiente de la rejilla.
            //            indiceRegistro++;
            //        }
            //    }
            //}

            #endregion
        }
コード例 #32
0
        private void ResizeGridArticulos()
        {
            //bisCaducidad.DataSource = new List<EntradaDetalle>();
            dgvEntradaCaducidad.AutoGenerateColumns = false;
            dgvEntradaCaducidad.AllowUserToAddRows = true;
            //dgvArticulos0.AutoSize = true;

            DataGridViewColumn column = new DataGridViewTextBoxColumn
            {
                DataPropertyName = "NoLote",
                Name = "No. Lote",
                Width = 200,
                SortMode = DataGridViewColumnSortMode.NotSortable,
                Resizable = DataGridViewTriState.False,
                MaxInputLength = 18
            };
            dgvEntradaCaducidad.Columns.Add(column);

            column = new DataGridViewTextBoxColumn
            {
                DataPropertyName = "Cantidad",
                Name = "Cantidad",
                Width = 60,
                SortMode = DataGridViewColumnSortMode.NotSortable,
                Resizable = DataGridViewTriState.False,
                DefaultCellStyle = { Alignment = DataGridViewContentAlignment.MiddleRight }
            };
            dgvEntradaCaducidad.Columns.Add(column);

            column = new CalendarColumn()
            {
                DataPropertyName = "FechaCaducidad",
                Name = "Caducidad",
                Width = 120,
                SortMode = DataGridViewColumnSortMode.NotSortable,
                Resizable = DataGridViewTriState.False,
            };
            dgvEntradaCaducidad.Columns.Add(column);

            column = new DataGridViewTextBoxColumn
            {
                DataPropertyName = "IdEntradaDetalle",
                Name = "IdEntradaDetalle",
                Width = 0,
                SortMode = DataGridViewColumnSortMode.NotSortable,
                Resizable = DataGridViewTriState.False,
            };
            dgvEntradaCaducidad.Columns.Add(column);

            dgvEntradaCaducidad.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
        }
コード例 #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.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
     this.nameColumn           = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.assignmentDateColumn = new Gradebook.View.Calendar.CalendarColumn();
     this.dueDateColumn        = new Gradebook.View.Calendar.CalendarColumn();
     this.pointsColumn         = new System.Windows.Forms.DataGridViewTextBoxColumn();
     ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
     this.SuspendLayout();
     //
     // nameColumn
     //
     this.nameColumn.DataPropertyName = "Name";
     this.nameColumn.HeaderText       = "Name";
     this.nameColumn.Name             = "nameColumn";
     this.nameColumn.Width            = 60;
     //
     // assignmentDateColumn
     //
     this.assignmentDateColumn.DataPropertyName = "AssignmentDate";
     dataGridViewCellStyle3.Format = "mm/dd/yy";
     this.assignmentDateColumn.DefaultCellStyle = dataGridViewCellStyle3;
     this.assignmentDateColumn.HeaderText       = "Assignment Date";
     this.assignmentDateColumn.Name             = "assignmentDateColumn";
     this.assignmentDateColumn.Width            = 103;
     //
     // dueDateColumn
     //
     this.dueDateColumn.DataPropertyName = "DueDate";
     dataGridViewCellStyle4.Format       = "mm/dd/yy";
     this.dueDateColumn.DefaultCellStyle = dataGridViewCellStyle4;
     this.dueDateColumn.HeaderText       = "Due Date";
     this.dueDateColumn.Name             = "dueDateColumn";
     this.dueDateColumn.Width            = 72;
     //
     // pointsColumn
     //
     this.pointsColumn.DataPropertyName = "Points";
     this.pointsColumn.HeaderText       = "Points";
     this.pointsColumn.Name             = "pointsColumn";
     this.pointsColumn.Width            = 61;
     //
     // AssignmentGrid
     //
     this.AllowUserToOrderColumns     = true;
     this.AutoGenerateColumns         = false;
     this.AutoSizeColumnsMode         = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;
     this.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
     this.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
         this.nameColumn,
         this.assignmentDateColumn,
         this.dueDateColumn,
         this.pointsColumn
     });
     this.CellEndEdit     += new System.Windows.Forms.DataGridViewCellEventHandler(this.AssignmentGrid_CellEndEdit);
     this.UserDeletedRow  += new System.Windows.Forms.DataGridViewRowEventHandler(this.AssignmentGrid_UserDeletedRow);
     this.UserDeletingRow += new System.Windows.Forms.DataGridViewRowCancelEventHandler(this.AssignmentGrid_UserDeletingRow);
     ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
     this.ResumeLayout(false);
 }
コード例 #34
0
ファイル: BetterGrid.cs プロジェクト: jwickberg/libpalaso
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Creates a calendar control grid column that hosts calendar (date) cells.
		/// </summary>
		/// ------------------------------------------------------------------------------------
		public static DataGridViewColumn CreateCalendarControlColumn(string name, string headerText,
			Func<DateTime> getDefaultValue, CalendarCell.UserAction whenToUseDefault)
		{
			var col = new CalendarColumn(getDefaultValue, whenToUseDefault);
			col.HeaderCell.Style.Font = SystemFonts.MenuFont;
			col.Name = name;
			col.HeaderText = headerText;

			return col;
		}
コード例 #35
0
            private static void buildTheColumns()
            {
                // idColumn
                idCol                  = new DataGridViewTextBoxColumn();
                idCol.Name             = LINE_ID_NAME;
                idCol.HeaderText       = "id";
                idCol.DataPropertyName = "id";
                idCol.Visible          = false;

                // transactionIDColumn
                transactionIDCol                  = new DataGridViewTextBoxColumn();
                transactionIDCol.Name             = TRANSACTION_ID_NAME;
                transactionIDCol.HeaderText       = "transactionID";
                transactionIDCol.DataPropertyName = "transactionID";
                transactionIDCol.Visible          = false;

                // dateColumn
                dateCol                  = new CalendarColumn();
                dateCol.Name             = DATE_NAME;
                dateCol.HeaderText       = "Date";
                dateCol.DataPropertyName = "date";
                dateCol.SortMode         = DataGridViewColumnSortMode.NotSortable;
                dateCol.Resizable        = DataGridViewTriState.True;
                dateCol.Visible          = true;
                dateCol.Width            = 85;

                // typeIDColumn
                lineTypeCol                  = new DataGridViewComboBoxColumn();
                lineTypeCol.Name             = LINE_TYPE_ID_NAME;
                lineTypeCol.HeaderText       = "Type";
                lineTypeCol.DataPropertyName = "typeID";
                lineTypeCol.DataSource       = typeColBindingSource;
                lineTypeCol.DisplayMember    = "name";
                lineTypeCol.ValueMember      = "id";
                lineTypeCol.AutoComplete     = true;
                lineTypeCol.SortMode         = DataGridViewColumnSortMode.NotSortable;
                lineTypeCol.Resizable        = DataGridViewTriState.True;
                lineTypeCol.DisplayStyleForCurrentCellOnly = true;
                lineTypeCol.Width   = 80;
                lineTypeCol.Visible = true;

                // oppAccountIDColumn
                oppAccountIDCol                  = new DataGridViewComboBoxColumn();
                oppAccountIDCol.Name             = OPP_ACCOUNT_ID_NAME;
                oppAccountIDCol.HeaderText       = "Source / Destination";
                oppAccountIDCol.DataPropertyName = "oppAccountID";
                oppAccountIDCol.DataSource       = oppAccountColBindingSource;
                oppAccountIDCol.DisplayMember    = "name";
                oppAccountIDCol.ValueMember      = "id";
                oppAccountIDCol.SortMode         = DataGridViewColumnSortMode.NotSortable;
                oppAccountIDCol.Resizable        = DataGridViewTriState.True;
                oppAccountIDCol.DisplayStyleForCurrentCellOnly = true;
                oppAccountIDCol.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
                oppAccountIDCol.FillWeight   = 120;
                oppAccountIDCol.Visible      = true;

                // descriptionColumn
                descriptionCol                  = new DataGridViewTextBoxColumn();
                descriptionCol.Name             = DESCRIPTION_NAME;
                descriptionCol.HeaderText       = "Description";
                descriptionCol.DataPropertyName = "description";
                descriptionCol.SortMode         = DataGridViewColumnSortMode.NotSortable;
                descriptionCol.AutoSizeMode     = DataGridViewAutoSizeColumnMode.Fill;
                descriptionCol.FillWeight       = 200;
                descriptionCol.Visible          = true;

                // confirmationNumColumn
                confirmationNumCol                  = new DataGridViewTextBoxColumn();
                confirmationNumCol.Name             = CONFIRMATION_NUM_NAME;
                confirmationNumCol.HeaderText       = "Confirmation #";
                confirmationNumCol.DataPropertyName = "confirmationNumber";
                confirmationNumCol.SortMode         = DataGridViewColumnSortMode.NotSortable;
                confirmationNumCol.AutoSizeMode     = DataGridViewAutoSizeColumnMode.Fill;
                confirmationNumCol.FillWeight       = 100;
                confirmationNumCol.Visible          = true;

                // envelopeIDColumn
                envelopeIDCol                  = new DataGridViewComboBoxColumn();
                envelopeIDCol.Name             = ENVELOPE_ID_NAME;
                envelopeIDCol.HeaderText       = "Envelope";
                envelopeIDCol.DataPropertyName = "envelopeID";
                envelopeIDCol.DataSource       = envelopeColBindingSource;
                envelopeIDCol.DisplayMember    = "name";
                envelopeIDCol.ValueMember      = "id";
                envelopeIDCol.SortMode         = DataGridViewColumnSortMode.NotSortable;
                envelopeIDCol.DisplayStyleForCurrentCellOnly = true;
                envelopeIDCol.Resizable    = DataGridViewTriState.True;
                envelopeIDCol.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
                envelopeIDCol.FillWeight   = 100;
                envelopeIDCol.Visible      = true;

                // creditAmountColumn
                creditAmountCol                  = new DataGridViewTextBoxColumn();
                creditAmountCol.Name             = CREDIT_AMOUNT_NAME;
                creditAmountCol.HeaderText       = "Credit";
                creditAmountCol.DataPropertyName = "creditAmount";
                creditAmountCol.SortMode         = DataGridViewColumnSortMode.NotSortable;
                creditAmountCol.DefaultCellStyle = new MyCellStyleMoney();
                creditAmountCol.Width            = 65;


                // completeColumn
                completeCol                            = new DataGridViewTextBoxColumn();
                completeCol.Name                       = COMPLETE_NAME;
                completeCol.HeaderText                 = "CR";
                completeCol.DataPropertyName           = "complete";
                completeCol.SortMode                   = DataGridViewColumnSortMode.NotSortable;
                completeCol.DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopCenter;
                completeCol.Width                      = 25;
                completeCol.ReadOnly                   = true;

                // debitAmountColumn
                debitAmountCol                  = new DataGridViewTextBoxColumn();
                debitAmountCol.Name             = DEBIT_AMOUNT_NAME;
                debitAmountCol.HeaderText       = "Debit";
                debitAmountCol.DataPropertyName = "debitAmount";
                debitAmountCol.SortMode         = DataGridViewColumnSortMode.NotSortable;
                debitAmountCol.DefaultCellStyle = new MyCellStyleMoney();
                debitAmountCol.Visible          = true;
                debitAmountCol.Width            = 65;

                // balanceAmountColumn
                balanceAmountCol                  = new DataGridViewTextBoxColumn();
                balanceAmountCol.Name             = BALANCE_AMOUNT_NAME;
                balanceAmountCol.HeaderText       = "Balance";
                balanceAmountCol.DataPropertyName = "balanceAmount";
                balanceAmountCol.SortMode         = DataGridViewColumnSortMode.NotSortable;
                balanceAmountCol.DefaultCellStyle = new MyCellStyleMoney();
                balanceAmountCol.ReadOnly         = true;
                balanceAmountCol.Visible          = true;
                balanceAmountCol.Width            = 75;
            }
コード例 #36
0
        public static void InitDataGridViewColumns(DataGridView grid, DataTable table)
        {
            if (grid == null || table == null)
            {
                return;
            }

            //if (grid.Columns.Count > 0)
            //    grid.Columns.Clear();

            if (grid.Columns.Count == 0)
            {
                grid.EditingControlShowing -= new DataGridViewEditingControlShowingEventHandler(DataGridViewEditingControlShowing);
                grid.EditingControlShowing += new DataGridViewEditingControlShowingEventHandler(DataGridViewEditingControlShowing);

                DataRule dr = TableUtil.GetDataRule(table);
                if (dr != null)
                {
                    DataColumnCollection columns = table.Columns;
                    if (columns.Count > 0)
                    {
                        DataGridViewColumn gcolumn;
                        RuleColumn         rcolumn;
                        foreach (DataColumn column in columns)
                        {
                            rcolumn = TableUtil.GetRuleColumn(column);
                            if (rcolumn != null)
                            {
                                gcolumn = CreateDataGridViewColumn(rcolumn);
                                grid.Columns.Add(gcolumn);
                            }
                            else
                            {
                                InitDataGridViewColumns(grid, dr);
                                break;
                            }
                        }
                    }
                    else
                    {
                        InitDataGridViewColumns(grid, dr);
                    }
                }
                else if (table.Columns.Count > 0)
                {
                    DataGridViewColumn gcolumn;

                    foreach (DataColumn column in table.Columns)
                    {
                        if (TableUtil.StrProperty(column, "Visible").Equals("0"))
                        {
                            continue;
                        }

                        gcolumn = null;

                        string datatype = column.DataType.ToString();

                        if (datatype.Equals("System.Boolean"))
                        {
                            gcolumn              = new DataGridViewCheckBoxColumn();
                            gcolumn.Width        = column.MaxLength > 50 ? column.MaxLength : 50;
                            gcolumn.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
                        }
                        else if (datatype.Equals("System.DateTime"))
                        {
                            gcolumn              = new CalendarColumn("yyyy-MM-dd HH:mm:ss");
                            gcolumn.Width        = 130;
                            gcolumn.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
                        }
                        else
                        {
                            string mapInfo = TableUtil.StrProperty(column, "MapInfo");
                            if (!mapInfo.Equals(""))
                            {
                                DataMap dm = SystemContext.MapManager.FromMapInfo(mapInfo);
                                if (dm != null)
                                {
                                    DataTable mtable = dm.GetMapTable(null);
                                    if (mtable != null && mtable.Rows.Count > 0)
                                    {
                                        gcolumn = new DataGridViewComboBoxColumn();
                                        DataGridViewComboBoxCell combboxcell = gcolumn.CellTemplate as DataGridViewComboBoxCell;
                                        if (combboxcell != null)
                                        {
                                            combboxcell.DataSource    = mtable;
                                            combboxcell.ValueMember   = "Key";
                                            combboxcell.DisplayMember = "Value";
                                        }
                                    }
                                }
                            }

                            if (gcolumn == null)
                            {
                                gcolumn              = new DataGridViewTextBoxColumn();
                                gcolumn.Width        = column.MaxLength > 100 ? column.MaxLength : 100;
                                gcolumn.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
                            }
                        }

                        gcolumn.Name             = column.ColumnName;
                        gcolumn.HeaderText       = column.Caption;
                        gcolumn.DataPropertyName = column.ColumnName;

                        //gcolumn.Width = column.MaxLength;
                        //gcolumn.Width = column.MaxLength > 100 ? column.MaxLength : 100;

                        //gcolumn.AutoSizeMode = DataGridViewAutoSizeColumnMode.ColumnHeader;

                        grid.Columns.Add(gcolumn);
                    }
                }

                grid.AutoGenerateColumns = false;
                grid.DataSource          = GetBindingSource(table);
            }
            else
            {
                DataColumn column;
                string     mapInfo;
                foreach (DataGridViewColumn gcolumn in grid.Columns)
                {
                    column = table.Columns[gcolumn.DataPropertyName];
                    if (column != null)
                    {
                        mapInfo = TableUtil.StrProperty(column, "MapInfo");
                        if (!mapInfo.Equals(""))
                        {
                            DataMap dm = SystemContext.MapManager.FromMapInfo(mapInfo);
                            if (dm != null)
                            {
                                DataTable mtable = dm.GetMapTable(null);
                                if (mtable != null && mtable.Rows.Count > 0)
                                {
                                    DataGridViewComboBoxCell combboxcell = gcolumn.CellTemplate as DataGridViewComboBoxCell;
                                    if (combboxcell != null)
                                    {
                                        combboxcell.DataSource    = mtable;
                                        combboxcell.ValueMember   = "Key";
                                        combboxcell.DisplayMember = "Value";
                                    }
                                }
                            }
                        }
                    }
                }

                grid.AutoGenerateColumns = false;
                grid.DataSource          = GetBindingSource(table);
            }

            grid.CellLeave -= new DataGridViewCellEventHandler(DataGridView_CellLeave);
            grid.CellLeave += new DataGridViewCellEventHandler(DataGridView_CellLeave);
        }
コード例 #37
0
ファイル: FrmConciliaciones.cs プロジェクト: quidele/tezecoop
        public void cargarDataGridViewCupones(DataGridView dgv, IEnumerable<Object> lista , String p_modoEdicion  )
        {
            //dgv.Rows.Clear();
            dgv.Columns.Clear();

            foreach (var item in lista)
            {

                Type t = item.GetType();
                PropertyInfo[] pi = t.GetProperties();

                foreach (PropertyInfo p in pi)
                {
                    DataGridViewColumn columna = new DataGridViewColumn();
                    DataGridViewCell cell = new DataGridViewTextBoxCell();
                    columna.CellTemplate = cell;
                    columna.Name = p.Name;
                    columna.HeaderText = p.Name;
                    columna.ReadOnly = true;
                    columna.AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
                    dgv.Columns.Add(columna);
                }
                break;
            }

            DataGridViewCheckBoxColumn doWork = new DataGridViewCheckBoxColumn();
            doWork.Name = "CONCILIAR";
            doWork.HeaderText = "CONCILIAR";
            doWork.FalseValue = "0";
            doWork.TrueValue = "1";

            dgv.Columns.Add(doWork);

            if (p_modoEdicion !="SI") {
                CalendarColumn doWork1 = new CalendarColumn();
                doWork1.Name = "FECHA_ACREDITACION";
                doWork1.HeaderText = "FECHA DE ACREDITACION";
                doWork1.DefaultCellStyle.Format = "d";
                dgv.Columns.Add(doWork1);
            }

            foreach (object item in lista)
            {
                var row = dgv.Rows.Add();
                Type t =item.GetType();
                PropertyInfo[] pi = t.GetProperties();
                foreach (PropertyInfo p in pi)
                {
                    Console.WriteLine(p.Name + " " + p.GetValue(item, null));
                    dgv.Rows[row].Cells[p.Name].Value = p.GetValue(item, null);
                }

                if (p_modoEdicion=="SI")
                {
                    dgv.Rows[row].Cells["CONCILIAR"].Value = true;
                    dgv.Rows[row].Cells["FECHA_ACREDITACION"].Value = dgv.Rows[row].Cells["FECHA_ACREDITACION"].Value.ToString().Remove(10);
                }

            }
        }
コード例 #38
0
        ////////////////////////////////////////////////////////////////////////////////////////////
        //   Functions Private
        ////////////////////////////////////////////////////////////////////////////////////////////
        private void buildTheDataGridView(bool thisCD)
        {
            // lineItemIDColumn
            this.lineItemIDColumn                  = new DataGridViewTextBoxColumn();
            this.lineItemIDColumn.Name             = "lineItemIDColumn";
            this.lineItemIDColumn.HeaderText       = "lineItemID";
            this.lineItemIDColumn.DataPropertyName = "id";
            this.lineItemIDColumn.Width            = 40;
            this.lineItemIDColumn.Visible          = false;

            // transactionIDColumn
            this.transactionIDColumn                  = new DataGridViewTextBoxColumn();
            this.transactionIDColumn.Name             = "transactionIDColumn";
            this.transactionIDColumn.HeaderText       = "transactionID";
            this.transactionIDColumn.DataPropertyName = "transactionID";
            this.transactionIDColumn.Width            = 40;
            this.transactionIDColumn.Visible          = false;

            // dateColumn
            this.dateColumn                  = new CalendarColumn();
            this.dateColumn.Name             = "dateColumn";
            this.dateColumn.HeaderText       = "Date";
            this.dateColumn.DataPropertyName = "date";
            this.dateColumn.SortMode         = DataGridViewColumnSortMode.NotSortable;
            this.dateColumn.Resizable        = DataGridViewTriState.True;
            this.dateColumn.Width            = 85;
            this.dateColumn.Visible          = true;

            // typeIDColumn
            this.typeIDColumn                  = new DataGridViewComboBoxColumn();
            this.typeIDColumn.Name             = "typeIDColumn";
            this.typeIDColumn.HeaderText       = "Type";
            this.typeIDColumn.DataSource       = this.BindingSourceTypeIDCol;
            this.typeIDColumn.DataPropertyName = "typeID";
            this.typeIDColumn.DisplayMember    = "name";
            this.typeIDColumn.ValueMember      = "id";
            this.typeIDColumn.AutoComplete     = true;
            this.typeIDColumn.SortMode         = DataGridViewColumnSortMode.NotSortable;
            this.typeIDColumn.Resizable        = DataGridViewTriState.True;
            this.typeIDColumn.DisplayStyleForCurrentCellOnly = true;
            this.typeIDColumn.Width   = 80;
            this.typeIDColumn.Visible = true;

            // accountIDColumn
            this.accountIDColumn                  = new DataGridViewComboBoxColumn();
            this.accountIDColumn.Name             = "accountIDColumn";
            this.accountIDColumn.HeaderText       = "Source / Destination";
            this.accountIDColumn.DataSource       = this.BindingSourceAccountIDCol;
            this.accountIDColumn.DataPropertyName = "accountID";
            this.accountIDColumn.DisplayMember    = "name";
            this.accountIDColumn.ValueMember      = "id";
            this.accountIDColumn.SortMode         = DataGridViewColumnSortMode.NotSortable;
            this.accountIDColumn.Resizable        = DataGridViewTriState.True;
            this.accountIDColumn.DisplayStyleForCurrentCellOnly = true;
            this.accountIDColumn.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
            this.accountIDColumn.FillWeight   = 120;
            this.accountIDColumn.Visible      = true;

            // descriptionColumn
            this.descriptionColumn                  = new DataGridViewTextBoxColumn();
            this.descriptionColumn.Name             = "descriptionColumn";
            this.descriptionColumn.HeaderText       = "Description";
            this.descriptionColumn.DataPropertyName = "description";
            this.descriptionColumn.SortMode         = DataGridViewColumnSortMode.NotSortable;
            this.descriptionColumn.AutoSizeMode     = DataGridViewAutoSizeColumnMode.Fill;
            this.descriptionColumn.FillWeight       = 200;
            this.descriptionColumn.Visible          = true;

            // confirmationNumColumn
            this.confirmationNumColumn                  = new DataGridViewTextBoxColumn();
            this.confirmationNumColumn.Name             = "confirmationNumColumn";
            this.confirmationNumColumn.HeaderText       = "Confirmation #";
            this.confirmationNumColumn.DataPropertyName = "confirmationNumber";
            this.confirmationNumColumn.SortMode         = DataGridViewColumnSortMode.NotSortable;
            this.confirmationNumColumn.AutoSizeMode     = DataGridViewAutoSizeColumnMode.Fill;
            this.confirmationNumColumn.FillWeight       = 100;
            this.confirmationNumColumn.Visible          = true;

            // envelopeIDColumn
            this.envelopeIDColumn                  = new DataGridViewComboBoxColumn();
            this.envelopeIDColumn.Name             = "envelopeIDColumn";
            this.envelopeIDColumn.HeaderText       = "Envelope";
            this.envelopeIDColumn.DataSource       = this.BindingSourceEnvelopeIDCol;
            this.envelopeIDColumn.DataPropertyName = "envelopeID";
            this.envelopeIDColumn.DisplayMember    = "name";
            this.envelopeIDColumn.ValueMember      = "id";
            this.envelopeIDColumn.SortMode         = DataGridViewColumnSortMode.NotSortable;
            this.envelopeIDColumn.DisplayStyleForCurrentCellOnly = true;
            this.envelopeIDColumn.Resizable    = DataGridViewTriState.True;
            this.envelopeIDColumn.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
            this.envelopeIDColumn.FillWeight   = 100;
            this.envelopeIDColumn.Visible      = false;
            this.envelopeIDColumn.ReadOnly     = true;

            // completeColumn
            this.completeColumn                            = new DataGridViewTextBoxColumn();
            this.completeColumn.Name                       = "completeColumn";
            this.completeColumn.HeaderText                 = "CR";
            this.completeColumn.DataPropertyName           = "complete";
            this.completeColumn.SortMode                   = DataGridViewColumnSortMode.NotSortable;
            this.completeColumn.DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopCenter;
            this.completeColumn.Width                      = 25;
            this.completeColumn.ReadOnly                   = true;

            // creditDebitColumn
            this.creditDebitColumn                  = new DataGridViewTextBoxColumn();
            this.creditDebitColumn.Name             = "creditDebitColumn";
            this.creditDebitColumn.HeaderText       = "CD";
            this.creditDebitColumn.DataPropertyName = "creditDebit";
            this.creditDebitColumn.SortMode         = DataGridViewColumnSortMode.NotSortable;
            this.creditDebitColumn.Width            = 20;
            this.creditDebitColumn.Visible          = false;

            // amountColumn
            this.amountColumn                  = new DataGridViewTextBoxColumn();
            this.amountColumn.Name             = "amountColumn";
            this.amountColumn.HeaderText       = "Amount";
            this.amountColumn.DataPropertyName = "amount";
            this.amountColumn.SortMode         = DataGridViewColumnSortMode.NotSortable;
            this.amountColumn.DefaultCellStyle = new MyCellStyleMoney();
            this.amountColumn.Width            = 65;

            // This Data Grid View
            this.Name       = "theDataGridView";
            this.DataSource = this.BindingSourceLineItemDGV;
            this.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
            this.SelectionMode           = DataGridViewSelectionMode.CellSelect;
            this.Dock                    = DockStyle.Fill;
            this.AutoGenerateColumns     = false;
            this.AllowUserToOrderColumns = false;
            this.AllowUserToDeleteRows   = false;
            this.AllowUserToResizeRows   = false;
            this.AllowUserToAddRows      = true;
            this.RowHeadersVisible       = false;
            this.ShowCellErrors          = false;
            this.ShowRowErrors           = false;
            this.MultiSelect             = false;

            this.Columns.AddRange(
                new DataGridViewColumn[]
            {
                this.dateColumn,
                this.lineItemIDColumn,
                this.transactionIDColumn,
                this.typeIDColumn,
                this.accountIDColumn,
                this.descriptionColumn,
                this.confirmationNumColumn,
                this.envelopeIDColumn,
                this.completeColumn,
                this.creditDebitColumn,
                this.amountColumn
            }
                );

            if (thisCD)
            {
                this.accountIDColumn.HeaderText = "Destination Account";
            }
            else
            {
                this.accountIDColumn.HeaderText = "Source Account";
            }
        }
コード例 #39
0
        private void buildGridViewInventory()
        {
            view.dgvInventory.Columns.Clear();
            view.dgvInventory.ReadOnly = false;
            view.dgvInventory.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;

            DataGridViewRow row = view.dgvInventory.RowTemplate;
            row.Height = 35;
            row.MinimumHeight = 26;

            DataGridViewCellStyle cellStyleMiddleRight = new DataGridViewCellStyle();
            cellStyleMiddleRight.Alignment = DataGridViewContentAlignment.MiddleRight;

            DataGridViewCellStyle cellStyleColor1 = new DataGridViewCellStyle();
            cellStyleColor1.BackColor = Color.WhiteSmoke;
            cellStyleColor1.Alignment = DataGridViewContentAlignment.MiddleRight;

            CalendarColumn colDate = new CalendarColumn();
            colDate.HeaderText = "Date";
            colDate.Name = "colDate";
            colDate.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
            colDate.Width = 100;
            colDate.DataPropertyName = "regDate";
            view.dgvInventory.Columns.Add(colDate);

            DataGridViewTextBoxColumn colDOINVNO = new DataGridViewTextBoxColumn();
            colDOINVNO.HeaderText = "D.O Invoice No.";
            colDOINVNO.Name = "colDOINVNO";
            colDOINVNO.DataPropertyName = "DOInvoiceNo";
            colDOINVNO.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
            colDOINVNO.Width = 130;
            view.dgvInventory.Columns.Add(colDOINVNO);

            DataGridViewComboBoxColumn colCustomer = new DataGridViewComboBoxColumn();
            colCustomer.DisplayStyle = DataGridViewComboBoxDisplayStyle.Nothing;
            colCustomer.HeaderText = "Customer";
            colCustomer.Name = "colCustomer";
            colCustomer.DataSource = customerModel.getAllCustomers();
            colCustomer.DisplayMember = "customerName";
            colCustomer.ValueMember = "customerID";
            colCustomer.DataPropertyName = "customerId";

            view.dgvInventory.Columns.Add(colCustomer);

            DataGridViewTextBoxColumn colRecD = new DataGridViewTextBoxColumn();
            colRecD.HeaderText = "REC'D";
            colRecD.DefaultCellStyle = cellStyleMiddleRight;
            colRecD.Name = "colRecD";
            colRecD.DataPropertyName = "recd";
            colRecD.ValueType = typeof(int);
            colRecD.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
            colRecD.Width = 80;
            view.dgvInventory.Columns.Add(colRecD);

            DataGridViewTextBoxColumn colLSold = new DataGridViewTextBoxColumn();
            colLSold.HeaderText = "Sold";
            colLSold.DefaultCellStyle = cellStyleMiddleRight;
            colLSold.Name = "colLSold";
            colLSold.DataPropertyName = "lSold";
            colLSold.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
            colLSold.Width = 80;
            view.dgvInventory.Columns.Add(colLSold);

            DataGridViewTextBoxColumn colGOnHand = new DataGridViewTextBoxColumn();
            colGOnHand.ReadOnly = true;
            colGOnHand.DefaultCellStyle = cellStyleMiddleRight;
            colGOnHand.Name = "colGOnHand";
            colGOnHand.HeaderText = "G. On Hand";
            colGOnHand.DataPropertyName = "gOnHand";
            colGOnHand.DefaultCellStyle = cellStyleColor1;
            view.dgvInventory.Columns.Add(colGOnHand);

            DataGridViewTextBoxColumn colPrice = new DataGridViewTextBoxColumn();
            colPrice.HeaderText = "Price 1";
            colPrice.DefaultCellStyle = cellStyleMiddleRight;
            colPrice.Name = "colPrice";
            colPrice.DataPropertyName = "price";
            colPrice.ValueType = Type.GetType("System.Decimal");
            colPrice.DefaultCellStyle.Format = "0.00##";
            colPrice.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
            colPrice.Width = 80;
            view.dgvInventory.Columns.Add(colPrice);

            DataGridViewTextBoxColumn colLRecD = new DataGridViewTextBoxColumn();
            colLRecD.HeaderText = "REC'D";
            colLRecD.DefaultCellStyle = cellStyleMiddleRight;
            colLRecD.Name = "colRecD";
            colLRecD.DataPropertyName = "oemRecd";
            colLRecD.ValueType = typeof(int);
            colLRecD.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
            colRecD.Width = 80;
            view.dgvInventory.Columns.Add(colLRecD);

            DataGridViewTextBoxColumn colRSold = new DataGridViewTextBoxColumn();
            colRSold.HeaderText = "Sold";
            colRSold.DefaultCellStyle = cellStyleMiddleRight;
            colRSold.Name = "colRSold";
            colRSold.DataPropertyName = "rSold";
            colRSold.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
            colRSold.Width = 80;
            view.dgvInventory.Columns.Add(colRSold);

            DataGridViewTextBoxColumn colIMOnHand = new DataGridViewTextBoxColumn();
            colIMOnHand.HeaderText = "OEM On Hand";
            colIMOnHand.ReadOnly = true;
            colIMOnHand.DefaultCellStyle = cellStyleMiddleRight;
            colIMOnHand.Name = "colIMOnHand";
            colIMOnHand.DataPropertyName = "imOnHand";
            colIMOnHand.DefaultCellStyle = cellStyleColor1;
            view.dgvInventory.Columns.Add(colIMOnHand);

            DataGridViewTextBoxColumn colPrice2 = new DataGridViewTextBoxColumn();
            colPrice2.HeaderText = "Price 2";
            colPrice2.DefaultCellStyle = cellStyleMiddleRight;
            colPrice2.Name = "colPrice";
            colPrice2.DataPropertyName = "price2";
            colPrice2.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
            colPrice2.Width = 80;
            colPrice2.ValueType = Type.GetType("System.Decimal");
            colPrice2.DefaultCellStyle.Format = "0.00##";
            view.dgvInventory.Columns.Add(colPrice2);

            DataGridViewTextBoxColumn colTotalAvailabel = new DataGridViewTextBoxColumn();
            colTotalAvailabel.ReadOnly = true;
            colTotalAvailabel.DefaultCellStyle = cellStyleMiddleRight;
            colTotalAvailabel.Name = "colTotalAvailabel";
            colTotalAvailabel.HeaderText = "Total Availabel";
            colTotalAvailabel.DataPropertyName = "totalAvailabel";
            colTotalAvailabel.DefaultCellStyle = cellStyleColor1;
            view.dgvInventory.Columns.Add(colTotalAvailabel);

            DataGridViewTextBoxColumn colTotalDemand = new DataGridViewTextBoxColumn();
            colTotalDemand.ReadOnly = true;
            colTotalDemand.DefaultCellStyle = cellStyleMiddleRight;
            colTotalDemand.Name = "colTotalDemand";
            colTotalDemand.HeaderText = "Total Demand";
            colTotalDemand.DataPropertyName = "totalDemand";
            colTotalDemand.DefaultCellStyle = cellStyleColor1;
            view.dgvInventory.Columns.Add(colTotalDemand);

            DataGridViewTextBoxColumn colDetail = new DataGridViewTextBoxColumn();
            colDetail.HeaderText = "Remark";
            colDetail.Name = "colDetail";
            colDetail.DataPropertyName = "detail";
            view.dgvInventory.Columns.Add(colDetail);
        }