1.JiangSu:添加删除全部接口
2.TEWin: 添加测试单元
| | |
| | | } |
| | | } |
| | | |
| | | [HttpGet] |
| | | public int DelAll() |
| | | { |
| | | try |
| | | { |
| | | return GridDAL.DelAll(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | LogOut.Error(ex.Message + "\r\n" + ex.StackTrace); |
| | | return 0; |
| | | } |
| | | } |
| | | |
| | | [HttpPost] |
| | | public int Insert([FromBody] Grid grid) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | [HttpGet] |
| | | public int DelAll() |
| | | { |
| | | try |
| | | { |
| | | return ImgDAL.DelAll(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | LogOut.Error(ex.Message + "\r\n" + ex.StackTrace); |
| | | return 0; |
| | | } |
| | | } |
| | | |
| | | [HttpPost] |
| | | public int Insert([FromBody] Img img) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | [HttpGet] |
| | | public int DelAll() |
| | | { |
| | | try |
| | | { |
| | | return ModelDAL.DelAll(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | LogOut.Error(ex.Message + "\r\n" + ex.StackTrace); |
| | | return 0; |
| | | } |
| | | } |
| | | |
| | | [HttpPost] |
| | | public int Insert([FromBody] Model model) |
| | | { |
| | |
| | | return SQLiteHelper.ExecuteNonQuery(sql); |
| | | } |
| | | |
| | | public static int DelAll() |
| | | { |
| | | return SQLiteHelper.ExecuteNonQuery("delete from grid"); |
| | | } |
| | | |
| | | public static int Insert(Grid grid) |
| | | { |
| | | string sql = "insert into grid (json) values (@json); select last_insert_rowid();"; |
| | |
| | | return SQLiteHelper.ExecuteNonQuery(sql); |
| | | } |
| | | |
| | | public static int DelAll() |
| | | { |
| | | return SQLiteHelper.ExecuteNonQuery("delete from img"); |
| | | } |
| | | |
| | | public static int Insert(Img img) |
| | | { |
| | | string sql = "insert into img (name, path, json, x, y, z) values (@name, @path, @json, @x, @y, @z); select last_insert_rowid();"; |
| | |
| | | return SQLiteHelper.ExecuteNonQuery(sql); |
| | | } |
| | | |
| | | public static int DelAll() |
| | | { |
| | | return SQLiteHelper.ExecuteNonQuery("delete from model"); |
| | | } |
| | | |
| | | public static int Insert(Model model) |
| | | { |
| | | string sql = "insert into model (name, json) values (@name, @json); select last_insert_rowid();"; |
| | |
| | | { |
| | | using (SQLiteConnection conn = new SQLiteConnection(ConnectionString)) |
| | | { |
| | | LoadDrivers(conn); |
| | | //LoadDrivers(conn); |
| | | |
| | | using (SQLiteCommand cmd = new SQLiteCommand(cmdText, conn)) |
| | | { |
| | |
| | | { |
| | | this.txtCode = new System.Windows.Forms.TextBox(); |
| | | this.btnTest = new System.Windows.Forms.Button(); |
| | | this.cbCode = new System.Windows.Forms.ComboBox(); |
| | | this.SuspendLayout(); |
| | | // |
| | | // txtCode |
| | | // |
| | | this.txtCode.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.txtCode.Location = new System.Drawing.Point(13, 32); |
| | | this.txtCode.Location = new System.Drawing.Point(244, 32); |
| | | this.txtCode.Name = "txtCode"; |
| | | this.txtCode.Size = new System.Drawing.Size(391, 26); |
| | | this.txtCode.Size = new System.Drawing.Size(160, 26); |
| | | this.txtCode.TabIndex = 1; |
| | | this.txtCode.Text = "0xc0"; |
| | | // |
| | |
| | | this.btnTest.UseVisualStyleBackColor = true; |
| | | this.btnTest.Click += new System.EventHandler(this.btnTest_Click); |
| | | // |
| | | // cbCode |
| | | // |
| | | this.cbCode.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.cbCode.FormattingEnabled = true; |
| | | this.cbCode.Location = new System.Drawing.Point(23, 34); |
| | | this.cbCode.Name = "cbCode"; |
| | | this.cbCode.Size = new System.Drawing.Size(198, 24); |
| | | this.cbCode.TabIndex = 2; |
| | | // |
| | | // FrmTool |
| | | // |
| | | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); |
| | | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |
| | | this.ClientSize = new System.Drawing.Size(504, 89); |
| | | this.Controls.Add(this.cbCode); |
| | | this.Controls.Add(this.btnTest); |
| | | this.Controls.Add(this.txtCode); |
| | | this.Name = "FrmTool"; |
| | |
| | | |
| | | private System.Windows.Forms.TextBox txtCode; |
| | | private System.Windows.Forms.Button btnTest; |
| | | private System.Windows.Forms.ComboBox cbCode; |
| | | } |
| | | } |
| | |
| | | { |
| | | FrmWin win; |
| | | |
| | | List<string> codes = new List<string> { "重置鼠标", "打开方案", "保存方案", "矢量数据", "影像数据", "地形数据", "模型数据(osgb)", "模型数据(obj)", "编辑对象", "点量算", "坡向分析", "线量算", "面量算", "体量算", "角量算", "空间统计", "空间分析", "剖面分析", "坡度分析", "等值线", "剖面分析", "地理场景产品组装", "传统4D产品派生", "打开fly" }; |
| | | |
| | | public FrmTool(FrmWin win) |
| | | { |
| | | this.win = win; |
| | | InitializeComponent(); |
| | | this.Load += FrmTool_Load; |
| | | } |
| | | |
| | | void FrmTool_Load(object sender, EventArgs e) |
| | | { |
| | | cbCode.DataSource = codes; |
| | | cbCode.SelectedIndex = 0; |
| | | this.cbCode.SelectedIndexChanged += cbCode_SelectedIndexChanged; |
| | | } |
| | | |
| | | private void cbCode_SelectedIndexChanged(object sender, EventArgs e) |
| | | { |
| | | ComboBox cb = sender as ComboBox; |
| | | |
| | | int idx = cb.SelectedIndex; |
| | | this.txtCode.Text = "0x" + (0xc0 + idx).ToString("X").ToLower(); |
| | | } |
| | | |
| | | private void btnTest_Click(object sender, EventArgs e) |