Exemple #1
0
 private void Init()
 {
     connectorLibraryManager = new TConnectorLibraryManager();
     this.cb_connectorType.MultiColumnComboBoxElement.Columns.Add("type");
     RefreshConnectorInfo();
     this.rbt_2lineMethod.CheckState = CheckState.Checked;
 }
Exemple #2
0
        public AddConnector(string title, bool IsEdit, string connectorType, string switchType, string remark)
        {
            InitializeComponent();
            this.StartPosition = FormStartPosition.CenterParent;
            this.Text          = title;

            connectorLibraryManager       = new TConnectorLibraryManager();
            connectorLibraryDetailManager = new TConnectorLibraryDetailManager();
            if (IsEdit)
            {
                this.tb_connectorType.Text     = connectorType;
                this.tb_switchType.Text        = switchType;
                this.tb_remark.Text            = remark;
                this.tb_connectorType.ReadOnly = true;
                RefreshPin(connectorType);
            }
            RadGridViewProperties.SetRadGridViewProperty(this.radGridView1, false, true, 2);

            this.btn_applay.Click       += Btn_applay_Click;
            this.btn_cancel.Click       += Btn_cancel_Click;
            this.btn_addPin.Click       += Btn_addPin_Click;
            this.btn_batchAddpin.Click  += Btn_batchAddpin_Click;
            this.btn_deletePin.Click    += Btn_deletePin_Click;
            this.btn_deleteAllPin.Click += Btn_deleteAllPin_Click;
        }
Exemple #3
0
        public RadConnectorLibrary()
        {
            InitializeComponent();
            this.StartPosition = FormStartPosition.CenterParent;

            RadGridViewProperties.SetRadGridViewProperty(this.radGridView1, false, true, 5);
            connectorLibraryManager       = new TConnectorLibraryManager();
            connectorLibraryDetailManager = new TConnectorLibraryDetailManager();
            InitFuncState();

            this.tool_add.Click    += Tool_add_Click;
            this.tool_delete.Click += Tool_delete_Click;
            this.tool_query.Click  += Tool_query_Click;
            this.tool_edit.Click   += Tool_edit_Click;
            this.tool_export.Click += Tool_export_Click;
        }
        public static long InsertConnectorLibPID()
        {
            long id = -1;
            TConnectorLibraryManager objManager = new TConnectorLibraryManager();
            var dt = objManager.GetDataSetByWhere("order by ID DESC limit 1").Tables[0];

            if (dt.Rows.Count < 1)
            {
                return(0);
            }
            if (long.TryParse(dt.Rows[0]["ID"].ToString(), out id))
            {
                return(id + 1);
            }
            return(id);
        }