public CC1TransferDataRow(C1FlexGrid i_fg, Hashtable i_htbColMapping, DataRow i_drPrototype) { m_fg = i_fg; m_htbColMapping = i_htbColMapping; m_dr = i_drPrototype; BuildArrCol(); }
/// <summary> /// Binds a datatable into the component1 flex grid. /// ***flexgrid columns should have a name /// </summary> /// <param name="pGrid">component1 flex grid</param> /// <param name="pDt">datatable containing data to be binded</param> public static void bindDataTableToFlexGrid(ref C1FlexGrid pGrid, DataTable pDt) { try { if (pDt.Rows.Count > 0) { int _row = 1; pGrid.Rows.Count = 1; foreach (DataRow _dRow in pDt.Rows) { pGrid.Rows.Count++; for (int _col = 0; _col < pGrid.Cols.Count; _col++) { try { string _str = _dRow[pGrid.Cols[_col].Name.ToString()].ToString(); pGrid.SetData(_row, _col, _str); } catch { } } _row++; } } } catch (Exception ex) { throw new Exception("Error Message!\r\n" + ex.Message + "\r\nError in : Global Functions." + ex.TargetSite + " - " + ex.StackTrace.Substring(ex.StackTrace.IndexOf("line")) + "."); } }
public CTransferDateData(C1FlexGrid i_fg, int i_ColNumber, string i_strColName) { m_fg = i_fg; m_ColNumber = i_ColNumber; m_strColName = i_strColName; }
public AutoCompleteTextBox() { //this.dv = new DataView(); //this.filterStr = ""; //this.valueCol = 0; this.EnterToTab = false; this.mObjectMemBer = null; // Create the form that will hold the list this.popup = new Form(); this.popup.StartPosition = FormStartPosition.Manual; this.popup.ShowInTaskbar = false; this.popup.FormBorderStyle = FormBorderStyle.None; this.popup.TopMost = true; this.popup.Deactivate += new EventHandler(Popup_Deactivate); //************************************************************ // Create the list box that will hold mathcing items //this.list = new ListBox(); //this.list.Cursor = Cursors.Hand; //this.list.BorderStyle = BorderStyle.None; //this.list.SelectedIndexChanged += new EventHandler(List_SelectedIndexChanged); //this.list.MouseDown += new MouseEventHandler(List_MouseDown); //this.list.ItemHeight = 14; //this.list.DrawMode = DrawMode.OwnerDrawFixed; //this.list.DrawItem += new DrawItemEventHandler(List_DrawItem); //this.list.Dock = DockStyle.Fill; // Add the list box to the popup form //this.popup.Controls.Add(this.list); this.flexGrid = new C1FlexGrid(); this.flexGrid.Cursor = Cursors.Hand; //this.flexGrid.BorderStyle = BorderStyle.None; this.flexGrid.AfterSelChange += new RangeEventHandler(flexGrid_AfterSelChange); this.flexGrid.MouseDown += new MouseEventHandler(flexGrid_MouseDown); this.flexGrid.Dock = DockStyle.Fill; this.flexGrid.SelectionMode = SelectionModeEnum.Row; this.flexGrid.DrawMode = DrawModeEnum.Normal; this.flexGrid.AllowEditing = false; this.flexGrid.ExtendLastCol = true; this.flexGrid.Cols.Fixed = 0; this.popup.Controls.Add(this.flexGrid); //this.flexGrid.DataSource = dv; //this.flexGrid.DataMember = "test"; //this.flexGrid.DataSource = dv; // Add default triggers. this.triggers.Add(new TextLengthTrigger(2)); this.triggers.Add(new ShortCutTrigger(Keys.Enter, TriggerState.SelectAndConsume)); this.triggers.Add(new ShortCutTrigger(Keys.Tab, TriggerState.Select)); this.triggers.Add(new ShortCutTrigger(Keys.Control | Keys.F, TriggerState.ShowAndConsume)); this.triggers.Add(new ShortCutTrigger(Keys.Escape, TriggerState.HideAndConsume)); }
public CObjectExportColumn(C1FlexGrid i_fg, Excel.Worksheet i_objWorkSheet, int i_iGridCol, int i_iSheetCol, int i_iSheetStartRow) { m_fg = i_fg; m_objWorkSheet = i_objWorkSheet; m_iGridCol = i_iGridCol; m_iSheetCol = i_iSheetCol; m_iSheetStartRow = i_iSheetStartRow; }
public CC1InplaceEdittingAutoAddRowAndUpdateDBController(C1FlexGrid i_fg, US_Object i_us_obj, DataSet i_ds_source, ITransferDataRow i_obj_transfer, e_CC1InplaceEditting_NewRowPosition i_e_new_row_position) : this(i_fg, i_us_obj, i_ds_source, i_obj_transfer) { m_e_new_row_position = i_e_new_row_position; }
public CC1InplaceEdittingController(C1FlexGrid i_fg) { m_fg = i_fg; m_e_mode = e_CC1InplaceEdittingMode.none; m_b_update_when_row_changed = true; m_b_commit_successful = false; m_fg.BeforeRowColChange += catch_m_fg_before_row_col_change; m_fg.Leave += catch_m_fg_leave; }
private static int TotalWidth; // Summation of Columns widths #endregion Fields #region Methods public static void Print_DataGrid(C1.Win.C1FlexGrid.C1FlexGrid dgF, String title) { PrintTitle = title; PrintPreviewDialog ppvw; try { dg = dgF; PrintFont = dg.Font; PrintFontColor = dg.ForeColor; //khoaht added foreach (Column c in dg.Cols) if (c.Visible) AvailableColumns.Add(c.Caption); // Show PrintOption Form PrintOptions dlg = new PrintOptions(PrintTitle, AvailableColumns); //if (dlg.ShowDialog() != DialogResult.OK) return; PrintTitle = dlg.PrintTitle; PrintAllRows = dlg.PrintAllRows; SelectedColumns = dlg.GetSelectedColumns(); if (dlg.PrintFont != null) PrintFont = dlg.PrintFont; if (dlg.PrintFontColor.Name != "" & dlg.PrintFontColor.Name != "0") PrintFontColor = dlg.PrintFontColor; RowsPerPage = 0; ppvw = new PrintPreviewDialog(); ppvw.Document = printDoc; // Show Print Preview Page printDoc.BeginPrint += new System.Drawing.Printing.PrintEventHandler(printDoc_BeginPrint); printDoc.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(printDoc_PrintPage); if (ppvw.ShowDialog() != DialogResult.OK) { printDoc.BeginPrint -= new System.Drawing.Printing.PrintEventHandler(printDoc_BeginPrint); printDoc.PrintPage -= new System.Drawing.Printing.PrintPageEventHandler(printDoc_PrintPage); return; } // Print the Documnet printDoc.Print(); printDoc.BeginPrint -= new System.Drawing.Printing.PrintEventHandler(printDoc_BeginPrint); printDoc.PrintPage -= new System.Drawing.Printing.PrintPageEventHandler(printDoc_PrintPage); } catch (Exception ex) { MsgBoxVN.ShowError(ex.Message, Dic.STRING_TITLE_ERROR); } finally { } }
public Select_Form(Routing_Form parent , Point pt, int nType_ID, C1FlexGrid parentGrid, bool bIsConditionTable=false) { Application.EnableVisualStyles(); _pt = pt; _parent = parent; _nType = nType_ID; _parentGrid = parentGrid; _bIsConditionTable = bIsConditionTable; InitializeComponent(); // MessageBox.Show(_nCommandType.ToString() + " # " + _nRoutingCommand_ID.ToString()); }
public static int GetRowIndex(string Key, string value, C1FlexGrid grid) { foreach (Row item in grid.Rows) { if (item[Key] != null && item[Key].ToString().Equals(value)) { return item.Index; } } return -1; }
public override void CreateCellContent(C1FlexGrid grid, Border bdr, CellRange rng) { base.CreateCellContent(grid, bdr, rng); SaleItem row = grid.Rows[rng.Row].DataItem as SaleItem; if (rng.Column > 0) { TextBlock text = new TextBlock() { Text = rng.Column == 1 ? row.Sales.ToString("C0") : row.Profit.ToString("C0") }; bdr.Child = text; } }
public override void CreateCellContent(C1FlexGrid grid, Border bdr, CellRange rng) { // crate the content base.CreateCellContent(grid, bdr, rng); // add the tooltip var tip = string.Format("row: {0} col: {1}\r\ncontent: {2}\r\ncolumn Tag: {3}", rng.Row, rng.Column, grid[rng.Row, rng.Column], grid.Columns[rng.Column].Tag); ToolTipService.SetToolTip(bdr, tip); }
public static void Show_Last_Selected_Obs(C1FlexGrid grid) { int row = -1; if (last_selected_obs_num > 0) { row = grid.FindRow(last_selected_obs_num.ToString(), 1, 1, false, true, true); } if (row > 0) { grid.ShowCell(row, 3); } }
void AddItem(C1FlexGrid flex, IHierarchyData item, int level) { // add this item var nd = flex.Rows.AddNode(level); nd.Row.UserData = item; nd.Data = ((Category)item).Name; // add children foreach (IHierarchyData child in item.GetChildren()) { AddItem(flex, child, level + 1); } }
private void setControlGrf() { String id = "", vn = "", an = "", preno = "", vsdate = "", hn = "", name = "", dateDisc = "", chk = ""; if (grfVs.Row <= 0) { return; } if (grfVs.Col <= 0) { return; } id = grfVs[grfVs.Row, colID] != null ? grfVs[grfVs.Row, colID].ToString() : ""; vn = grfVs[grfVs.Row, colVn] != null ? grfVs[grfVs.Row, colVn].ToString() : ""; an = grfVs[grfVs.Row, colAn] != null ? grfVs[grfVs.Row, colAn].ToString() : ""; preno = grfVs[grfVs.Row, colPreno] != null ? grfVs[grfVs.Row, colPreno].ToString() : ""; vsdate = grfVs[grfVs.Row, colDate] != null ? grfVs[grfVs.Row, colDate].ToString() : ""; hn = grfVs[grfVs.Row, colHn] != null ? grfVs[grfVs.Row, colHn].ToString() : ""; name = grfVs[grfVs.Row, colName] != null ? grfVs[grfVs.Row, colName].ToString() : ""; dateDisc = grfVs[grfVs.Row, colDateDisc] != null ? grfVs[grfVs.Row, colDateDisc].ToString() : ""; chk = grfVs[grfVs.Row, colChk] != null ? grfVs[grfVs.Row, colChk].ToString() : ""; tabVs = new C1DockingTabPage(); tabVs.Location = new System.Drawing.Point(1, 24); tabVs.Name = "c1DockingTabPage1"; tabVs.Size = new System.Drawing.Size(667, 175); tabVs.TabIndex = 0; tabVs.Text = name; tabVs.Name = "tabVs_" + vn; tC.Controls.Add(tabVs); Panel pn = new Panel(); pn.Dock = DockStyle.Fill; pn.Name = "pn_" + vn; tabVs.Controls.Add(pn); C1FlexGrid grf = new C1FlexGrid(); grf.Dock = DockStyle.Fill; grf.Font = fEdit; grf.Dock = System.Windows.Forms.DockStyle.Fill; grf.Location = new System.Drawing.Point(0, 0); //grf.Rows[0].Visible = false; //grf.Cols[0].Visible = false; grf.Rows.Count = 1; grf.Name = "grf_" + vn; pn.Controls.Add(grf); theme1.SetTheme(grf, bc.iniC.themeApplication); setGrf(hn, vn, preno, dateDisc, chk, an, grf); }
public override void CreateTopLeftContent(C1FlexGrid grid, System.Windows.Controls.Border bdr, CellRange range) { var rows = grid.ColumnHeaders.Rows; var fr = rows[range.Row] as GridFilterRow; if (fr != null && range.Column == grid.TopLeftCells.Columns.Count - 1) { bdr.Child = new ClearFilterButton(fr); } else { base.CreateTopLeftContent(grid, bdr, range); } }
public FlexPaginator(C1FlexGrid flex, ScaleMode scaleMode, Size pageSize, Thickness margin, int maxPages) { // save parameters _margin = margin; _scaleMode = scaleMode; _pageSize = pageSize; // adjust page size for margins before building grid images ContentSize = new Size(PageSize.Width - margin.Left - margin.Right, PageSize.Height - margin.Top - margin.Bottom); ContentLocation = new Point(margin.Left, margin.Top); // get grid images for each page _pages = flex.GetPageImages(scaleMode, ContentSize, maxPages); }
/// <summary> /// This was a test event handler that could be used to capture certain /// keystrokes. In this case, we are trapping a Ctrl C to be used to /// copy the contents of the control to the clipboard /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void KeyDownEvent(object sender, System.Windows.Forms.KeyEventArgs e) { C1FlexGrid fg = ( C1FlexGrid )sender; if (e.Control) { // if ( e.KeyCode == Keys.C ) // { // Clipboard.SetDataObject ( fg.Clip ); // e.Handled = true; // } } e.Handled = false; }
public FlexPaginator(C1FlexGrid flex, ScaleMode scaleMode, Size pageSize, Thickness margin, int maxPages) { // save parameters _margin = margin; _scaleMode = scaleMode; _pageSize = pageSize; // adjust page size for margins before building grid images pageSize.Width -= (margin.Left + margin.Right); pageSize.Height -= (margin.Top + margin.Bottom); // get grid images for each page _pages = flex.GetPageImages(scaleMode, pageSize, maxPages); }
// ** ctor public FlexPrintDocument(C1FlexGrid flex) { // initialize document name DocumentName = flex.Name; // initialize zoom factor _zoom = 1; // create page images _images = new ArrayList(); // initialize int r1, c1, r2, c2; // loop through columns looking for breaks c1 = c2 = flex.Cols.Fixed; for (int c = flex.Cols.Fixed; c < flex.Cols.Count; c++) { // check if this is a column break if (c == flex.Cols.Count - 1 || (flex.Cols[c].UserData != null && flex.Cols[c].UserData.ToString() == "*")) { // found break, column range is c1-c c2 = c; // loop through rows looking for breaks r1 = r2 = flex.Rows.Fixed; for (int r = flex.Rows.Fixed; r < flex.Rows.Count; r++) { // look for next row break if (r == flex.Rows.Count - 1 || (flex.Rows[r].UserData != null && flex.Rows[r].UserData.ToString() == "*")) { // found break, row range is r1-r r2 = r; // create image _images.Add(flex.CreateImage(r1, c1, r2, c2)); // update row range r1 = r + 1; } } // update column range c1 = c + 1; } } }
/// <summary> /// 데이터 바인드(DataSource 속성을 사용하지 않는다.) /// </summary> /// <param name="view"></param> public static void x_DataBind(this C1FlexGrid flexGrid, System.Data.DataView view, bool viewDeleteRow) { if (viewDeleteRow) { view.RowStateFilter = view.RowStateFilter | DataViewRowState.Deleted; } flexGrid.DataSource = view; //ClearCellEditable(); view.ListChanged += delegate(object sender, System.ComponentModel.ListChangedEventArgs e) { if (e.NewIndex == -1) { SetNumbering(flexGrid.Rows.Fixed, flexGrid); } else { SetNumbering(e.NewIndex + flexGrid.Rows.Fixed, flexGrid); } }; view.Table.RowChanged += delegate(object sender, DataRowChangeEventArgs e) { if (e.Action == DataRowAction.Add) { flexGrid.Invalidate(); } }; view.Table.ColumnChanged += delegate(object sender, DataColumnChangeEventArgs e) { if (e.Row.RowState != DataRowState.Detached && (e.Row[e.Column.ColumnName, DataRowVersion.Current] == DBNull.Value || e.Row[e.Column.ColumnName, DataRowVersion.Current] == null)) { if (e.ProposedValue == null || Convert.ToString(e.ProposedValue).Trim() == string.Empty) { e.Row.CancelEdit(); return; } } e.Row.EndEdit(); }; SetNumbering(flexGrid.Rows.Fixed, flexGrid); }
/// <summary> /// フィルタ設定 /// </summary> /// <param name="cur"></param> /// <param name="grid"></param> /// <param name="condition"></param> /// <param name="msg"></param> //HACK 引数msgは使用していない。 public void SetGridFilter(Cursor cur, C1FlexGrid grid, string condition, string msg) { // フィルタを構成します。 _searchFilter.Condition1.Operator = ConditionOperator.Contains; _searchFilter.Condition1.Parameter = condition; int count = 0; try { // フィルタを設定します。 grid.BeginUpdate(); for (int r = grid.Rows.Fixed; r < grid.Rows.Count; r++) { bool visible = false; for (int c = grid.Cols.Fixed; c < grid.Cols.Count; c++) { Column col = grid.Cols[c]; Object val = null; //表示列のみフィルタ対象とする。 if (col.Visible == true) { if (col.DataMap != null) { //プルダウンの場合、名称でフィルタリング Dictionary <string, string> dic = (Dictionary <string, string>)col.DataMap; if (dic.ContainsKey(StringUtil.NullToBlank(grid[r, c]))) { val = dic[grid[r, c].ToString()].ToString(); } } else { val = grid[r, c]; } } if (_searchFilter.Apply(val)) { visible = true; count++; break; } } grid.Rows[r].Visible = visible; Application.DoEvents(); } } finally { grid.EndUpdate(); } }
public override void CreateCellContent(C1FlexGrid grid, Border bdr, CellRange rng) { base.CreateCellContent(grid, bdr, rng); var row = grid.Rows[rng.Row] as GroupRow; if (rng.Column == 0 && row != null) { bdr.Padding = _tEmpty; var cellGrid = bdr.Child as Grid; cellGrid.Children.RemoveAt(0); var treeNode = CreateTreeNode(grid, row); cellGrid.Children.Add(treeNode); } }
public ColumnLayoutForm(C1FlexGrid grid) { InitializeComponent(); _grid = grid; btnOK.Content = AppResources.OK; btnCancel.Content = AppResources.Cancel; foreach (var column in _grid.Columns) { _columns.Add(new ColumnLayoutItemViewModel(_columns, column)); } DataContext = _columns; UpdateColumns(); }
private void initgrfOnhand() { grfOrder = new C1FlexGrid(); grfOrder.Font = fEdit; grfOrder.Dock = System.Windows.Forms.DockStyle.Fill; grfOrder.Location = new System.Drawing.Point(0, 0); grfOrder.Rows[0].Visible = false; grfOrder.Cols[0].Visible = true; grfOrder.Cols[colId].Visible = false; grfOrder.DoubleClick += GrfOrder_DoubleClick; grfOrder.Name = "grfOrder"; theme1.SetTheme(grfOrder, "Office2016Black"); tabOnhand.Controls.Add(grfOrder); }
void SetGrid(C1FlexGrid grid) { if (_grid == null) { _grid = grid; _grid.BeginningEdit += _grid_BeginningEdit; _grid.PreviewKeyDown += _grid_PreviewKeyDown; _grid.LoadedRows += _grid_LoadedRows; _grid_LoadedRows(_grid, EventArgs.Empty); } else if (grid != _grid) { throw new Exception("this factory can only be used with a single grid."); } }
public TCPIPConfiguration(C1FlexGrid grid) { c1FlexGrid_TCP_IP_Conf = grid; // errorProvider1 errorProvider = new System.Windows.Forms.ErrorProvider(); errorProvider.BlinkStyle = System.Windows.Forms.ErrorBlinkStyle.NeverBlink; string IniFilePath = myDefinitions.LanguageFile; myIniHandler = IniStructure.ReadIni(IniFilePath); grid.BeforeEdit += new C1.Win.C1FlexGrid.RowColEventHandler(this.c1FlexGrid_TCPIPConfiguration_BeforeEdit); grid.GetCellErrorInfo += new C1.Win.C1FlexGrid.GetErrorInfoEventHandler(this.c1FlexGrid_Conditions_GetCellErrorInfo); // grid.GetRowErrorInfo += new C1.Win.C1FlexGrid.GetErrorInfoEventHandler(this.c1FlexGrid_Conditions_GetRowErrorInfo); }
private DataRowView[] GetAllDataRowViews(C1FlexGrid cfg) { List <DataRowView> drs = new List <DataRowView>(); if (null != cfg.DataSource) { DataView dv = (cfg.DataSource as DataTable).DefaultView; for (int i = 0, len = dv.Count; i < len; i++) { drs.Add(dv[i]); } } return(drs.ToArray()); }
public ColumnLayoutForm(C1FlexGrid grid) { this.InitializeComponent(); _grid = grid; PrimaryButtonText = Strings.OK; SecondaryButtonText = Strings.Cancel; foreach (var column in _grid.Columns) { _columns.Add(new ColumnLayoutItemViewModel(_columns, column)); } DataContext = _columns; UpdateColumns(); }
private static bool shipWithUPS(C1FlexGrid grid, bool UPSForDK) { if (grid.GetData(grid.RowSel, "shipping_description").ToString().Contains("UPS")) { return(true); } else if (UPSForDK && Convert.ToInt16(grid.GetData(grid.RowSel, "shipping_description")) >= Convert.ToInt16(Properties.Settings.Default.UPS_UPGRADE_WEIGHT)) { return(true); } else { return(false); } }
public override void CreateCellContentEditor(C1FlexGrid grid, Border bdr, CellRange rng) { if (grid.Columns[rng.Column].ColumnName == "LastOrderDate" && !grid.Columns[rng.Column].Format.Contains("t")) { DatePicker date = new DatePicker(); Binding binding = new Binding("LastOrderDate"); binding.Mode = BindingMode.TwoWay; date.SetBinding(DatePicker.SelectedDateProperty, binding); bdr.Child = date; } else { base.CreateCellContentEditor(grid, bdr, rng); } }
public static void Set_Obs_Item_Grid_Update_Fields(C1FlexGrid grid) { //On indique l'emplacement de la données par rapport au noeud en cours code grid.Cols["nom"].UserData = "att"; grid.Cols["position"].UserData = "att"; grid.Cols["info"].UserData = "val"; grid.Cols["q1"].UserData = "att"; grid.Cols["q2"].UserData = "att"; grid.Cols["h1"].UserData = "att"; grid.Cols["h2"].UserData = "att"; grid.Cols["pm1"].UserData = "att"; grid.Cols["pm2"].UserData = "att"; grid.Cols["ajoute"].UserData = "att"; grid.Cols["lien"].UserData = "att"; }
// create the custom cell editor public override void CreateCellContent(C1FlexGrid grid, Border bdr, CellRange rng) { var t = GetCellType(rng); if (t != null) { // cell has a custom type, create editor bdr.Child = CreateEditor(t, rng); } else { // default handling base.CreateCellContent(grid, bdr, rng); } }
private void _flexFinancial_CellContentChanging(C1FlexGrid sender, CellContentChangingEventArgs args) { if (args.Phase == 0) { args.RegisterUpdateCallback(_flexFinancial_CellContentChanging); } else if (args.Phase == 1) { var factory = _flexFinancial.CellFactory as FinancialCellFactory; if (factory != null) { factory.ShowLiveData(_flexFinancial, args.Range, args.Cell); } } }
private void initGrfInterpret() { grfInt = new C1FlexGrid(); grfInt.Font = fEdit; grfInt.Dock = System.Windows.Forms.DockStyle.Fill; grfInt.Location = new System.Drawing.Point(0, 0); grfInt.ChangeEdit += GrfInt_ChangeEdit; //FilterRow fr = new FilterRow(grfPosi); gbInterpret.Controls.Add(this.grfInt); C1Theme theme = C1ThemeController.GetThemeByName("Office2013Red", false); C1ThemeController.ApplyThemeToObject(grfInt, theme); }
public static void Resize_Observation_Column(C1FlexGrid grid) { //grid.Cols["observation"].Width = grid.Width - grid.Cols["position"].Width - grid.Cols["visuel"].Width; bool test; pic_slide ps; foreach (System.Windows.Forms.Control ct in grid.Controls) { if (ct is pic_slide) { ps = (pic_slide)ct; test = mod_hosted_control.UpdatePosition(grid, ps, ps.ParentRow, 7); } } }
C1FlexGrid GetParentGrid() { if (_grid == null) { for (var p = VisualTreeHelper.GetParent(this); p != null; p = VisualTreeHelper.GetParent(p)) { var g = p as C1FlexGrid; if (g != null) { _grid = g; _isReadOnly = g.IsReadOnly; } } } return(_grid); }
private void initGrfApm() { grfApm = new C1FlexGrid(); grfApm.Font = fEdit; grfApm.Dock = System.Windows.Forms.DockStyle.Fill; grfApm.Location = new System.Drawing.Point(0, 0); grfApm.Rows.Count = 1; //FilterRow fr = new FilterRow(grfExpn); grfApm.DoubleClick += GrfApm_DoubleClick; pnApm.Controls.Add(grfApm); grfApm.Rows[0].Visible = false; grfApm.Cols[0].Visible = false; theme1.SetTheme(grfApm, bc.iniC.themeApp); }
public override void CreateCellContentEditor(C1FlexGrid grid, Border bdr, CellRange rng) { base.CreateCellContentEditor(grid, bdr, rng); // listen to changes in combo columns var col = grid.Columns[rng.Column]; if (col.ValueConverter != null) { var tb = bdr.Child as TextBox; if (tb != null) { tb.TextChanged += tb_TextChanged; } } }
//-------------------------------------------------------------------------------------------------- public static void Add_Id_Code(object sender, EventArgs e) { Button bt = (Button)sender; TextBox tb = (TextBox)bt.Tag; C1FlexGrid grid = (C1FlexGrid)tb.Tag; XmlDocument doc = (XmlDocument)mod_global.MF.XmlIdCodeGrid.Tag; XmlNode originnod = doc.DocumentElement; if (tb.Text != String.Empty) { if (mod_global.Check_If_Identification_Code_Name_Exist(tb.Text.ToUpper(), doc) == true) { System.Windows.Forms.MessageBox.Show("Ce code d'identification existe déjà."); return; } C1.Win.C1FlexGrid.Row ligne = grid.Rows.Add(); ligne["id"] = tb.Text; //ici XmlElement codeNode = doc.CreateElement("code"); XmlElement idNode = doc.CreateElement("id"); idNode.InnerText = tb.Text.ToUpper(); XmlElement intituleNode = doc.CreateElement("intitule"); XmlElement valeurNode = doc.CreateElement("valeur"); XmlElement saisieNode = doc.CreateElement("saisie"); XmlElement renseigneNode = doc.CreateElement("renseigne"); XmlElement inspectionNode = doc.CreateElement("inspection"); codeNode.AppendChild(idNode); codeNode.AppendChild(intituleNode); codeNode.AppendChild(valeurNode); codeNode.AppendChild(saisieNode); codeNode.AppendChild(renseigneNode); codeNode.AppendChild(inspectionNode); originnod.AppendChild(codeNode); doc.Save(mod_global.MF.XmlIdStripLabel.Text); tb.Text = String.Empty; } else { MessageBox.Show("Veuillez saisir un code à ajouter", "Erreur", MessageBoxButtons.OK); } }
// creates an outline cell (with collapse/expand/branch graphics) void CreateOutlineCellContent(C1FlexGrid grid, Border bdr, CellRange range) { var row = grid.Rows[range.Row]; var gr = row as GroupRow; if (gr != null) { // build grid for tree cell var img = gr.IsCollapsed ? NodeImage.Collapsed : NodeImage.Expanded; var g = CreateCellGrid(row, gr.Level, grid.TreeIndent, img); // copy data from original cell var p = bdr.Child as Panel; if (p != null && p.Children.Count > 1) { var tb = p.Children[1] as FrameworkElement; p.Children.Clear(); tb.VerticalAlignment = VerticalAlignment.Center; tb.Margin = new Thickness(4, 0, 0, 0); tb.SetValue(Grid.ColumnProperty, gr.Level + 1); g.Children.Add(tb); // assign grid to cell bdr.Padding = _thickness; bdr.Margin = _thicknessEmpty; bdr.Child = g; } } else { // add connecting lines to detail cells var levels = grid.Rows.MaxGroupLevel; var g = CreateCellGrid(row, levels - 1, grid.TreeIndent, NodeImage.Connector); // copy data from original cell var tb = bdr.Child as FrameworkElement; bdr.Child = null; tb.VerticalAlignment = VerticalAlignment.Center; tb.SetValue(Grid.ColumnProperty, g.ColumnDefinitions.Count - 1); g.Children.Add(tb); // assign grid to cell bdr.Padding = _thickness; bdr.Margin = _thicknessEmpty; bdr.Child = g; } }
// ** ctor public FilterRowLike(C1.Win.C1FlexGrid.C1FlexGrid flex) { // save reference to grid _flex = flex; // add filter row _row = _flex.Rows.Fixed; _flex.Rows.Fixed++; // customize filter row style // note: customize margins to align checkboxes correctly in filter cells, // which have no vertical border <<1.4>> _style = _flex.Styles.Add("Filter", _flex.Styles.Frozen); //_style.BackColor = SystemColors.Info; //_style.ForeColor = SystemColors.InfoText; //_style.Border.Direction = BorderDirEnum.Horizontal; //_style.Margins = new System.Drawing.Printing.Margins(1, 2, 1, 1); _flex.Rows[_row].Style = _style; // add event handlers _flex.KeyDown += new KeyEventHandler(_flex_KeyDown); _flex.BeforeMouseDown += new BeforeMouseDownEventHandler(_flex_BeforeMouseDown); _flex.RowColChange += new EventHandler(_flex_RowColChange); _flex.AfterEdit += new RowColEventHandler(_flex_AfterEdit); // initialize boolean cells <<1.4>> CellStyle cs = _flex.Styles.Add("BooleanFilterCell"); cs.ImageAlign = ImageAlignEnum.CenterCenter; foreach (Column col in _flex.Cols) { if (col.DataType == typeof(bool)) { _flex.SetCellCheck(_row, col.Index, CheckEnum.TSGrayed); _flex.SetCellStyle(_row, col.Index, cs); } if (col.DataType != null) { if (col.DataType.Name == "DateTime") { _flex.AllowEditing = false; } } } // move cursor to filter row _flex.Select(_row, _flex.Cols.Fixed); }
public static int FlexGridFindCol(C1FlexGrid flexGrid, string colName) { bool isCract = false; //비교값이 같으면 Break; for (int i = 0; i < flexGrid.Cols.Count; i++) { if (flexGrid.Cols[i].Name == colName) { isCract = true; } //비교값이 모두 일치하는 경우 if (isCract) return i; } return -1; }
public override void CreateCellContent(C1FlexGrid grid, Border bdr, CellRange rng) { var tableLink = grid[rng.Row, rng.Column] as TableLink; if (tableLink != null) { var btn = new HyperlinkButton(); btn.Tag = tableLink; btn.Content = tableLink.Href; btn.VerticalAlignment = VerticalAlignment.Center; btn.HorizontalAlignment = HorizontalAlignment.Left; btn.Click += btn_Click; bdr.Child = btn; } else { base.CreateCellContent(grid, bdr, rng); } }
public CC1InplaceEdittingAutoAddRowAndUpdateDBController(C1FlexGrid i_fg, US_Object i_us_obj, DataSet i_ds_source, ITransferDataRow i_obj_transfer) { m_fg = i_fg; m_us_cur = i_us_obj; m_ds_source = i_ds_source; m_obj_transfer = i_obj_transfer; m_obj_edit_controller = new CC1InplaceEdittingController(m_fg); m_e_new_row_position = e_CC1InplaceEditting_NewRowPosition.next_row; m_fg.StartEdit += this.catch_fg_StartEdit; m_obj_edit_controller.BeforeUpdate += m_obj_edit_controller_BeforeUpdate; m_obj_edit_controller.OnUpdate += m_obj_edit_controller_OnUpdate; m_obj_edit_controller.OnCancelUpdate += m_obj_edit_controller_OnCancelUpdate; m_obj_edit_controller.BeforeInsert += m_obj_edit_controller_BeforeInsert; m_obj_edit_controller.OnInsert += m_obj_edit_controller_OnInsert; m_obj_edit_controller.OnCancelInsert += m_obj_edit_controller_OnCancelInsert; m_obj_edit_controller.BeforeDelete += m_obj_edit_controller_BeforeDelete; m_obj_edit_controller.OnDelete += m_obj_edit_controller_OnDelete; m_obj_edit_controller.OnCancelDelete += m_obj_edit_controller_OnCancelDelete; }
// ** ctor public DropDownEditor(C1FlexGrid flex, string keyColumn) { // some sanity if (!flex.Cols.Contains(keyColumn)) throw new ApplicationException(string.Format("Column '{0}' not found on the grid.", keyColumn)); // column that contains the value being edited _keyColumn = keyColumn; // initialize drop-down flex control _flex = flex; _flex.Cols.Fixed = 1; _flex.Cols[0].Width = _flex.Font.Height; _flex.ShowCursor = true; _flex.AllowFiltering = true; _flex.AllowEditing = false; _flex.BorderStyle = C1.Win.C1FlexGrid.Util.BaseControls.BorderStyleEnum.FixedSingle; _flex.SelectionMode = SelectionModeEnum.Row; _flex.FocusRect = FocusRectEnum.None; _flex.AutoSearch = AutoSearchEnum.FromCursor; // _flex.Click += new EventHandler(_flex_Click); _flex.DoubleClick += new EventHandler(_flex_DoubleClick); _flex.KeyPress += new KeyPressEventHandler(_flex_KeyPress); }
/// <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(f402_tao_bao_cao_danh_muc_tru_so_lam_viec)); this.ImageList = new System.Windows.Forms.ImageList(this.components); this.m_pnl_out_place_dm = new System.Windows.Forms.Panel(); this.m_cmd_export_excel = new SIS.Controls.Button.SiSButton(); this.m_cmd_exit = new SIS.Controls.Button.SiSButton(); this.m_fg_nha = new C1.Win.C1FlexGrid.C1FlexGrid(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.m_cmd_browser = new SIS.Controls.Button.SiSButton(); this.m_lbl_thong_bao = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label(); this.m_txt_file_path = new System.Windows.Forms.TextBox(); this.m_cbo_loai_hinh_don_vi = new System.Windows.Forms.ComboBox(); this.m_cbo_trang_thai = new System.Windows.Forms.ComboBox(); this.m_cbo_dia_chi = new System.Windows.Forms.ComboBox(); this.m_cbo_don_vi_su_dung = new System.Windows.Forms.ComboBox(); this.m_cbo_don_vi_chu_quan = new System.Windows.Forms.ComboBox(); this.m_cbo_bo_tinh = new System.Windows.Forms.ComboBox(); this.m_lbl_ten_bao_cao = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.m_lbl_trang_thai = new System.Windows.Forms.Label(); this.m_lbl_don_vi_chu_quan = new System.Windows.Forms.Label(); this.lbl = new System.Windows.Forms.Label(); this.m_lbl_don_vi_su_dung = new System.Windows.Forms.Label(); this.m_lbl_bo_tinh = new System.Windows.Forms.Label(); this.m_grb_thong_tin_nha_dat = new System.Windows.Forms.GroupBox(); this.panel2 = new System.Windows.Forms.Panel(); this.m_pnl_thong_tin_nha_dat = new System.Windows.Forms.Panel(); this.m_fg_excel_nha = new C1.Win.C1FlexGrid.C1FlexGrid(); this.label6 = new System.Windows.Forms.Label(); this.m_lbl_dia_chi = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.m_lbl_dien_tich_khuon_vien_dat = new System.Windows.Forms.Label(); this.label16 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label17 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label15 = new System.Windows.Forms.Label(); this.label20 = new System.Windows.Forms.Label(); this.m_lbl_bo_trong = new System.Windows.Forms.Label(); this.m_lbl_lam_tru_so_lam_viec = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label(); this.m_lbl_bi_lan_chiem = new System.Windows.Forms.Label(); this.m_lbl_cho_thue = new System.Windows.Forms.Label(); this.m_lbl_lam_co_so_hd_su_nghiep = new System.Windows.Forms.Label(); this.label11 = new System.Windows.Forms.Label(); this.m_lbl_gia_tri_theo_so_ke_toan = new System.Windows.Forms.Label(); this.m_lbl_lam_nha_o = new System.Windows.Forms.Label(); this.m_lbl_su_dung_vao_muc_dich_khac = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label(); this.m_openDiaglog = new System.Windows.Forms.OpenFileDialog(); this.m_pnl_out_place_dm.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.m_fg_nha)).BeginInit(); this.groupBox1.SuspendLayout(); this.m_grb_thong_tin_nha_dat.SuspendLayout(); this.panel2.SuspendLayout(); this.m_pnl_thong_tin_nha_dat.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.m_fg_excel_nha)).BeginInit(); this.SuspendLayout(); // // ImageList // this.ImageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("ImageList.ImageStream"))); this.ImageList.TransparentColor = System.Drawing.Color.Transparent; this.ImageList.Images.SetKeyName(0, ""); this.ImageList.Images.SetKeyName(1, ""); this.ImageList.Images.SetKeyName(2, ""); this.ImageList.Images.SetKeyName(3, ""); this.ImageList.Images.SetKeyName(4, ""); this.ImageList.Images.SetKeyName(5, ""); this.ImageList.Images.SetKeyName(6, ""); this.ImageList.Images.SetKeyName(7, ""); this.ImageList.Images.SetKeyName(8, ""); this.ImageList.Images.SetKeyName(9, ""); this.ImageList.Images.SetKeyName(10, ""); this.ImageList.Images.SetKeyName(11, ""); this.ImageList.Images.SetKeyName(12, ""); this.ImageList.Images.SetKeyName(13, ""); this.ImageList.Images.SetKeyName(14, ""); this.ImageList.Images.SetKeyName(15, ""); this.ImageList.Images.SetKeyName(16, ""); this.ImageList.Images.SetKeyName(17, ""); this.ImageList.Images.SetKeyName(18, ""); this.ImageList.Images.SetKeyName(19, ""); this.ImageList.Images.SetKeyName(20, ""); this.ImageList.Images.SetKeyName(21, ""); // // m_pnl_out_place_dm // this.m_pnl_out_place_dm.Controls.Add(this.m_cmd_export_excel); this.m_pnl_out_place_dm.Controls.Add(this.m_cmd_exit); this.m_pnl_out_place_dm.Dock = System.Windows.Forms.DockStyle.Bottom; this.m_pnl_out_place_dm.Location = new System.Drawing.Point(0, 538); this.m_pnl_out_place_dm.Name = "m_pnl_out_place_dm"; this.m_pnl_out_place_dm.Padding = new System.Windows.Forms.Padding(4); this.m_pnl_out_place_dm.Size = new System.Drawing.Size(1004, 36); this.m_pnl_out_place_dm.TabIndex = 19; // // m_cmd_export_excel // this.m_cmd_export_excel.AdjustImageLocation = new System.Drawing.Point(0, 0); this.m_cmd_export_excel.BtnShape = SIS.Controls.Button.emunType.BtnShape.Rectangle; this.m_cmd_export_excel.BtnStyle = SIS.Controls.Button.emunType.XPStyle.Default; this.m_cmd_export_excel.Dock = System.Windows.Forms.DockStyle.Left; this.m_cmd_export_excel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.m_cmd_export_excel.ImageIndex = 19; this.m_cmd_export_excel.ImageList = this.ImageList; this.m_cmd_export_excel.Location = new System.Drawing.Point(4, 4); this.m_cmd_export_excel.Name = "m_cmd_export_excel"; this.m_cmd_export_excel.Size = new System.Drawing.Size(88, 28); this.m_cmd_export_excel.TabIndex = 0; this.m_cmd_export_excel.Text = "Xuất Excel"; // // m_cmd_exit // this.m_cmd_exit.AdjustImageLocation = new System.Drawing.Point(0, 0); this.m_cmd_exit.BtnShape = SIS.Controls.Button.emunType.BtnShape.Rectangle; this.m_cmd_exit.BtnStyle = SIS.Controls.Button.emunType.XPStyle.Default; this.m_cmd_exit.Dock = System.Windows.Forms.DockStyle.Right; this.m_cmd_exit.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.m_cmd_exit.ImageIndex = 12; this.m_cmd_exit.ImageList = this.ImageList; this.m_cmd_exit.Location = new System.Drawing.Point(912, 4); this.m_cmd_exit.Name = "m_cmd_exit"; this.m_cmd_exit.Size = new System.Drawing.Size(88, 28); this.m_cmd_exit.TabIndex = 11; this.m_cmd_exit.Text = "Thoát (Esc)"; // // m_fg_nha // this.m_fg_nha.ColumnInfo = resources.GetString("m_fg_nha.ColumnInfo"); this.m_fg_nha.Dock = System.Windows.Forms.DockStyle.Fill; this.m_fg_nha.Location = new System.Drawing.Point(0, 0); this.m_fg_nha.Name = "m_fg_nha"; this.m_fg_nha.Rows.Count = 20; this.m_fg_nha.Size = new System.Drawing.Size(998, 98); this.m_fg_nha.Styles = new C1.Win.C1FlexGrid.CellStyleCollection(resources.GetString("m_fg_nha.Styles")); this.m_fg_nha.TabIndex = 20; // // groupBox1 // this.groupBox1.Controls.Add(this.m_cmd_browser); this.groupBox1.Controls.Add(this.m_lbl_thong_bao); this.groupBox1.Controls.Add(this.label7); this.groupBox1.Controls.Add(this.m_txt_file_path); this.groupBox1.Controls.Add(this.m_cbo_loai_hinh_don_vi); this.groupBox1.Controls.Add(this.m_cbo_trang_thai); this.groupBox1.Controls.Add(this.m_cbo_dia_chi); this.groupBox1.Controls.Add(this.m_cbo_don_vi_su_dung); this.groupBox1.Controls.Add(this.m_cbo_don_vi_chu_quan); this.groupBox1.Controls.Add(this.m_cbo_bo_tinh); this.groupBox1.Controls.Add(this.m_lbl_ten_bao_cao); this.groupBox1.Controls.Add(this.label1); this.groupBox1.Controls.Add(this.m_lbl_trang_thai); this.groupBox1.Controls.Add(this.m_lbl_don_vi_chu_quan); this.groupBox1.Controls.Add(this.lbl); this.groupBox1.Controls.Add(this.m_lbl_don_vi_su_dung); this.groupBox1.Controls.Add(this.m_lbl_bo_tinh); this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top; this.groupBox1.Location = new System.Drawing.Point(0, 0); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(1004, 235); this.groupBox1.TabIndex = 21; this.groupBox1.TabStop = false; this.groupBox1.Text = "Thông tin tìm kiếm"; // // m_cmd_browser // this.m_cmd_browser.AdjustImageLocation = new System.Drawing.Point(0, 0); this.m_cmd_browser.BtnShape = SIS.Controls.Button.emunType.BtnShape.Rectangle; this.m_cmd_browser.BtnStyle = SIS.Controls.Button.emunType.XPStyle.Default; this.m_cmd_browser.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.m_cmd_browser.ImageIndex = 5; this.m_cmd_browser.ImageList = this.ImageList; this.m_cmd_browser.Location = new System.Drawing.Point(454, 148); this.m_cmd_browser.Name = "m_cmd_browser"; this.m_cmd_browser.Size = new System.Drawing.Size(33, 28); this.m_cmd_browser.TabIndex = 0; // // m_lbl_thong_bao // this.m_lbl_thong_bao.AutoSize = true; this.m_lbl_thong_bao.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(163))); this.m_lbl_thong_bao.ForeColor = System.Drawing.Color.Red; this.m_lbl_thong_bao.Location = new System.Drawing.Point(181, 194); this.m_lbl_thong_bao.Name = "m_lbl_thong_bao"; this.m_lbl_thong_bao.Size = new System.Drawing.Size(12, 16); this.m_lbl_thong_bao.TabIndex = 10; this.m_lbl_thong_bao.Text = " "; // // label7 // this.label7.AutoSize = true; this.label7.Location = new System.Drawing.Point(125, 157); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(51, 13); this.label7.TabIndex = 10; this.label7.Text = "File excel"; // // m_txt_file_path // this.m_txt_file_path.Location = new System.Drawing.Point(184, 154); this.m_txt_file_path.Name = "m_txt_file_path"; this.m_txt_file_path.Size = new System.Drawing.Size(255, 20); this.m_txt_file_path.TabIndex = 9; // // m_cbo_loai_hinh_don_vi // this.m_cbo_loai_hinh_don_vi.FormattingEnabled = true; this.m_cbo_loai_hinh_don_vi.Location = new System.Drawing.Point(184, 90); this.m_cbo_loai_hinh_don_vi.Name = "m_cbo_loai_hinh_don_vi"; this.m_cbo_loai_hinh_don_vi.Size = new System.Drawing.Size(256, 21); this.m_cbo_loai_hinh_don_vi.TabIndex = 8; // // m_cbo_trang_thai // this.m_cbo_trang_thai.FormattingEnabled = true; this.m_cbo_trang_thai.Location = new System.Drawing.Point(641, 121); this.m_cbo_trang_thai.Name = "m_cbo_trang_thai"; this.m_cbo_trang_thai.Size = new System.Drawing.Size(256, 21); this.m_cbo_trang_thai.TabIndex = 8; // // m_cbo_dia_chi // this.m_cbo_dia_chi.FormattingEnabled = true; this.m_cbo_dia_chi.Location = new System.Drawing.Point(184, 121); this.m_cbo_dia_chi.Name = "m_cbo_dia_chi"; this.m_cbo_dia_chi.Size = new System.Drawing.Size(256, 21); this.m_cbo_dia_chi.TabIndex = 8; // // m_cbo_don_vi_su_dung // this.m_cbo_don_vi_su_dung.FormattingEnabled = true; this.m_cbo_don_vi_su_dung.Location = new System.Drawing.Point(641, 91); this.m_cbo_don_vi_su_dung.Name = "m_cbo_don_vi_su_dung"; this.m_cbo_don_vi_su_dung.Size = new System.Drawing.Size(256, 21); this.m_cbo_don_vi_su_dung.TabIndex = 8; // // m_cbo_don_vi_chu_quan // this.m_cbo_don_vi_chu_quan.FormattingEnabled = true; this.m_cbo_don_vi_chu_quan.Location = new System.Drawing.Point(641, 61); this.m_cbo_don_vi_chu_quan.Name = "m_cbo_don_vi_chu_quan"; this.m_cbo_don_vi_chu_quan.Size = new System.Drawing.Size(256, 21); this.m_cbo_don_vi_chu_quan.TabIndex = 8; // // m_cbo_bo_tinh // this.m_cbo_bo_tinh.FormattingEnabled = true; this.m_cbo_bo_tinh.Location = new System.Drawing.Point(184, 61); this.m_cbo_bo_tinh.Name = "m_cbo_bo_tinh"; this.m_cbo_bo_tinh.Size = new System.Drawing.Size(256, 21); this.m_cbo_bo_tinh.TabIndex = 6; // // m_lbl_ten_bao_cao // this.m_lbl_ten_bao_cao.Dock = System.Windows.Forms.DockStyle.Top; this.m_lbl_ten_bao_cao.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.m_lbl_ten_bao_cao.Location = new System.Drawing.Point(3, 16); this.m_lbl_ten_bao_cao.Name = "m_lbl_ten_bao_cao"; this.m_lbl_ten_bao_cao.Size = new System.Drawing.Size(998, 39); this.m_lbl_ten_bao_cao.TabIndex = 7; this.m_lbl_ten_bao_cao.Text = "BÁO CÁO KÊ KHAI NHÀ - TRỤ SỞ LÀM VIỆC"; this.m_lbl_ten_bao_cao.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // label1 // this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point(88, 93); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(86, 13); this.label1.TabIndex = 0; this.label1.Text = "Loại hình đơn vị:"; // // m_lbl_trang_thai // this.m_lbl_trang_thai.AutoSize = true; this.m_lbl_trang_thai.Location = new System.Drawing.Point(573, 124); this.m_lbl_trang_thai.Name = "m_lbl_trang_thai"; this.m_lbl_trang_thai.Size = new System.Drawing.Size(58, 13); this.m_lbl_trang_thai.TabIndex = 0; this.m_lbl_trang_thai.Text = "Trạng thái:"; // // m_lbl_don_vi_chu_quan // this.m_lbl_don_vi_chu_quan.AutoSize = true; this.m_lbl_don_vi_chu_quan.Location = new System.Drawing.Point(542, 64); this.m_lbl_don_vi_chu_quan.Name = "m_lbl_don_vi_chu_quan"; this.m_lbl_don_vi_chu_quan.Size = new System.Drawing.Size(89, 13); this.m_lbl_don_vi_chu_quan.TabIndex = 0; this.m_lbl_don_vi_chu_quan.Text = "Đơn vị chủ quản:"; // // lbl // this.lbl.AutoSize = true; this.lbl.Location = new System.Drawing.Point(117, 124); this.lbl.Name = "lbl"; this.lbl.Size = new System.Drawing.Size(62, 13); this.lbl.TabIndex = 0; this.lbl.Text = "Địa chỉ đất:"; // // m_lbl_don_vi_su_dung // this.m_lbl_don_vi_su_dung.AutoSize = true; this.m_lbl_don_vi_su_dung.Location = new System.Drawing.Point(549, 94); this.m_lbl_don_vi_su_dung.Name = "m_lbl_don_vi_su_dung"; this.m_lbl_don_vi_su_dung.Size = new System.Drawing.Size(82, 13); this.m_lbl_don_vi_su_dung.TabIndex = 0; this.m_lbl_don_vi_su_dung.Text = "Đơn vị sử dụng:"; // // m_lbl_bo_tinh // this.m_lbl_bo_tinh.AutoSize = true; this.m_lbl_bo_tinh.Location = new System.Drawing.Point(131, 64); this.m_lbl_bo_tinh.Name = "m_lbl_bo_tinh"; this.m_lbl_bo_tinh.Size = new System.Drawing.Size(45, 13); this.m_lbl_bo_tinh.TabIndex = 0; this.m_lbl_bo_tinh.Text = "Bộ/tỉnh:"; // // m_grb_thong_tin_nha_dat // this.m_grb_thong_tin_nha_dat.Controls.Add(this.panel2); this.m_grb_thong_tin_nha_dat.Controls.Add(this.m_pnl_thong_tin_nha_dat); this.m_grb_thong_tin_nha_dat.Dock = System.Windows.Forms.DockStyle.Fill; this.m_grb_thong_tin_nha_dat.Location = new System.Drawing.Point(0, 235); this.m_grb_thong_tin_nha_dat.Name = "m_grb_thong_tin_nha_dat"; this.m_grb_thong_tin_nha_dat.Size = new System.Drawing.Size(1004, 303); this.m_grb_thong_tin_nha_dat.TabIndex = 22; this.m_grb_thong_tin_nha_dat.TabStop = false; this.m_grb_thong_tin_nha_dat.Text = "Thông tin nhà đất"; // // panel2 // this.panel2.Controls.Add(this.m_fg_nha); this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; this.panel2.Location = new System.Drawing.Point(3, 202); this.panel2.Name = "panel2"; this.panel2.Size = new System.Drawing.Size(998, 98); this.panel2.TabIndex = 25; // // m_pnl_thong_tin_nha_dat // this.m_pnl_thong_tin_nha_dat.Controls.Add(this.m_fg_excel_nha); this.m_pnl_thong_tin_nha_dat.Controls.Add(this.label6); this.m_pnl_thong_tin_nha_dat.Controls.Add(this.m_lbl_dia_chi); this.m_pnl_thong_tin_nha_dat.Controls.Add(this.label2); this.m_pnl_thong_tin_nha_dat.Controls.Add(this.label3); this.m_pnl_thong_tin_nha_dat.Controls.Add(this.m_lbl_dien_tich_khuon_vien_dat); this.m_pnl_thong_tin_nha_dat.Controls.Add(this.label16); this.m_pnl_thong_tin_nha_dat.Controls.Add(this.label8); this.m_pnl_thong_tin_nha_dat.Controls.Add(this.label4); this.m_pnl_thong_tin_nha_dat.Controls.Add(this.label17); this.m_pnl_thong_tin_nha_dat.Controls.Add(this.label5); this.m_pnl_thong_tin_nha_dat.Controls.Add(this.label15); this.m_pnl_thong_tin_nha_dat.Controls.Add(this.label20); this.m_pnl_thong_tin_nha_dat.Controls.Add(this.m_lbl_bo_trong); this.m_pnl_thong_tin_nha_dat.Controls.Add(this.m_lbl_lam_tru_so_lam_viec); this.m_pnl_thong_tin_nha_dat.Controls.Add(this.label13); this.m_pnl_thong_tin_nha_dat.Controls.Add(this.m_lbl_bi_lan_chiem); this.m_pnl_thong_tin_nha_dat.Controls.Add(this.m_lbl_cho_thue); this.m_pnl_thong_tin_nha_dat.Controls.Add(this.m_lbl_lam_co_so_hd_su_nghiep); this.m_pnl_thong_tin_nha_dat.Controls.Add(this.label11); this.m_pnl_thong_tin_nha_dat.Controls.Add(this.m_lbl_gia_tri_theo_so_ke_toan); this.m_pnl_thong_tin_nha_dat.Controls.Add(this.m_lbl_lam_nha_o); this.m_pnl_thong_tin_nha_dat.Controls.Add(this.m_lbl_su_dung_vao_muc_dich_khac); this.m_pnl_thong_tin_nha_dat.Controls.Add(this.label9); this.m_pnl_thong_tin_nha_dat.Dock = System.Windows.Forms.DockStyle.Top; this.m_pnl_thong_tin_nha_dat.Location = new System.Drawing.Point(3, 16); this.m_pnl_thong_tin_nha_dat.Name = "m_pnl_thong_tin_nha_dat"; this.m_pnl_thong_tin_nha_dat.Size = new System.Drawing.Size(998, 186); this.m_pnl_thong_tin_nha_dat.TabIndex = 2; // // m_fg_excel_nha // this.m_fg_excel_nha.ColumnInfo = resources.GetString("m_fg_excel_nha.ColumnInfo"); this.m_fg_excel_nha.Location = new System.Drawing.Point(27, 14); this.m_fg_excel_nha.Name = "m_fg_excel_nha"; this.m_fg_excel_nha.Size = new System.Drawing.Size(971, 149); this.m_fg_excel_nha.Styles = new C1.Win.C1FlexGrid.CellStyleCollection(resources.GetString("m_fg_excel_nha.Styles")); this.m_fg_excel_nha.TabIndex = 1; // // label6 // this.label6.AutoSize = true; this.label6.Location = new System.Drawing.Point(312, 81); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(126, 13); this.label6.TabIndex = 1; this.label6.Text = "Làm cơ cở HĐ sự nghệp:"; // // m_lbl_dia_chi // this.m_lbl_dia_chi.AutoSize = true; this.m_lbl_dia_chi.ForeColor = System.Drawing.Color.Red; this.m_lbl_dia_chi.Location = new System.Drawing.Point(85, 9); this.m_lbl_dia_chi.Name = "m_lbl_dia_chi"; this.m_lbl_dia_chi.Size = new System.Drawing.Size(50, 13); this.m_lbl_dia_chi.TabIndex = 0; this.m_lbl_dia_chi.Text = " [dia_chi]"; // // label2 // this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(13, 9); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(43, 13); this.label2.TabIndex = 0; this.label2.Text = "Địa chỉ:"; // // label3 // this.label3.AutoSize = true; this.label3.Location = new System.Drawing.Point(13, 30); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(51, 13); this.label3.TabIndex = 0; this.label3.Text = "I - Về đất"; // // m_lbl_dien_tich_khuon_vien_dat // this.m_lbl_dien_tich_khuon_vien_dat.AutoSize = true; this.m_lbl_dien_tich_khuon_vien_dat.ForeColor = System.Drawing.Color.Red; this.m_lbl_dien_tich_khuon_vien_dat.Location = new System.Drawing.Point(175, 54); this.m_lbl_dien_tich_khuon_vien_dat.Name = "m_lbl_dien_tich_khuon_vien_dat"; this.m_lbl_dien_tich_khuon_vien_dat.Size = new System.Drawing.Size(13, 13); this.m_lbl_dien_tich_khuon_vien_dat.TabIndex = 0; this.m_lbl_dien_tich_khuon_vien_dat.Text = "0"; // // label16 // this.label16.AutoSize = true; this.label16.Location = new System.Drawing.Point(13, 166); this.label16.Name = "label16"; this.label16.Size = new System.Drawing.Size(56, 13); this.label16.TabIndex = 0; this.label16.Text = "II - Về nhà"; // // label8 // this.label8.AutoSize = true; this.label8.Location = new System.Drawing.Point(141, 81); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(101, 13); this.label8.TabIndex = 0; this.label8.Text = "Làm trụ sở làm việc:"; // // label4 // this.label4.AutoSize = true; this.label4.Location = new System.Drawing.Point(13, 54); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(144, 13); this.label4.TabIndex = 0; this.label4.Text = "a - Diện tích khuôn viên đất:"; // // label17 // this.label17.AutoSize = true; this.label17.Location = new System.Drawing.Point(496, 117); this.label17.Name = "label17"; this.label17.Size = new System.Drawing.Size(147, 13); this.label17.TabIndex = 0; this.label17.Text = "Sử dụng vào mục đích khác:"; // // label5 // this.label5.AutoSize = true; this.label5.Location = new System.Drawing.Point(13, 81); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(115, 13); this.label5.TabIndex = 0; this.label5.Text = "b - Hiện trạng sử dụng:"; // // label15 // this.label15.AutoSize = true; this.label15.Location = new System.Drawing.Point(370, 117); this.label15.Name = "label15"; this.label15.Size = new System.Drawing.Size(67, 13); this.label15.TabIndex = 0; this.label15.Text = "Bị lấn chiếm:"; // // label20 // this.label20.AutoSize = true; this.label20.Location = new System.Drawing.Point(13, 139); this.label20.Name = "label20"; this.label20.Size = new System.Drawing.Size(126, 13); this.label20.TabIndex = 0; this.label20.Text = "c- Giá trị theo sổ kế toán:"; // // m_lbl_bo_trong // this.m_lbl_bo_trong.AutoSize = true; this.m_lbl_bo_trong.ForeColor = System.Drawing.Color.Red; this.m_lbl_bo_trong.Location = new System.Drawing.Point(269, 117); this.m_lbl_bo_trong.Name = "m_lbl_bo_trong"; this.m_lbl_bo_trong.Size = new System.Drawing.Size(13, 13); this.m_lbl_bo_trong.TabIndex = 0; this.m_lbl_bo_trong.Text = "1"; // // m_lbl_lam_tru_so_lam_viec // this.m_lbl_lam_tru_so_lam_viec.AutoSize = true; this.m_lbl_lam_tru_so_lam_viec.ForeColor = System.Drawing.Color.Red; this.m_lbl_lam_tru_so_lam_viec.Location = new System.Drawing.Point(269, 81); this.m_lbl_lam_tru_so_lam_viec.Name = "m_lbl_lam_tru_so_lam_viec"; this.m_lbl_lam_tru_so_lam_viec.Size = new System.Drawing.Size(13, 13); this.m_lbl_lam_tru_so_lam_viec.TabIndex = 0; this.m_lbl_lam_tru_so_lam_viec.Text = "1"; // // label13 // this.label13.AutoSize = true; this.label13.Location = new System.Drawing.Point(192, 117); this.label13.Name = "label13"; this.label13.Size = new System.Drawing.Size(50, 13); this.label13.TabIndex = 0; this.label13.Text = "Bỏ trống:"; // // m_lbl_bi_lan_chiem // this.m_lbl_bi_lan_chiem.AutoSize = true; this.m_lbl_bi_lan_chiem.ForeColor = System.Drawing.Color.Red; this.m_lbl_bi_lan_chiem.Location = new System.Drawing.Point(451, 117); this.m_lbl_bi_lan_chiem.Name = "m_lbl_bi_lan_chiem"; this.m_lbl_bi_lan_chiem.Size = new System.Drawing.Size(13, 13); this.m_lbl_bi_lan_chiem.TabIndex = 0; this.m_lbl_bi_lan_chiem.Text = "1"; // // m_lbl_cho_thue // this.m_lbl_cho_thue.AutoSize = true; this.m_lbl_cho_thue.ForeColor = System.Drawing.Color.Red; this.m_lbl_cho_thue.Location = new System.Drawing.Point(769, 81); this.m_lbl_cho_thue.Name = "m_lbl_cho_thue"; this.m_lbl_cho_thue.Size = new System.Drawing.Size(13, 13); this.m_lbl_cho_thue.TabIndex = 0; this.m_lbl_cho_thue.Text = "1"; // // m_lbl_lam_co_so_hd_su_nghiep // this.m_lbl_lam_co_so_hd_su_nghiep.AutoSize = true; this.m_lbl_lam_co_so_hd_su_nghiep.ForeColor = System.Drawing.Color.Red; this.m_lbl_lam_co_so_hd_su_nghiep.Location = new System.Drawing.Point(452, 81); this.m_lbl_lam_co_so_hd_su_nghiep.Name = "m_lbl_lam_co_so_hd_su_nghiep"; this.m_lbl_lam_co_so_hd_su_nghiep.Size = new System.Drawing.Size(13, 13); this.m_lbl_lam_co_so_hd_su_nghiep.TabIndex = 0; this.m_lbl_lam_co_so_hd_su_nghiep.Text = "1"; // // label11 // this.label11.AutoSize = true; this.label11.Location = new System.Drawing.Point(704, 81); this.label11.Name = "label11"; this.label11.Size = new System.Drawing.Size(53, 13); this.label11.TabIndex = 0; this.label11.Text = "Cho thuê:"; // // m_lbl_gia_tri_theo_so_ke_toan // this.m_lbl_gia_tri_theo_so_ke_toan.AutoSize = true; this.m_lbl_gia_tri_theo_so_ke_toan.ForeColor = System.Drawing.Color.Red; this.m_lbl_gia_tri_theo_so_ke_toan.Location = new System.Drawing.Point(172, 139); this.m_lbl_gia_tri_theo_so_ke_toan.Name = "m_lbl_gia_tri_theo_so_ke_toan"; this.m_lbl_gia_tri_theo_so_ke_toan.Size = new System.Drawing.Size(13, 13); this.m_lbl_gia_tri_theo_so_ke_toan.TabIndex = 0; this.m_lbl_gia_tri_theo_so_ke_toan.Text = "1"; // // m_lbl_lam_nha_o // this.m_lbl_lam_nha_o.AutoSize = true; this.m_lbl_lam_nha_o.ForeColor = System.Drawing.Color.Red; this.m_lbl_lam_nha_o.Location = new System.Drawing.Point(661, 81); this.m_lbl_lam_nha_o.Name = "m_lbl_lam_nha_o"; this.m_lbl_lam_nha_o.Size = new System.Drawing.Size(13, 13); this.m_lbl_lam_nha_o.TabIndex = 0; this.m_lbl_lam_nha_o.Text = "1"; // // m_lbl_su_dung_vao_muc_dich_khac // this.m_lbl_su_dung_vao_muc_dich_khac.AutoSize = true; this.m_lbl_su_dung_vao_muc_dich_khac.ForeColor = System.Drawing.Color.Red; this.m_lbl_su_dung_vao_muc_dich_khac.Location = new System.Drawing.Point(661, 117); this.m_lbl_su_dung_vao_muc_dich_khac.Name = "m_lbl_su_dung_vao_muc_dich_khac"; this.m_lbl_su_dung_vao_muc_dich_khac.Size = new System.Drawing.Size(13, 13); this.m_lbl_su_dung_vao_muc_dich_khac.TabIndex = 0; this.m_lbl_su_dung_vao_muc_dich_khac.Text = "1"; // // label9 // this.label9.AutoSize = true; this.label9.Location = new System.Drawing.Point(577, 81); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(60, 13); this.label9.TabIndex = 0; this.label9.Text = "Làm nhà ở:"; // // m_openDiaglog // this.m_openDiaglog.FileName = "openFileDialog1"; // // f402_tao_bao_cao_danh_muc_tru_so_lam_viec // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(1004, 574); this.Controls.Add(this.m_grb_thong_tin_nha_dat); this.Controls.Add(this.groupBox1); this.Controls.Add(this.m_pnl_out_place_dm); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Name = "f402_tao_bao_cao_danh_muc_tru_so_lam_viec"; this.Text = "F402 Tạo báo cáo danh mục nhà, trụ sở làm việc"; this.m_pnl_out_place_dm.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.m_fg_nha)).EndInit(); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); this.m_grb_thong_tin_nha_dat.ResumeLayout(false); this.panel2.ResumeLayout(false); this.m_pnl_thong_tin_nha_dat.ResumeLayout(false); this.m_pnl_thong_tin_nha_dat.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.m_fg_excel_nha)).EndInit(); this.ResumeLayout(false); }
public void Export2Grid(C1FlexGrid i_fg, int i_iSheetStartRow, int i_iSheetCol, int i_iGridCol) { try { System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture("en-US"); m_objExcelApp = new Excel.Application(); m_objExcelApp.Workbooks.Open(m_strTemplateFileNameWithPath, null, null, null, null, null, null, null, null, null, null, null, null, null, null); m_objExcelApp.Workbooks[1].Worksheets.Select(1); m_objExcelWorksheet = (Excel.Worksheet)(m_objExcelApp.Workbooks[1].Worksheets[1]); int v_iGridRow = 0; for (v_iGridRow = i_fg.Rows.Fixed; v_iGridRow <= i_fg.Rows.Count - 1; v_iGridRow++) { i_fg[v_iGridRow, i_iGridCol] = m_objExcelWorksheet.Cells[i_iSheetStartRow + v_iGridRow - i_fg.Rows.Fixed, i_iSheetCol];//.Value } m_objExcelApp.Workbooks.Close(); m_objExcelApp.Quit(); Unmount(); } catch (Exception v_e) { m_objExcelApp.Workbooks.Close(); m_objExcelApp.Quit(); Unmount(); throw (v_e); } }
/// <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(f462_Nhap_ma_hoa_don_NCC)); this.ImageList = new System.Windows.Forms.ImageList(this.components); this.m_pnl_out_place_dm = new System.Windows.Forms.Panel(); this.m_cmd_insert = new SIS.Controls.Button.SiSButton(); this.m_cmd_update = new SIS.Controls.Button.SiSButton(); this.m_cmd_view = new SIS.Controls.Button.SiSButton(); this.m_cmd_delete = new SIS.Controls.Button.SiSButton(); this.m_cmd_exit = new SIS.Controls.Button.SiSButton(); this.m_fg_don_dat_hang = new C1.Win.C1FlexGrid.C1FlexGrid(); this.m_pnl_header = new System.Windows.Forms.Panel(); this.m_lbl_header = new System.Windows.Forms.Label(); this.m_pnl_don_dat_hang = new System.Windows.Forms.Panel(); this.m_cmd_save = new SIS.Controls.Button.SiSButton(); this.m_cbo_loc = new System.Windows.Forms.ComboBox(); this.m_dt_chon_thang = new System.Windows.Forms.DateTimePicker(); this.m_lbl_ds_don_dat_hang = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.m_lbl_chon_trang_thai = new System.Windows.Forms.Label(); this.m_lbl_loading = new System.Windows.Forms.Label(); this.m_lbl_tu_ngay = new System.Windows.Forms.Label(); this.m_pnl_don_dat_hang_de = new System.Windows.Forms.Panel(); this.m_lbl_ds_don_dat_hang_de = new System.Windows.Forms.Label(); this.m_fg_don_dat_hang_de = new C1.Win.C1FlexGrid.C1FlexGrid(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.m_cbo_phong_ban = new System.Windows.Forms.ComboBox(); this.textBox1 = new System.Windows.Forms.TextBox(); this.textBox2 = new System.Windows.Forms.TextBox(); this.label2 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.m_pnl_out_place_dm.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.m_fg_don_dat_hang)).BeginInit(); this.m_pnl_header.SuspendLayout(); this.m_pnl_don_dat_hang.SuspendLayout(); this.m_pnl_don_dat_hang_de.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.m_fg_don_dat_hang_de)).BeginInit(); this.SuspendLayout(); // // ImageList // this.ImageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("ImageList.ImageStream"))); this.ImageList.TransparentColor = System.Drawing.Color.Transparent; this.ImageList.Images.SetKeyName(0, ""); this.ImageList.Images.SetKeyName(1, ""); this.ImageList.Images.SetKeyName(2, ""); this.ImageList.Images.SetKeyName(3, ""); this.ImageList.Images.SetKeyName(4, ""); this.ImageList.Images.SetKeyName(5, ""); this.ImageList.Images.SetKeyName(6, ""); this.ImageList.Images.SetKeyName(7, ""); this.ImageList.Images.SetKeyName(8, ""); this.ImageList.Images.SetKeyName(9, ""); this.ImageList.Images.SetKeyName(10, ""); this.ImageList.Images.SetKeyName(11, ""); this.ImageList.Images.SetKeyName(12, ""); this.ImageList.Images.SetKeyName(13, ""); this.ImageList.Images.SetKeyName(14, ""); this.ImageList.Images.SetKeyName(15, ""); this.ImageList.Images.SetKeyName(16, ""); this.ImageList.Images.SetKeyName(17, ""); this.ImageList.Images.SetKeyName(18, ""); this.ImageList.Images.SetKeyName(19, ""); this.ImageList.Images.SetKeyName(20, ""); this.ImageList.Images.SetKeyName(21, ""); // // m_pnl_out_place_dm // this.m_pnl_out_place_dm.Controls.Add(this.m_cmd_insert); this.m_pnl_out_place_dm.Controls.Add(this.m_cmd_update); this.m_pnl_out_place_dm.Controls.Add(this.m_cmd_view); this.m_pnl_out_place_dm.Controls.Add(this.m_cmd_delete); this.m_pnl_out_place_dm.Controls.Add(this.m_cmd_exit); this.m_pnl_out_place_dm.Dock = System.Windows.Forms.DockStyle.Bottom; this.m_pnl_out_place_dm.Location = new System.Drawing.Point(0, 598); this.m_pnl_out_place_dm.Name = "m_pnl_out_place_dm"; this.m_pnl_out_place_dm.Padding = new System.Windows.Forms.Padding(4); this.m_pnl_out_place_dm.Size = new System.Drawing.Size(938, 36); this.m_pnl_out_place_dm.TabIndex = 19; // // m_cmd_insert // this.m_cmd_insert.AdjustImageLocation = new System.Drawing.Point(0, 0); this.m_cmd_insert.BtnShape = SIS.Controls.Button.emunType.BtnShape.Rectangle; this.m_cmd_insert.BtnStyle = SIS.Controls.Button.emunType.XPStyle.Default; this.m_cmd_insert.Dock = System.Windows.Forms.DockStyle.Right; this.m_cmd_insert.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.m_cmd_insert.ImageIndex = 2; this.m_cmd_insert.ImageList = this.ImageList; this.m_cmd_insert.Location = new System.Drawing.Point(582, 4); this.m_cmd_insert.Name = "m_cmd_insert"; this.m_cmd_insert.Size = new System.Drawing.Size(88, 28); this.m_cmd_insert.TabIndex = 12; this.m_cmd_insert.Text = "&Thêm"; // // m_cmd_update // this.m_cmd_update.AdjustImageLocation = new System.Drawing.Point(0, 0); this.m_cmd_update.BtnShape = SIS.Controls.Button.emunType.BtnShape.Rectangle; this.m_cmd_update.BtnStyle = SIS.Controls.Button.emunType.XPStyle.Default; this.m_cmd_update.Dock = System.Windows.Forms.DockStyle.Right; this.m_cmd_update.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.m_cmd_update.ImageIndex = 3; this.m_cmd_update.ImageList = this.ImageList; this.m_cmd_update.Location = new System.Drawing.Point(670, 4); this.m_cmd_update.Name = "m_cmd_update"; this.m_cmd_update.Size = new System.Drawing.Size(88, 28); this.m_cmd_update.TabIndex = 13; this.m_cmd_update.Text = "&Sửa"; // // m_cmd_view // this.m_cmd_view.AdjustImageLocation = new System.Drawing.Point(0, 0); this.m_cmd_view.BtnShape = SIS.Controls.Button.emunType.BtnShape.Rectangle; this.m_cmd_view.BtnStyle = SIS.Controls.Button.emunType.XPStyle.Default; this.m_cmd_view.Dock = System.Windows.Forms.DockStyle.Left; this.m_cmd_view.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.m_cmd_view.ImageIndex = 18; this.m_cmd_view.ImageList = this.ImageList; this.m_cmd_view.Location = new System.Drawing.Point(4, 4); this.m_cmd_view.Name = "m_cmd_view"; this.m_cmd_view.Size = new System.Drawing.Size(88, 28); this.m_cmd_view.TabIndex = 21; this.m_cmd_view.Text = "Xem"; // // m_cmd_delete // this.m_cmd_delete.AdjustImageLocation = new System.Drawing.Point(0, 0); this.m_cmd_delete.BtnShape = SIS.Controls.Button.emunType.BtnShape.Rectangle; this.m_cmd_delete.BtnStyle = SIS.Controls.Button.emunType.XPStyle.Default; this.m_cmd_delete.Dock = System.Windows.Forms.DockStyle.Right; this.m_cmd_delete.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.m_cmd_delete.ImageIndex = 4; this.m_cmd_delete.ImageList = this.ImageList; this.m_cmd_delete.Location = new System.Drawing.Point(758, 4); this.m_cmd_delete.Name = "m_cmd_delete"; this.m_cmd_delete.Size = new System.Drawing.Size(88, 28); this.m_cmd_delete.TabIndex = 14; this.m_cmd_delete.Text = "&Xoá"; // // m_cmd_exit // this.m_cmd_exit.AdjustImageLocation = new System.Drawing.Point(0, 0); this.m_cmd_exit.BtnShape = SIS.Controls.Button.emunType.BtnShape.Rectangle; this.m_cmd_exit.BtnStyle = SIS.Controls.Button.emunType.XPStyle.Default; this.m_cmd_exit.Dock = System.Windows.Forms.DockStyle.Right; this.m_cmd_exit.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.m_cmd_exit.ImageIndex = 12; this.m_cmd_exit.ImageList = this.ImageList; this.m_cmd_exit.Location = new System.Drawing.Point(846, 4); this.m_cmd_exit.Name = "m_cmd_exit"; this.m_cmd_exit.Size = new System.Drawing.Size(88, 28); this.m_cmd_exit.TabIndex = 11; this.m_cmd_exit.Text = "Thoát (Esc)"; // // m_fg_don_dat_hang // this.m_fg_don_dat_hang.ColumnInfo = resources.GetString("m_fg_don_dat_hang.ColumnInfo"); this.m_fg_don_dat_hang.Dock = System.Windows.Forms.DockStyle.Bottom; this.m_fg_don_dat_hang.Location = new System.Drawing.Point(0, 74); this.m_fg_don_dat_hang.Name = "m_fg_don_dat_hang"; this.m_fg_don_dat_hang.SelectionMode = C1.Win.C1FlexGrid.SelectionModeEnum.Row; this.m_fg_don_dat_hang.Size = new System.Drawing.Size(938, 195); this.m_fg_don_dat_hang.Styles = new C1.Win.C1FlexGrid.CellStyleCollection(resources.GetString("m_fg_don_dat_hang.Styles")); this.m_fg_don_dat_hang.TabIndex = 20; this.toolTip1.SetToolTip(this.m_fg_don_dat_hang, "Click chuột vào ô trên cột \"Mã HD của NCC\" để nhập "); // // m_pnl_header // this.m_pnl_header.Controls.Add(this.m_lbl_header); this.m_pnl_header.Dock = System.Windows.Forms.DockStyle.Top; this.m_pnl_header.Location = new System.Drawing.Point(0, 0); this.m_pnl_header.Name = "m_pnl_header"; this.m_pnl_header.Size = new System.Drawing.Size(938, 47); this.m_pnl_header.TabIndex = 21; // // m_lbl_header // this.m_lbl_header.AutoSize = true; this.m_lbl_header.Font = new System.Drawing.Font("Tahoma", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.m_lbl_header.ForeColor = System.Drawing.Color.Maroon; this.m_lbl_header.Location = new System.Drawing.Point(284, 9); this.m_lbl_header.Name = "m_lbl_header"; this.m_lbl_header.Size = new System.Drawing.Size(282, 23); this.m_lbl_header.TabIndex = 0; this.m_lbl_header.Text = "NHẬP MÃ HÓA ĐƠN TỪ NCC"; // // m_pnl_don_dat_hang // this.m_pnl_don_dat_hang.Controls.Add(this.textBox2); this.m_pnl_don_dat_hang.Controls.Add(this.textBox1); this.m_pnl_don_dat_hang.Controls.Add(this.m_cbo_phong_ban); this.m_pnl_don_dat_hang.Controls.Add(this.m_cmd_save); this.m_pnl_don_dat_hang.Controls.Add(this.m_cbo_loc); this.m_pnl_don_dat_hang.Controls.Add(this.m_dt_chon_thang); this.m_pnl_don_dat_hang.Controls.Add(this.m_lbl_ds_don_dat_hang); this.m_pnl_don_dat_hang.Controls.Add(this.label1); this.m_pnl_don_dat_hang.Controls.Add(this.label3); this.m_pnl_don_dat_hang.Controls.Add(this.label2); this.m_pnl_don_dat_hang.Controls.Add(this.m_lbl_chon_trang_thai); this.m_pnl_don_dat_hang.Controls.Add(this.m_lbl_loading); this.m_pnl_don_dat_hang.Controls.Add(this.m_lbl_tu_ngay); this.m_pnl_don_dat_hang.Controls.Add(this.m_fg_don_dat_hang); this.m_pnl_don_dat_hang.Dock = System.Windows.Forms.DockStyle.Top; this.m_pnl_don_dat_hang.Location = new System.Drawing.Point(0, 47); this.m_pnl_don_dat_hang.Name = "m_pnl_don_dat_hang"; this.m_pnl_don_dat_hang.Size = new System.Drawing.Size(938, 269); this.m_pnl_don_dat_hang.TabIndex = 22; // // m_cmd_save // this.m_cmd_save.AdjustImageLocation = new System.Drawing.Point(0, 0); this.m_cmd_save.BtnShape = SIS.Controls.Button.emunType.BtnShape.Rectangle; this.m_cmd_save.BtnStyle = SIS.Controls.Button.emunType.XPStyle.Default; this.m_cmd_save.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.m_cmd_save.ImageIndex = 10; this.m_cmd_save.ImageList = this.ImageList; this.m_cmd_save.Location = new System.Drawing.Point(739, 7); this.m_cmd_save.Name = "m_cmd_save"; this.m_cmd_save.Size = new System.Drawing.Size(187, 35); this.m_cmd_save.TabIndex = 27; this.m_cmd_save.Text = "Kiểm tra và lưu mã HD NCC"; // // m_cbo_loc // this.m_cbo_loc.DisplayMember = "Chưa có mã HD từ NCC"; this.m_cbo_loc.Items.AddRange(new object[] { "----------Tất cả---------", "Chưa có mã HD từ NCC", "Đã có mã HD từ NCC"}); this.m_cbo_loc.Location = new System.Drawing.Point(572, 20); this.m_cbo_loc.Name = "m_cbo_loc"; this.m_cbo_loc.Size = new System.Drawing.Size(151, 21); this.m_cbo_loc.TabIndex = 26; this.m_cbo_loc.Text = "Chưa có mã HD từ NCC"; this.m_cbo_loc.SelectedIndexChanged += new System.EventHandler(this.m_cbo_loc_SelectedIndexChanged); // // m_dt_chon_thang // this.m_dt_chon_thang.Checked = false; this.m_dt_chon_thang.CustomFormat = "MM/yyyy"; this.m_dt_chon_thang.Format = System.Windows.Forms.DateTimePickerFormat.Custom; this.m_dt_chon_thang.Location = new System.Drawing.Point(86, 18); this.m_dt_chon_thang.Name = "m_dt_chon_thang"; this.m_dt_chon_thang.Size = new System.Drawing.Size(84, 20); this.m_dt_chon_thang.TabIndex = 25; this.m_dt_chon_thang.Value = new System.DateTime(2001, 1, 1, 0, 0, 0, 0); // // m_lbl_ds_don_dat_hang // this.m_lbl_ds_don_dat_hang.AutoSize = true; this.m_lbl_ds_don_dat_hang.ForeColor = System.Drawing.Color.Blue; this.m_lbl_ds_don_dat_hang.Location = new System.Drawing.Point(4, 53); this.m_lbl_ds_don_dat_hang.Name = "m_lbl_ds_don_dat_hang"; this.m_lbl_ds_don_dat_hang.Size = new System.Drawing.Size(127, 13); this.m_lbl_ds_don_dat_hang.TabIndex = 21; this.m_lbl_ds_don_dat_hang.Text = "Danh sách đơn đặt hàng"; // // label1 // this.label1.AutoSize = true; this.label1.Font = new System.Drawing.Font("Times New Roman", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label1.ForeColor = System.Drawing.Color.Maroon; this.label1.Location = new System.Drawing.Point(190, 26); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(65, 15); this.label1.TabIndex = 24; this.label1.Text = "Phòng ban"; // // m_lbl_chon_trang_thai // this.m_lbl_chon_trang_thai.AutoSize = true; this.m_lbl_chon_trang_thai.Font = new System.Drawing.Font("Times New Roman", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.m_lbl_chon_trang_thai.ForeColor = System.Drawing.Color.Maroon; this.m_lbl_chon_trang_thai.Location = new System.Drawing.Point(481, 26); this.m_lbl_chon_trang_thai.Name = "m_lbl_chon_trang_thai"; this.m_lbl_chon_trang_thai.Size = new System.Drawing.Size(85, 15); this.m_lbl_chon_trang_thai.TabIndex = 24; this.m_lbl_chon_trang_thai.Text = "Lọc danh sách"; // // m_lbl_loading // this.m_lbl_loading.AutoSize = true; this.m_lbl_loading.Font = new System.Drawing.Font("Times New Roman", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.m_lbl_loading.ForeColor = System.Drawing.Color.Maroon; this.m_lbl_loading.Location = new System.Drawing.Point(334, 53); this.m_lbl_loading.Name = "m_lbl_loading"; this.m_lbl_loading.Size = new System.Drawing.Size(139, 15); this.m_lbl_loading.TabIndex = 24; this.m_lbl_loading.Text = "Đang thực hiện, xin đợi..."; this.m_lbl_loading.Visible = false; // // m_lbl_tu_ngay // this.m_lbl_tu_ngay.AutoSize = true; this.m_lbl_tu_ngay.Font = new System.Drawing.Font("Times New Roman", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.m_lbl_tu_ngay.ForeColor = System.Drawing.Color.Maroon; this.m_lbl_tu_ngay.Location = new System.Drawing.Point(12, 22); this.m_lbl_tu_ngay.Name = "m_lbl_tu_ngay"; this.m_lbl_tu_ngay.Size = new System.Drawing.Size(70, 15); this.m_lbl_tu_ngay.TabIndex = 24; this.m_lbl_tu_ngay.Text = "Chọn tháng"; // // m_pnl_don_dat_hang_de // this.m_pnl_don_dat_hang_de.Controls.Add(this.m_lbl_ds_don_dat_hang_de); this.m_pnl_don_dat_hang_de.Controls.Add(this.m_fg_don_dat_hang_de); this.m_pnl_don_dat_hang_de.Dock = System.Windows.Forms.DockStyle.Bottom; this.m_pnl_don_dat_hang_de.Location = new System.Drawing.Point(0, 336); this.m_pnl_don_dat_hang_de.Name = "m_pnl_don_dat_hang_de"; this.m_pnl_don_dat_hang_de.Size = new System.Drawing.Size(938, 262); this.m_pnl_don_dat_hang_de.TabIndex = 23; // // m_lbl_ds_don_dat_hang_de // this.m_lbl_ds_don_dat_hang_de.AutoSize = true; this.m_lbl_ds_don_dat_hang_de.ForeColor = System.Drawing.Color.Blue; this.m_lbl_ds_don_dat_hang_de.Location = new System.Drawing.Point(12, 14); this.m_lbl_ds_don_dat_hang_de.Name = "m_lbl_ds_don_dat_hang_de"; this.m_lbl_ds_don_dat_hang_de.Size = new System.Drawing.Size(88, 13); this.m_lbl_ds_don_dat_hang_de.TabIndex = 21; this.m_lbl_ds_don_dat_hang_de.Text = "Chi tiết đơn hàng"; // // m_fg_don_dat_hang_de // this.m_fg_don_dat_hang_de.ColumnInfo = resources.GetString("m_fg_don_dat_hang_de.ColumnInfo"); this.m_fg_don_dat_hang_de.Dock = System.Windows.Forms.DockStyle.Bottom; this.m_fg_don_dat_hang_de.Location = new System.Drawing.Point(0, 28); this.m_fg_don_dat_hang_de.Name = "m_fg_don_dat_hang_de"; this.m_fg_don_dat_hang_de.Size = new System.Drawing.Size(938, 234); this.m_fg_don_dat_hang_de.Styles = new C1.Win.C1FlexGrid.CellStyleCollection(resources.GetString("m_fg_don_dat_hang_de.Styles")); this.m_fg_don_dat_hang_de.TabIndex = 21; // // m_cbo_phong_ban // this.m_cbo_phong_ban.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.m_cbo_phong_ban.FormattingEnabled = true; this.m_cbo_phong_ban.Location = new System.Drawing.Point(261, 20); this.m_cbo_phong_ban.Name = "m_cbo_phong_ban"; this.m_cbo_phong_ban.Size = new System.Drawing.Size(201, 21); this.m_cbo_phong_ban.TabIndex = 28; // // textBox1 // this.textBox1.BackColor = System.Drawing.Color.Yellow; this.textBox1.Enabled = false; this.textBox1.Location = new System.Drawing.Point(534, 48); this.textBox1.Name = "textBox1"; this.textBox1.Size = new System.Drawing.Size(32, 20); this.textBox1.TabIndex = 29; // // textBox2 // this.textBox2.BackColor = System.Drawing.Color.AliceBlue; this.textBox2.Enabled = false; this.textBox2.Location = new System.Drawing.Point(750, 48); this.textBox2.Name = "textBox2"; this.textBox2.Size = new System.Drawing.Size(32, 20); this.textBox2.TabIndex = 29; // // label2 // this.label2.AutoSize = true; this.label2.Font = new System.Drawing.Font("Times New Roman", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label2.ForeColor = System.Drawing.Color.Maroon; this.label2.Location = new System.Drawing.Point(572, 53); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(151, 15); this.label2.TabIndex = 24; this.label2.Text = "Đơn hàng chưa có mã NCC"; // // label3 // this.label3.AutoSize = true; this.label3.Font = new System.Drawing.Font("Times New Roman", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label3.ForeColor = System.Drawing.Color.Maroon; this.label3.Location = new System.Drawing.Point(788, 50); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(138, 15); this.label3.TabIndex = 24; this.label3.Text = "Đơn hàng đã có mà NCC"; // // f462_Nhap_ma_hoa_don_NCC // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(938, 634); this.Controls.Add(this.m_pnl_don_dat_hang_de); this.Controls.Add(this.m_pnl_don_dat_hang); this.Controls.Add(this.m_pnl_header); this.Controls.Add(this.m_pnl_out_place_dm); this.Name = "f462_Nhap_ma_hoa_don_NCC"; this.Text = "f462 -Nhập mã hóa đơn từ NCC"; this.Load += new System.EventHandler(this.f461_Nhap_ma_hoa_don_NCC_Load); this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.f462_Nhap_ma_hoa_don_NCC_KeyDown); this.m_pnl_out_place_dm.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.m_fg_don_dat_hang)).EndInit(); this.m_pnl_header.ResumeLayout(false); this.m_pnl_header.PerformLayout(); this.m_pnl_don_dat_hang.ResumeLayout(false); this.m_pnl_don_dat_hang.PerformLayout(); this.m_pnl_don_dat_hang_de.ResumeLayout(false); this.m_pnl_don_dat_hang_de.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.m_fg_don_dat_hang_de)).EndInit(); this.ResumeLayout(false); }
private DataSet grid_to_dataset_export_excel(C1FlexGrid ip_fg) { DataSet op_ds = new DataSet(); DataTable v_dt = new DataTable(); v_dt.Columns.Add("STT"); v_dt.Columns.Add("NOI_DUNG"); v_dt.Columns.Add("NGUOI_GUI"); v_dt.Columns.Add("NGUOI_NHAN"); v_dt.Columns.Add("NOI_NHAN"); v_dt.Columns.Add("NGAY_GUI"); v_dt.Columns.Add("SO_BILL"); v_dt.Columns.Add("SO_TIEN"); v_dt.Columns.Add("GHI_CHU"); op_ds.Tables.Add(v_dt); for (int i = 1; i < ip_fg.Rows.Count; i++) { DataRow v_dr=v_dt.NewRow(); v_dr["STT"]=i; v_dr["NOI_DUNG"] = ip_fg.Rows[i][(int)e_col_Number.NOI_DUNG] == null ? "" : ip_fg.Rows[i][(int)e_col_Number.NOI_DUNG].ToString(); v_dr["NGUOI_GUI"] = ip_fg.Rows[i][(int)e_col_Number.NGUOI_GUI] == null ? "" : ip_fg.Rows[i][(int)e_col_Number.NGUOI_GUI].ToString(); v_dr["NGUOI_NHAN"] = ip_fg.Rows[i][(int)e_col_Number.NGUOI_NHAN] == null ? "" : ip_fg.Rows[i][(int)e_col_Number.NGUOI_NHAN].ToString(); v_dr["NOI_NHAN"] = ip_fg.Rows[i][(int)e_col_Number.NOI_NHAN] == null ? "" : ip_fg.Rows[i][(int)e_col_Number.NOI_NHAN].ToString(); v_dr["NGAY_GUI"] = ip_fg.Rows[i][(int)e_col_Number.NGAY_GUI].ToString().Split(' ')[0]; v_dr["SO_BILL"] = ip_fg.Rows[i][(int)e_col_Number.SO_BILL].ToString(); v_dr["SO_TIEN"] = ip_fg.Rows[i][(int)e_col_Number.SO_TIEN]==null?"":ip_fg.Rows[i][(int)e_col_Number.SO_TIEN].ToString(); v_dr["GHI_CHU"] = ip_fg.Rows[i][(int)e_col_Number.GHI_CHU] == null ? "" : ip_fg.Rows[i][(int)e_col_Number.GHI_CHU].ToString(); v_dt.Rows.Add(v_dr); } op_ds.AcceptChanges(); return op_ds; }
private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(f405_V_TONG_HOP_CPN_THEO_PHONG_BAN)); this.ImageList = new System.Windows.Forms.ImageList(this.components); this.m_pnl_out_place_dm = new System.Windows.Forms.Panel(); this.m_cmd_xuat_excel_pn_pb = new SIS.Controls.Button.SiSButton(); this.m_cmd_xuat_excel = new SIS.Controls.Button.SiSButton(); this.m_cmd_insert = new SIS.Controls.Button.SiSButton(); this.m_cmd_update = new SIS.Controls.Button.SiSButton(); this.m_cmd_delete = new SIS.Controls.Button.SiSButton(); this.m_cmd_exit = new SIS.Controls.Button.SiSButton(); this.m_fg = new C1.Win.C1FlexGrid.C1FlexGrid(); this.m_lbl_header = new System.Windows.Forms.Label(); this.m_lbl_ten_pb = new System.Windows.Forms.Label(); this.m_lbl_den_ngay = new System.Windows.Forms.Label(); this.m_lbl_tu_ngay = new System.Windows.Forms.Label(); this.m_cbo_ten_pb = new System.Windows.Forms.ComboBox(); this.m_lbl_trang_thai = new System.Windows.Forms.Label(); this.m_cbo_trang_thai = new System.Windows.Forms.ComboBox(); this.label3 = new System.Windows.Forms.Label(); this.m_txt_tu_khoa = new System.Windows.Forms.TextBox(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.m_lbl_ghi_chu = new System.Windows.Forms.Label(); this.m_cmd_tim_kiem = new SIS.Controls.Button.SiSButton(); this.m_cmd_tim_kiem_bill_co_so_tien = new SIS.Controls.Button.SiSButton(); this.m_fg_excel = new C1.Win.C1FlexGrid.C1FlexGrid(); this.m_dt_den_ngay = new BCTKApp.TCDatetime(); this.m_dt_tu_ngay = new BCTKApp.TCDatetime(); this.m_pnl_out_place_dm.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.m_fg)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.m_fg_excel)).BeginInit(); this.SuspendLayout(); // // ImageList // this.ImageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("ImageList.ImageStream"))); this.ImageList.TransparentColor = System.Drawing.Color.Transparent; this.ImageList.Images.SetKeyName(0, ""); this.ImageList.Images.SetKeyName(1, ""); this.ImageList.Images.SetKeyName(2, ""); this.ImageList.Images.SetKeyName(3, ""); this.ImageList.Images.SetKeyName(4, ""); this.ImageList.Images.SetKeyName(5, ""); this.ImageList.Images.SetKeyName(6, ""); this.ImageList.Images.SetKeyName(7, ""); this.ImageList.Images.SetKeyName(8, ""); this.ImageList.Images.SetKeyName(9, ""); this.ImageList.Images.SetKeyName(10, ""); this.ImageList.Images.SetKeyName(11, ""); this.ImageList.Images.SetKeyName(12, ""); this.ImageList.Images.SetKeyName(13, ""); this.ImageList.Images.SetKeyName(14, ""); this.ImageList.Images.SetKeyName(15, ""); this.ImageList.Images.SetKeyName(16, ""); this.ImageList.Images.SetKeyName(17, ""); this.ImageList.Images.SetKeyName(18, ""); this.ImageList.Images.SetKeyName(19, ""); this.ImageList.Images.SetKeyName(20, ""); this.ImageList.Images.SetKeyName(21, ""); // // m_pnl_out_place_dm // this.m_pnl_out_place_dm.Controls.Add(this.m_cmd_xuat_excel_pn_pb); this.m_pnl_out_place_dm.Controls.Add(this.m_cmd_xuat_excel); this.m_pnl_out_place_dm.Controls.Add(this.m_cmd_insert); this.m_pnl_out_place_dm.Controls.Add(this.m_cmd_update); this.m_pnl_out_place_dm.Controls.Add(this.m_cmd_delete); this.m_pnl_out_place_dm.Controls.Add(this.m_cmd_exit); this.m_pnl_out_place_dm.Dock = System.Windows.Forms.DockStyle.Bottom; this.m_pnl_out_place_dm.Location = new System.Drawing.Point(0, 601); this.m_pnl_out_place_dm.Name = "m_pnl_out_place_dm"; this.m_pnl_out_place_dm.Padding = new System.Windows.Forms.Padding(4); this.m_pnl_out_place_dm.Size = new System.Drawing.Size(1034, 39); this.m_pnl_out_place_dm.TabIndex = 19; // // m_cmd_xuat_excel_pn_pb // this.m_cmd_xuat_excel_pn_pb.AdjustImageLocation = new System.Drawing.Point(0, 0); this.m_cmd_xuat_excel_pn_pb.BtnShape = SIS.Controls.Button.emunType.BtnShape.Rectangle; this.m_cmd_xuat_excel_pn_pb.BtnStyle = SIS.Controls.Button.emunType.XPStyle.Default; this.m_cmd_xuat_excel_pn_pb.Dock = System.Windows.Forms.DockStyle.Left; this.m_cmd_xuat_excel_pn_pb.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.m_cmd_xuat_excel_pn_pb.ImageIndex = 19; this.m_cmd_xuat_excel_pn_pb.ImageList = this.ImageList; this.m_cmd_xuat_excel_pn_pb.Location = new System.Drawing.Point(147, 4); this.m_cmd_xuat_excel_pn_pb.Name = "m_cmd_xuat_excel_pn_pb"; this.m_cmd_xuat_excel_pn_pb.Size = new System.Drawing.Size(303, 31); this.m_cmd_xuat_excel_pn_pb.TabIndex = 23; this.m_cmd_xuat_excel_pn_pb.Text = "Xuất Excel DS Bill theo Pháp nhân - phòng ban"; // // m_cmd_xuat_excel // this.m_cmd_xuat_excel.AdjustImageLocation = new System.Drawing.Point(0, 0); this.m_cmd_xuat_excel.BtnShape = SIS.Controls.Button.emunType.BtnShape.Rectangle; this.m_cmd_xuat_excel.BtnStyle = SIS.Controls.Button.emunType.XPStyle.Default; this.m_cmd_xuat_excel.Dock = System.Windows.Forms.DockStyle.Left; this.m_cmd_xuat_excel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.m_cmd_xuat_excel.ImageIndex = 19; this.m_cmd_xuat_excel.ImageList = this.ImageList; this.m_cmd_xuat_excel.Location = new System.Drawing.Point(4, 4); this.m_cmd_xuat_excel.Name = "m_cmd_xuat_excel"; this.m_cmd_xuat_excel.Size = new System.Drawing.Size(143, 31); this.m_cmd_xuat_excel.TabIndex = 22; this.m_cmd_xuat_excel.Text = "Xuất Excel DS Bill"; this.m_cmd_xuat_excel.Click += new System.EventHandler(this.m_cmd_xuat_excel_Click); // // m_cmd_insert // this.m_cmd_insert.AdjustImageLocation = new System.Drawing.Point(0, 0); this.m_cmd_insert.BtnShape = SIS.Controls.Button.emunType.BtnShape.Rectangle; this.m_cmd_insert.BtnStyle = SIS.Controls.Button.emunType.XPStyle.Default; this.m_cmd_insert.Dock = System.Windows.Forms.DockStyle.Right; this.m_cmd_insert.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.m_cmd_insert.ImageIndex = 2; this.m_cmd_insert.ImageList = this.ImageList; this.m_cmd_insert.Location = new System.Drawing.Point(678, 4); this.m_cmd_insert.Name = "m_cmd_insert"; this.m_cmd_insert.Size = new System.Drawing.Size(88, 31); this.m_cmd_insert.TabIndex = 12; this.m_cmd_insert.Text = "&Thêm"; this.m_cmd_insert.Visible = false; // // m_cmd_update // this.m_cmd_update.AdjustImageLocation = new System.Drawing.Point(0, 0); this.m_cmd_update.BtnShape = SIS.Controls.Button.emunType.BtnShape.Rectangle; this.m_cmd_update.BtnStyle = SIS.Controls.Button.emunType.XPStyle.Default; this.m_cmd_update.Dock = System.Windows.Forms.DockStyle.Right; this.m_cmd_update.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.m_cmd_update.ImageIndex = 3; this.m_cmd_update.ImageList = this.ImageList; this.m_cmd_update.Location = new System.Drawing.Point(766, 4); this.m_cmd_update.Name = "m_cmd_update"; this.m_cmd_update.Size = new System.Drawing.Size(88, 31); this.m_cmd_update.TabIndex = 13; this.m_cmd_update.Text = "&Sửa"; this.m_cmd_update.Visible = false; // // m_cmd_delete // this.m_cmd_delete.AdjustImageLocation = new System.Drawing.Point(0, 0); this.m_cmd_delete.BtnShape = SIS.Controls.Button.emunType.BtnShape.Rectangle; this.m_cmd_delete.BtnStyle = SIS.Controls.Button.emunType.XPStyle.Default; this.m_cmd_delete.Dock = System.Windows.Forms.DockStyle.Right; this.m_cmd_delete.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.m_cmd_delete.ImageIndex = 4; this.m_cmd_delete.ImageList = this.ImageList; this.m_cmd_delete.Location = new System.Drawing.Point(854, 4); this.m_cmd_delete.Name = "m_cmd_delete"; this.m_cmd_delete.Size = new System.Drawing.Size(88, 31); this.m_cmd_delete.TabIndex = 14; this.m_cmd_delete.Text = "&Xoá"; this.m_cmd_delete.Visible = false; // // m_cmd_exit // this.m_cmd_exit.AdjustImageLocation = new System.Drawing.Point(0, 0); this.m_cmd_exit.BtnShape = SIS.Controls.Button.emunType.BtnShape.Rectangle; this.m_cmd_exit.BtnStyle = SIS.Controls.Button.emunType.XPStyle.Default; this.m_cmd_exit.Dock = System.Windows.Forms.DockStyle.Right; this.m_cmd_exit.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.m_cmd_exit.ImageIndex = 12; this.m_cmd_exit.ImageList = this.ImageList; this.m_cmd_exit.Location = new System.Drawing.Point(942, 4); this.m_cmd_exit.Name = "m_cmd_exit"; this.m_cmd_exit.Size = new System.Drawing.Size(88, 31); this.m_cmd_exit.TabIndex = 11; this.m_cmd_exit.Text = "Thoát (Esc)"; // // m_fg // this.m_fg.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.m_fg.ColumnInfo = resources.GetString("m_fg.ColumnInfo"); this.m_fg.Location = new System.Drawing.Point(0, 173); this.m_fg.Name = "m_fg"; this.m_fg.SelectionMode = C1.Win.C1FlexGrid.SelectionModeEnum.RowRange; this.m_fg.Size = new System.Drawing.Size(1022, 422); this.m_fg.Styles = new C1.Win.C1FlexGrid.CellStyleCollection(resources.GetString("m_fg.Styles")); this.m_fg.TabIndex = 13; this.toolTip1.SetToolTip(this.m_fg, "Nhấp đúp chuột vào dòng để xem chi tiết."); this.m_fg.DoubleClick += new System.EventHandler(this.m_fg_DoubleClick); // // m_lbl_header // this.m_lbl_header.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.m_lbl_header.AutoSize = true; this.m_lbl_header.Font = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.m_lbl_header.ForeColor = System.Drawing.Color.Maroon; this.m_lbl_header.Location = new System.Drawing.Point(373, 9); this.m_lbl_header.Name = "m_lbl_header"; this.m_lbl_header.Size = new System.Drawing.Size(260, 22); this.m_lbl_header.TabIndex = 0; this.m_lbl_header.Text = "TRA CỨU THÔNG TIN BILL"; // // m_lbl_ten_pb // this.m_lbl_ten_pb.AutoSize = true; this.m_lbl_ten_pb.Font = new System.Drawing.Font("Times New Roman", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.m_lbl_ten_pb.ForeColor = System.Drawing.Color.Maroon; this.m_lbl_ten_pb.Location = new System.Drawing.Point(181, 50); this.m_lbl_ten_pb.Name = "m_lbl_ten_pb"; this.m_lbl_ten_pb.Size = new System.Drawing.Size(96, 15); this.m_lbl_ten_pb.TabIndex = 1; this.m_lbl_ten_pb.Text = "Chọn Pháp nhân"; // // m_lbl_den_ngay // this.m_lbl_den_ngay.AutoSize = true; this.m_lbl_den_ngay.Font = new System.Drawing.Font("Times New Roman", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.m_lbl_den_ngay.ForeColor = System.Drawing.Color.Maroon; this.m_lbl_den_ngay.Location = new System.Drawing.Point(510, 80); this.m_lbl_den_ngay.Name = "m_lbl_den_ngay"; this.m_lbl_den_ngay.Size = new System.Drawing.Size(62, 15); this.m_lbl_den_ngay.TabIndex = 5; this.m_lbl_den_ngay.Text = "Đến ngày:"; // // m_lbl_tu_ngay // this.m_lbl_tu_ngay.AutoSize = true; this.m_lbl_tu_ngay.Font = new System.Drawing.Font("Times New Roman", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.m_lbl_tu_ngay.ForeColor = System.Drawing.Color.Maroon; this.m_lbl_tu_ngay.Location = new System.Drawing.Point(222, 80); this.m_lbl_tu_ngay.Name = "m_lbl_tu_ngay"; this.m_lbl_tu_ngay.Size = new System.Drawing.Size(55, 15); this.m_lbl_tu_ngay.TabIndex = 3; this.m_lbl_tu_ngay.Text = "Từ ngày:"; // // m_cbo_ten_pb // this.m_cbo_ten_pb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.m_cbo_ten_pb.FormattingEnabled = true; this.m_cbo_ten_pb.Location = new System.Drawing.Point(294, 48); this.m_cbo_ten_pb.Name = "m_cbo_ten_pb"; this.m_cbo_ten_pb.Size = new System.Drawing.Size(396, 21); this.m_cbo_ten_pb.TabIndex = 2; // // m_lbl_trang_thai // this.m_lbl_trang_thai.AutoSize = true; this.m_lbl_trang_thai.Font = new System.Drawing.Font("Times New Roman", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.m_lbl_trang_thai.ForeColor = System.Drawing.Color.Maroon; this.m_lbl_trang_thai.Location = new System.Drawing.Point(215, 108); this.m_lbl_trang_thai.Name = "m_lbl_trang_thai"; this.m_lbl_trang_thai.Size = new System.Drawing.Size(65, 15); this.m_lbl_trang_thai.TabIndex = 7; this.m_lbl_trang_thai.Text = "Trạng thái:"; // // m_cbo_trang_thai // this.m_cbo_trang_thai.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.m_cbo_trang_thai.FormattingEnabled = true; this.m_cbo_trang_thai.Location = new System.Drawing.Point(294, 102); this.m_cbo_trang_thai.Name = "m_cbo_trang_thai"; this.m_cbo_trang_thai.Size = new System.Drawing.Size(176, 21); this.m_cbo_trang_thai.TabIndex = 8; // // label3 // this.label3.AutoSize = true; this.label3.Font = new System.Drawing.Font("Times New Roman", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label3.ForeColor = System.Drawing.Color.Maroon; this.label3.Location = new System.Drawing.Point(222, 134); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(57, 15); this.label3.TabIndex = 9; this.label3.Text = "Từ khóa :"; // // m_txt_tu_khoa // this.m_txt_tu_khoa.Location = new System.Drawing.Point(294, 129); this.m_txt_tu_khoa.Name = "m_txt_tu_khoa"; this.m_txt_tu_khoa.Size = new System.Drawing.Size(339, 20); this.m_txt_tu_khoa.TabIndex = 10; this.m_txt_tu_khoa.KeyUp += new System.Windows.Forms.KeyEventHandler(this.m_cmd_tim_kiem_KeyDown); // // toolTip1 // this.toolTip1.AutomaticDelay = 100; // // m_lbl_ghi_chu // this.m_lbl_ghi_chu.AutoSize = true; this.m_lbl_ghi_chu.Font = new System.Drawing.Font("Times New Roman", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.m_lbl_ghi_chu.ForeColor = System.Drawing.Color.Maroon; this.m_lbl_ghi_chu.Location = new System.Drawing.Point(1, 154); this.m_lbl_ghi_chu.Name = "m_lbl_ghi_chu"; this.m_lbl_ghi_chu.Size = new System.Drawing.Size(201, 14); this.m_lbl_ghi_chu.TabIndex = 15; this.m_lbl_ghi_chu.Text = "Nhấp đúp chuột mỗi dòng để xem chi tiết."; // // m_cmd_tim_kiem // this.m_cmd_tim_kiem.AdjustImageLocation = new System.Drawing.Point(0, 0); this.m_cmd_tim_kiem.BtnShape = SIS.Controls.Button.emunType.BtnShape.Rectangle; this.m_cmd_tim_kiem.BtnStyle = SIS.Controls.Button.emunType.XPStyle.Default; this.m_cmd_tim_kiem.ForeColor = System.Drawing.Color.Maroon; this.m_cmd_tim_kiem.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.m_cmd_tim_kiem.ImageIndex = 18; this.m_cmd_tim_kiem.ImageList = this.ImageList; this.m_cmd_tim_kiem.Location = new System.Drawing.Point(649, 121); this.m_cmd_tim_kiem.Name = "m_cmd_tim_kiem"; this.m_cmd_tim_kiem.Size = new System.Drawing.Size(88, 28); this.m_cmd_tim_kiem.TabIndex = 11; this.m_cmd_tim_kiem.Text = "Tìm kiếm"; // // m_cmd_tim_kiem_bill_co_so_tien // this.m_cmd_tim_kiem_bill_co_so_tien.AdjustImageLocation = new System.Drawing.Point(0, 0); this.m_cmd_tim_kiem_bill_co_so_tien.BtnShape = SIS.Controls.Button.emunType.BtnShape.Rectangle; this.m_cmd_tim_kiem_bill_co_so_tien.BtnStyle = SIS.Controls.Button.emunType.XPStyle.Default; this.m_cmd_tim_kiem_bill_co_so_tien.ForeColor = System.Drawing.Color.Maroon; this.m_cmd_tim_kiem_bill_co_so_tien.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.m_cmd_tim_kiem_bill_co_so_tien.ImageIndex = 18; this.m_cmd_tim_kiem_bill_co_so_tien.ImageList = this.ImageList; this.m_cmd_tim_kiem_bill_co_so_tien.Location = new System.Drawing.Point(775, 121); this.m_cmd_tim_kiem_bill_co_so_tien.Name = "m_cmd_tim_kiem_bill_co_so_tien"; this.m_cmd_tim_kiem_bill_co_so_tien.Size = new System.Drawing.Size(114, 28); this.m_cmd_tim_kiem_bill_co_so_tien.TabIndex = 12; this.m_cmd_tim_kiem_bill_co_so_tien.Text = "Bill có số tiền"; // // m_fg_excel // this.m_fg_excel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.m_fg_excel.ColumnInfo = "0,0,0,0,0,85,Columns:"; this.m_fg_excel.Location = new System.Drawing.Point(26, 232); this.m_fg_excel.Name = "m_fg_excel"; this.m_fg_excel.SelectionMode = C1.Win.C1FlexGrid.SelectionModeEnum.RowRange; this.m_fg_excel.Size = new System.Drawing.Size(1022, 422); this.m_fg_excel.Styles = new C1.Win.C1FlexGrid.CellStyleCollection(resources.GetString("m_fg_excel.Styles")); this.m_fg_excel.TabIndex = 14; this.m_fg_excel.Visible = false; this.m_fg_excel.DoubleClick += new System.EventHandler(this.m_fg_DoubleClick); // // m_dt_den_ngay // this.m_dt_den_ngay.Format = BCTKApp.TCDatetime.DinhDang.dd_MM_yyyy; this.m_dt_den_ngay.Location = new System.Drawing.Point(590, 78); this.m_dt_den_ngay.Mask = "00/00/0000"; this.m_dt_den_ngay.Name = "m_dt_den_ngay"; this.m_dt_den_ngay.Size = new System.Drawing.Size(100, 20); this.m_dt_den_ngay.TabIndex = 6; this.m_dt_den_ngay.ValidatingType = typeof(System.DateTime); // // m_dt_tu_ngay // this.m_dt_tu_ngay.Format = BCTKApp.TCDatetime.DinhDang.dd_MM_yyyy; this.m_dt_tu_ngay.Location = new System.Drawing.Point(294, 75); this.m_dt_tu_ngay.Mask = "00/00/0000"; this.m_dt_tu_ngay.Name = "m_dt_tu_ngay"; this.m_dt_tu_ngay.Size = new System.Drawing.Size(100, 20); this.m_dt_tu_ngay.TabIndex = 4; this.m_dt_tu_ngay.ValidatingType = typeof(System.DateTime); // // f405_V_TONG_HOP_CPN_THEO_PHONG_BAN // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(1034, 640); this.Controls.Add(this.m_dt_den_ngay); this.Controls.Add(this.m_dt_tu_ngay); this.Controls.Add(this.m_fg); this.Controls.Add(this.m_cmd_tim_kiem_bill_co_so_tien); this.Controls.Add(this.m_cmd_tim_kiem); this.Controls.Add(this.m_txt_tu_khoa); this.Controls.Add(this.m_cbo_ten_pb); this.Controls.Add(this.m_cbo_trang_thai); this.Controls.Add(this.m_lbl_ghi_chu); this.Controls.Add(this.label3); this.Controls.Add(this.m_lbl_trang_thai); this.Controls.Add(this.m_lbl_tu_ngay); this.Controls.Add(this.m_lbl_den_ngay); this.Controls.Add(this.m_lbl_ten_pb); this.Controls.Add(this.m_lbl_header); this.Controls.Add(this.m_fg_excel); this.Controls.Add(this.m_pnl_out_place_dm); this.Name = "f405_V_TONG_HOP_CPN_THEO_PHONG_BAN"; this.Text = "F405- Tra cứu thông tin Bill"; this.Load += new System.EventHandler(this.f405_V_TONG_HOP_CPN_THEO_PHONG_BAN_Load); this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.f405_V_TONG_HOP_CPN_THEO_PHONG_BAN_KeyDown); this.m_pnl_out_place_dm.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.m_fg)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.m_fg_excel)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); }
/// <summary> /// converts a c1 flex grid into a datatable /// </summary> /// <param name="pGrid"></param> /// <returns></returns> public static DataTable convertFlexGridToDataTable(C1FlexGrid pGrid) { try { DataTable _dt = new DataTable(); if (pGrid.Rows.Count > 0) { for (int _col = 0; _col < pGrid.Cols.Count; _col++) { _dt.Columns.Add(pGrid.Cols[_col].Name); } DataRow _dRow; for (int _row = 1; _row < pGrid.Rows.Count; _row++) { _dRow = _dt.NewRow(); for (int _col = 0; _col < pGrid.Cols.Count; _col++) { _dRow[pGrid.Cols[_col].Name] = pGrid.GetDataDisplay(_row, _col); } _dt.Rows.Add(_dRow); } } return _dt; } catch (Exception ex) { throw new Exception("Error Message!\r\n" + ex.Message + "\r\nError in : Utilities." + ex.TargetSite + " - " + ex.StackTrace.Substring(ex.StackTrace.IndexOf("line")) + "."); } }
/// <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(f406_tao_bao_cao_hien_trang_su_dung_tai_san_khac)); this.ImageList = new System.Windows.Forms.ImageList(this.components); this.m_pnl_out_place_dm = new System.Windows.Forms.Panel(); this.m_cmd_xuat_excel = new SIS.Controls.Button.SiSButton(); this.m_cmd_exit = new SIS.Controls.Button.SiSButton(); this.m_fg_tai_san_khac = new C1.Win.C1FlexGrid.C1FlexGrid(); this.m_openDiaglog = new System.Windows.Forms.OpenFileDialog(); this.panel1 = new System.Windows.Forms.Panel(); this.m_lbl_ten_bao_cao = new System.Windows.Forms.Label(); this.m_lbl = new System.Windows.Forms.Label(); this.panel2 = new System.Windows.Forms.Panel(); this.label3 = new System.Windows.Forms.Label(); this.m_cmd_browser = new SIS.Controls.Button.SiSButton(); this.label7 = new System.Windows.Forms.Label(); this.m_txt_file_path = new System.Windows.Forms.TextBox(); this.m_lbl_thong_bao = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.m_lbl_don_vi_chu_quan = new System.Windows.Forms.Label(); this.m_lbl_ma_don_vi = new System.Windows.Forms.Label(); this.m_lbl_don_vi_bo_tinh = new System.Windows.Forms.Label(); this.m_fg_tai_san_khac_excel = new C1.Win.C1FlexGrid.C1FlexGrid(); this.panel3 = new System.Windows.Forms.Panel(); this.m_pnl_out_place_dm.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.m_fg_tai_san_khac)).BeginInit(); this.panel1.SuspendLayout(); this.panel2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.m_fg_tai_san_khac_excel)).BeginInit(); this.panel3.SuspendLayout(); this.SuspendLayout(); // // ImageList // this.ImageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("ImageList.ImageStream"))); this.ImageList.TransparentColor = System.Drawing.Color.Transparent; this.ImageList.Images.SetKeyName(0, ""); this.ImageList.Images.SetKeyName(1, ""); this.ImageList.Images.SetKeyName(2, ""); this.ImageList.Images.SetKeyName(3, ""); this.ImageList.Images.SetKeyName(4, ""); this.ImageList.Images.SetKeyName(5, ""); this.ImageList.Images.SetKeyName(6, ""); this.ImageList.Images.SetKeyName(7, ""); this.ImageList.Images.SetKeyName(8, ""); this.ImageList.Images.SetKeyName(9, ""); this.ImageList.Images.SetKeyName(10, ""); this.ImageList.Images.SetKeyName(11, ""); this.ImageList.Images.SetKeyName(12, ""); this.ImageList.Images.SetKeyName(13, ""); this.ImageList.Images.SetKeyName(14, ""); this.ImageList.Images.SetKeyName(15, ""); this.ImageList.Images.SetKeyName(16, ""); this.ImageList.Images.SetKeyName(17, ""); this.ImageList.Images.SetKeyName(18, ""); this.ImageList.Images.SetKeyName(19, ""); this.ImageList.Images.SetKeyName(20, ""); this.ImageList.Images.SetKeyName(21, ""); // // m_pnl_out_place_dm // this.m_pnl_out_place_dm.Controls.Add(this.m_cmd_xuat_excel); this.m_pnl_out_place_dm.Controls.Add(this.m_cmd_exit); this.m_pnl_out_place_dm.Dock = System.Windows.Forms.DockStyle.Bottom; this.m_pnl_out_place_dm.Location = new System.Drawing.Point(0, 450); this.m_pnl_out_place_dm.Name = "m_pnl_out_place_dm"; this.m_pnl_out_place_dm.Padding = new System.Windows.Forms.Padding(4); this.m_pnl_out_place_dm.Size = new System.Drawing.Size(907, 36); this.m_pnl_out_place_dm.TabIndex = 19; // // m_cmd_xuat_excel // this.m_cmd_xuat_excel.AdjustImageLocation = new System.Drawing.Point(0, 0); this.m_cmd_xuat_excel.BtnShape = SIS.Controls.Button.emunType.BtnShape.Rectangle; this.m_cmd_xuat_excel.BtnStyle = SIS.Controls.Button.emunType.XPStyle.Default; this.m_cmd_xuat_excel.Dock = System.Windows.Forms.DockStyle.Left; this.m_cmd_xuat_excel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.m_cmd_xuat_excel.ImageIndex = 19; this.m_cmd_xuat_excel.ImageList = this.ImageList; this.m_cmd_xuat_excel.Location = new System.Drawing.Point(4, 4); this.m_cmd_xuat_excel.Name = "m_cmd_xuat_excel"; this.m_cmd_xuat_excel.Size = new System.Drawing.Size(88, 28); this.m_cmd_xuat_excel.TabIndex = 21; this.m_cmd_xuat_excel.Text = "Xuất exel"; // // m_cmd_exit // this.m_cmd_exit.AdjustImageLocation = new System.Drawing.Point(0, 0); this.m_cmd_exit.BtnShape = SIS.Controls.Button.emunType.BtnShape.Rectangle; this.m_cmd_exit.BtnStyle = SIS.Controls.Button.emunType.XPStyle.Default; this.m_cmd_exit.Dock = System.Windows.Forms.DockStyle.Right; this.m_cmd_exit.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.m_cmd_exit.ImageIndex = 12; this.m_cmd_exit.ImageList = this.ImageList; this.m_cmd_exit.Location = new System.Drawing.Point(815, 4); this.m_cmd_exit.Name = "m_cmd_exit"; this.m_cmd_exit.Size = new System.Drawing.Size(88, 28); this.m_cmd_exit.TabIndex = 11; this.m_cmd_exit.Text = "Thoát (Esc)"; // // m_fg_tai_san_khac // this.m_fg_tai_san_khac.ColumnInfo = resources.GetString("m_fg_tai_san_khac.ColumnInfo"); this.m_fg_tai_san_khac.Dock = System.Windows.Forms.DockStyle.Fill; this.m_fg_tai_san_khac.Location = new System.Drawing.Point(0, 0); this.m_fg_tai_san_khac.Name = "m_fg_tai_san_khac"; this.m_fg_tai_san_khac.Size = new System.Drawing.Size(907, 224); this.m_fg_tai_san_khac.Styles = new C1.Win.C1FlexGrid.CellStyleCollection(resources.GetString("m_fg_tai_san_khac.Styles")); this.m_fg_tai_san_khac.TabIndex = 20; // // m_openDiaglog // this.m_openDiaglog.FileName = "openFileDialog1"; // // panel1 // this.panel1.Controls.Add(this.m_lbl_ten_bao_cao); this.panel1.Controls.Add(this.m_lbl); this.panel1.Dock = System.Windows.Forms.DockStyle.Top; this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(907, 82); this.panel1.TabIndex = 25; // // m_lbl_ten_bao_cao // this.m_lbl_ten_bao_cao.Dock = System.Windows.Forms.DockStyle.Top; this.m_lbl_ten_bao_cao.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.m_lbl_ten_bao_cao.Location = new System.Drawing.Point(0, 50); this.m_lbl_ten_bao_cao.Name = "m_lbl_ten_bao_cao"; this.m_lbl_ten_bao_cao.Size = new System.Drawing.Size(907, 23); this.m_lbl_ten_bao_cao.TabIndex = 22; this.m_lbl_ten_bao_cao.Text = "1. Tổng hợp chung"; this.m_lbl_ten_bao_cao.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // m_lbl // this.m_lbl.Dock = System.Windows.Forms.DockStyle.Top; this.m_lbl.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.m_lbl.Location = new System.Drawing.Point(0, 0); this.m_lbl.Name = "m_lbl"; this.m_lbl.Size = new System.Drawing.Size(907, 50); this.m_lbl.TabIndex = 21; this.m_lbl.Text = "BÁO CÁO HIỆN TRẠNG SỬ DỤNG TÀI SẢN KHÁC"; this.m_lbl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // panel2 // this.panel2.Controls.Add(this.label3); this.panel2.Controls.Add(this.m_cmd_browser); this.panel2.Controls.Add(this.label7); this.panel2.Controls.Add(this.m_txt_file_path); this.panel2.Controls.Add(this.m_lbl_thong_bao); this.panel2.Controls.Add(this.label1); this.panel2.Controls.Add(this.label2); this.panel2.Controls.Add(this.m_lbl_don_vi_chu_quan); this.panel2.Controls.Add(this.m_lbl_ma_don_vi); this.panel2.Controls.Add(this.m_lbl_don_vi_bo_tinh); this.panel2.Dock = System.Windows.Forms.DockStyle.Top; this.panel2.Location = new System.Drawing.Point(0, 82); this.panel2.Name = "panel2"; this.panel2.Size = new System.Drawing.Size(907, 144); this.panel2.TabIndex = 28; // // label3 // this.label3.AutoSize = true; this.label3.Location = new System.Drawing.Point(98, 67); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(58, 13); this.label3.TabIndex = 29; this.label3.Text = "Mã đơn vị:"; // // m_cmd_browser // this.m_cmd_browser.AdjustImageLocation = new System.Drawing.Point(0, 0); this.m_cmd_browser.BtnShape = SIS.Controls.Button.emunType.BtnShape.Rectangle; this.m_cmd_browser.BtnStyle = SIS.Controls.Button.emunType.XPStyle.Default; this.m_cmd_browser.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.m_cmd_browser.ImageIndex = 5; this.m_cmd_browser.ImageList = this.ImageList; this.m_cmd_browser.Location = new System.Drawing.Point(724, 59); this.m_cmd_browser.Name = "m_cmd_browser"; this.m_cmd_browser.Size = new System.Drawing.Size(33, 28); this.m_cmd_browser.TabIndex = 26; // // label7 // this.label7.AutoSize = true; this.label7.Location = new System.Drawing.Point(471, 67); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(51, 13); this.label7.TabIndex = 28; this.label7.Text = "File excel"; // // m_txt_file_path // this.m_txt_file_path.Location = new System.Drawing.Point(528, 64); this.m_txt_file_path.Name = "m_txt_file_path"; this.m_txt_file_path.Size = new System.Drawing.Size(190, 20); this.m_txt_file_path.TabIndex = 27; // // m_lbl_thong_bao // this.m_lbl_thong_bao.AutoSize = true; this.m_lbl_thong_bao.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.m_lbl_thong_bao.ForeColor = System.Drawing.Color.Red; this.m_lbl_thong_bao.Location = new System.Drawing.Point(136, 110); this.m_lbl_thong_bao.Name = "m_lbl_thong_bao"; this.m_lbl_thong_bao.Size = new System.Drawing.Size(12, 16); this.m_lbl_thong_bao.TabIndex = 24; this.m_lbl_thong_bao.Text = " "; // // label1 // this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point(80, 28); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(76, 13); this.label1.TabIndex = 24; this.label1.Text = "Đơn vị bộ tỉnh:"; // // label2 // this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(433, 28); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(89, 13); this.label2.TabIndex = 25; this.label2.Text = "Đơn vị chủ quản:"; // // m_lbl_don_vi_chu_quan // this.m_lbl_don_vi_chu_quan.AutoSize = true; this.m_lbl_don_vi_chu_quan.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.m_lbl_don_vi_chu_quan.ForeColor = System.Drawing.Color.Blue; this.m_lbl_don_vi_chu_quan.Location = new System.Drawing.Point(528, 28); this.m_lbl_don_vi_chu_quan.Name = "m_lbl_don_vi_chu_quan"; this.m_lbl_don_vi_chu_quan.Size = new System.Drawing.Size(11, 13); this.m_lbl_don_vi_chu_quan.TabIndex = 24; this.m_lbl_don_vi_chu_quan.Text = " "; // // m_lbl_ma_don_vi // this.m_lbl_ma_don_vi.AutoSize = true; this.m_lbl_ma_don_vi.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.m_lbl_ma_don_vi.ForeColor = System.Drawing.Color.Blue; this.m_lbl_ma_don_vi.Location = new System.Drawing.Point(162, 67); this.m_lbl_ma_don_vi.Name = "m_lbl_ma_don_vi"; this.m_lbl_ma_don_vi.Size = new System.Drawing.Size(11, 13); this.m_lbl_ma_don_vi.TabIndex = 24; this.m_lbl_ma_don_vi.Text = " "; // // m_lbl_don_vi_bo_tinh // this.m_lbl_don_vi_bo_tinh.AutoSize = true; this.m_lbl_don_vi_bo_tinh.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.m_lbl_don_vi_bo_tinh.ForeColor = System.Drawing.Color.Blue; this.m_lbl_don_vi_bo_tinh.Location = new System.Drawing.Point(162, 28); this.m_lbl_don_vi_bo_tinh.Name = "m_lbl_don_vi_bo_tinh"; this.m_lbl_don_vi_bo_tinh.Size = new System.Drawing.Size(11, 13); this.m_lbl_don_vi_bo_tinh.TabIndex = 24; this.m_lbl_don_vi_bo_tinh.Text = " "; // // m_fg_tai_san_khac_excel // this.m_fg_tai_san_khac_excel.ColumnInfo = "14,1,0,0,0,85,Columns:0{Width:13;}\t1{Width:99;Caption:\"1\";TextAlign:CenterCenter;" + "TextAlignFixed:CenterCenter;}\t"; this.m_fg_tai_san_khac_excel.Location = new System.Drawing.Point(101, 44); this.m_fg_tai_san_khac_excel.Name = "m_fg_tai_san_khac_excel"; this.m_fg_tai_san_khac_excel.Size = new System.Drawing.Size(686, 163); this.m_fg_tai_san_khac_excel.Styles = new C1.Win.C1FlexGrid.CellStyleCollection(resources.GetString("m_fg_tai_san_khac_excel.Styles")); this.m_fg_tai_san_khac_excel.TabIndex = 29; this.m_fg_tai_san_khac_excel.Visible = false; // // panel3 // this.panel3.Controls.Add(this.m_fg_tai_san_khac_excel); this.panel3.Controls.Add(this.m_fg_tai_san_khac); this.panel3.Dock = System.Windows.Forms.DockStyle.Fill; this.panel3.Location = new System.Drawing.Point(0, 226); this.panel3.Name = "panel3"; this.panel3.Size = new System.Drawing.Size(907, 224); this.panel3.TabIndex = 29; // // f406_tao_bao_cao_hien_trang_su_dung_tai_san_khac // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(907, 486); this.Controls.Add(this.panel3); this.Controls.Add(this.panel2); this.Controls.Add(this.panel1); this.Controls.Add(this.m_pnl_out_place_dm); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Name = "f406_tao_bao_cao_hien_trang_su_dung_tai_san_khac"; this.Text = "F406 Tạo báo cáo hiện trạng sử dụng tài sản khác"; this.Load += new System.EventHandler(this.f406_tao_bao_cao_hien_trang_su_dung_tai_san_khac_Load); this.m_pnl_out_place_dm.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.m_fg_tai_san_khac)).EndInit(); this.panel1.ResumeLayout(false); this.panel2.ResumeLayout(false); this.panel2.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.m_fg_tai_san_khac_excel)).EndInit(); this.panel3.ResumeLayout(false); this.ResumeLayout(false); }
internal HostedControl(C1FlexGrid flex, Control hosted, int row, int col) { //save info _flex = flex; _ctl = hosted; _row = flex.Rows[row]; _col = flex.Cols[col]; //insert hosted control into grid _flex.Controls.Add(_ctl); }
private void load_data_from_data_table_to_grid(DataTable i_dtb, C1FlexGrid i_fg) { i_fg.DataSource = i_dtb.DefaultView; }
public MetroGridHelper(MetroScrollBar scrollbar, C1FlexGrid grid, bool vertical = true) { _scrollbar = scrollbar; _scrollbar.UseBarColor = true; _grid = grid; _ishorizontal = !vertical; grid.ScrollBars = System.Windows.Forms.ScrollBars.None; _grid.AfterScroll += new RangeEventHandler(_grid_AfterScroll); _grid.AfterAddRow += new RowColEventHandler(_grid_AfterAddRow); _grid.AfterDeleteRow += new RowColEventHandler(_grid_AfterDeleteRow); _grid.AfterDataRefresh += new ListChangedEventHandler(_grid_AfterDataRefresh); _grid.Resize += new EventHandler(_grid_Resize); _scrollbar.Scroll += _scrollbar_Scroll; // += new ScrollValueChangedDelegate(_scrollbar_ValueChanged); _scrollbar.Visible = false; UpdateScrollbar(); }
public CUser_LogDiary_tabHandler4F200(C1FlexGrid i_fg) { m_fg = i_fg; CControlFormat.setC1FlexFormat(m_fg); CGridUtils.AddSearch_Handlers(m_fg); }
private DataTable load_data_from_grid_to_table(C1FlexGrid i_fg_tam) { DataTable v_dt = new DataTable(); DataColumn v_dc = new DataColumn(); v_dc.ColumnName = i_fg_tam.Cols[(int)e_col_Excel_number.TAI_SAN].Name; v_dc.DataType = i_fg_tam.Cols[(int)e_col_Excel_number.TAI_SAN].DataType; v_dt.Columns.Add(v_dc); v_dc.ColumnName = i_fg_tam.Cols[(int)e_col_Excel_number.CAP_HANG].Name; v_dc.DataType = i_fg_tam.Cols[(int)e_col_Excel_number.CAP_HANG].DataType; v_dt.Columns.Add(v_dc); v_dc.ColumnName = i_fg_tam.Cols[(int)e_col_Excel_number.NAM_XAY_DUNG].Name; v_dc.DataType = i_fg_tam.Cols[(int)e_col_Excel_number.NAM_XAY_DUNG].DataType; v_dt.Columns.Add(v_dc); v_dc.ColumnName = i_fg_tam.Cols[(int)e_col_Excel_number.NGAY_THANG_NAM_SU_DUNG].Name; v_dc.DataType = i_fg_tam.Cols[(int)e_col_Excel_number.NGAY_THANG_NAM_SU_DUNG].DataType; v_dt.Columns.Add(v_dc); v_dc.ColumnName = i_fg_tam.Cols[(int)e_col_Excel_number.NGUON_NS].Name; v_dc.DataType = i_fg_tam.Cols[(int)e_col_Excel_number.NGUON_NS].DataType; v_dt.Columns.Add(v_dc); v_dc.ColumnName = i_fg_tam.Cols[(int)e_col_Excel_number.NGUON_KHAC].Name; v_dc.DataType = i_fg_tam.Cols[(int)e_col_Excel_number.NGUON_KHAC].DataType; v_dt.Columns.Add(v_dc); v_dc.ColumnName = i_fg_tam.Cols[(int)e_col_Excel_number.GIA_TRI_CON_LAI].Name; v_dc.DataType = i_fg_tam.Cols[(int)e_col_Excel_number.GIA_TRI_CON_LAI].DataType; v_dt.Columns.Add(v_dc); v_dc.ColumnName = i_fg_tam.Cols[(int)e_col_Excel_number.SO_TANG].Name; v_dc.DataType = i_fg_tam.Cols[(int)e_col_Excel_number.SO_TANG].DataType; v_dt.Columns.Add(v_dc); v_dc.ColumnName = i_fg_tam.Cols[(int)e_col_Excel_number.DT_XAY_DUNG].Name; v_dc.DataType = i_fg_tam.Cols[(int)e_col_Excel_number.DT_XAY_DUNG].DataType; v_dt.Columns.Add(v_dc); v_dc.ColumnName = i_fg_tam.Cols[(int)e_col_Excel_number.TONG_DIEN_TICH_SAN_XD].Name; v_dc.DataType = i_fg_tam.Cols[(int)e_col_Excel_number.TONG_DIEN_TICH_SAN_XD].DataType; v_dt.Columns.Add(v_dc); v_dc.ColumnName = i_fg_tam.Cols[(int)e_col_Excel_number.TRU_SO_LAM_VIEC].Name; v_dc.DataType = i_fg_tam.Cols[(int)e_col_Excel_number.TRU_SO_LAM_VIEC].DataType; v_dt.Columns.Add(v_dc); v_dc.ColumnName = i_fg_tam.Cols[(int)e_col_Excel_number.CO_SO_HDSN].Name; v_dc.DataType = i_fg_tam.Cols[(int)e_col_Excel_number.CO_SO_HDSN].DataType; v_dt.Columns.Add(v_dc); v_dc.ColumnName = i_fg_tam.Cols[(int)e_col_Excel_number.LAM_NHA_O].Name; v_dc.DataType = i_fg_tam.Cols[(int)e_col_Excel_number.LAM_NHA_O].DataType; v_dt.Columns.Add(v_dc); v_dc.ColumnName = i_fg_tam.Cols[(int)e_col_Excel_number.CHO_THUE].Name; v_dc.DataType = i_fg_tam.Cols[(int)e_col_Excel_number.CHO_THUE].DataType; v_dt.Columns.Add(v_dc); v_dc.ColumnName = i_fg_tam.Cols[(int)e_col_Excel_number.BO_TRONG].Name; v_dc.DataType = i_fg_tam.Cols[(int)e_col_Excel_number.BO_TRONG].DataType; v_dt.Columns.Add(v_dc); v_dc.ColumnName = i_fg_tam.Cols[(int)e_col_Excel_number.BI_LAN_CHIEM].Name; v_dc.DataType = i_fg_tam.Cols[(int)e_col_Excel_number.BI_LAN_CHIEM].DataType; v_dt.Columns.Add(v_dc); v_dc.ColumnName = i_fg_tam.Cols[(int)e_col_Excel_number.KHAC].Name; v_dc.DataType = i_fg_tam.Cols[(int)e_col_Excel_number.KHAC].DataType; v_dt.Columns.Add(v_dc); foreach (DataGridViewRow v_row in i_fg_tam.Rows) { DataRow drow = v_dt.NewRow(); foreach (DataGridViewCell cell in v_row.Cells) { drow[cell.OwningColumn.Name] = cell.Value; } v_dt.Rows.Add(drow); } return v_dt; }
public void export_excel_from_grid(eFormMode ip_form_mode , C1FlexGrid i_fg) { }
decimal sum(C1FlexGrid ip_fg, e_col_Excel_number ip_e_col_Excel_number) { decimal sum = 0; for (int i = 1; i < ip_fg.Rows.Count; ++i) { if (ip_fg[i, (int)ip_e_col_Excel_number] != null) sum += CIPConvert.ToDecimal(ip_fg[i, (int)ip_e_col_Excel_number]); } return sum; }