コード例 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            string         str出厂编号 = "";
            ControlElement control = _form.GetControlElementByInfo("dbo.水泵型号管理", "出厂编号");

            str出厂编号 += control.GetValue();
            水泵环境参数配置 dp = new 水泵环境参数配置(str出厂编号, (int)ID号);

            dp.ShowDialog();
        }
コード例 #2
0
ファイル: 电机型号管理.cs プロジェクト: ping1994/yinghe
        private string 方案保存_拼接插入Sql()
        {
            Decimal id = -1;

            id = Convert.ToDecimal(this.grid1.GetFocusedRowCellValue("ID"));
            string strSql = "insert dbo.电机型号管理方案  (ID,电机型号,电机制造商,出厂编号,额定电压,额定电流,额定功率,额定效率) values (" +
                            id + ",";

            ControlElement control = _form.GetControlElementByInfo("dbo.电机型号管理", "电机型号");

            strSql += "'";
            strSql += control.GetValue();
            strSql += "',";
            control = _form.GetControlElementByInfo("dbo.电机型号管理", "电机制造商");
            strSql += "'";
            strSql += control.GetValue();
            strSql += "',";
            control = _form.GetControlElementByInfo("dbo.电机型号管理", "出厂编号");
            strSql += "'";
            strSql += control.GetValue();
            strSql += "',";
            control = _form.GetControlElementByInfo("dbo.电机型号管理", "额定电压");
            strSql += "'";
            strSql += control.GetValue();
            strSql += "',";
            control = _form.GetControlElementByInfo("dbo.电机型号管理", "额定电流");
            strSql += "'";
            strSql += control.GetValue();
            strSql += "',";
            control = _form.GetControlElementByInfo("dbo.电机型号管理", "额定功率");
            strSql += "'";
            strSql += control.GetValue();
            strSql += "',";
            control = _form.GetControlElementByInfo("dbo.电机型号管理", "额定效率");
            strSql += "'";
            strSql += control.GetValue();
            strSql += "')";

            return(strSql);
        }
コード例 #3
0
ファイル: 电机型号管理.cs プロジェクト: ping1994/yinghe
        private string 方案保存_拼接更新Sql()
        {
            Decimal id = -1;

            id = Convert.ToDecimal(this.grid1.GetFocusedRowCellValue("ID"));
            string strSql = "update dbo.电机型号管理方案  set ";

            ControlElement control = _form.GetControlElementByInfo("dbo.电机型号管理", "电机型号");

            strSql += "电机型号='";
            strSql += control.GetValue();
            strSql += "',";
            control = _form.GetControlElementByInfo("dbo.电机型号管理", "电机制造商");
            strSql += "电机制造商='";
            strSql += control.GetValue();
            strSql += "',";
            control = _form.GetControlElementByInfo("dbo.电机型号管理", "出厂编号");
            strSql += "出厂编号='";
            strSql += control.GetValue();
            strSql += "',";
            control = _form.GetControlElementByInfo("dbo.电机型号管理", "额定电压");
            strSql += "额定电压='";
            strSql += control.GetValue();
            strSql += "',";
            control = _form.GetControlElementByInfo("dbo.电机型号管理", "额定电流");
            strSql += "额定电流='";
            strSql += control.GetValue();
            strSql += "',";
            control = _form.GetControlElementByInfo("dbo.电机型号管理", "额定功率");
            strSql += "额定功率='";
            strSql += control.GetValue();
            strSql += "',";
            control = _form.GetControlElementByInfo("dbo.电机型号管理", "额定效率");
            strSql += "额定效率='";
            strSql += control.GetValue();
            strSql += "' where ID=" + id;

            return(strSql);
        }
コード例 #4
0
        private string 方案保存_拼接更新Sql()
        {
            Decimal id     = -1;
            string  strSql = "";

            id     = Convert.ToDecimal(this.grid1.GetFocusedRowCellValue("ID"));
            strSql = "update  dbo.水泵型号管理方案 set  ";

            ControlElement control = _form.GetControlElementByInfo("dbo.水泵型号管理", "水泵型号");

            strSql += "水泵型号='";
            strSql += control.GetValue();
            strSql += "',";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "水泵类型");
            strSql += "水泵类型='";
            strSql += control.GetValue();
            strSql += "',";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "用户名称");
            strSql += "用户名称='";
            strSql += control.GetValue();
            strSql += "',";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "出厂编号");
            strSql += "出厂编号='";
            strSql += control.GetValue();
            strSql += "',";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "额定流量");
            strSql += "额定流量=";
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "额定扬程");
            strSql += "额定扬程=";
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "额定轴功率");
            strSql += "额定轴功率=";
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "汽蚀余量");
            strSql += "汽蚀余量=";
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "进口直径");
            strSql += "进口直径=";
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "出口直径");
            strSql += "出口直径=";
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "额定转速");
            strSql += "额定转速=";
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "安装图片");
            strSql += "安装图片=";
            strSql += "?,";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况1_流量");
            strSql += "工况1_流量=";
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况2_流量");
            strSql += "工况2_流量=";
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况3_流量");
            strSql += "工况3_流量=";
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况4_流量");
            strSql += "工况4_流量=";
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况5_流量");
            strSql += "工况5_流量=";
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况1_扬程");
            strSql += "工况1_扬程=";
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况2_扬程");
            strSql += "工况2_扬程=";
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况3_扬程");
            strSql += "工况3_扬程=";
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况4_扬程");
            strSql += "工况4_扬程=";
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况5_扬程");
            strSql += "工况5_扬程=";
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况1_轴功率");
            strSql += "工况1_轴功率=";
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况2_轴功率");
            strSql += "工况2_轴功率=";
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况3_轴功率");
            strSql += "工况3_轴功率=";
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况4_轴功率");
            strSql += "工况4_轴功率=";
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况5_轴功率");
            strSql += "工况5_轴功率=";
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况1_汽蚀余量");
            strSql += "工况1_汽蚀余量=";
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况2_汽蚀余量");
            strSql += "工况2_汽蚀余量=";
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况3_汽蚀余量");
            strSql += "工况3_汽蚀余量=";
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况4_汽蚀余量");
            strSql += "工况4_汽蚀余量=";
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况5_汽蚀余量");
            strSql += "工况5_汽蚀余量=";
            strSql += Convert.ToDouble(control.GetValue());
            strSql += " where ID=" + id;

            return(strSql);
        }
コード例 #5
0
        private string 方案保存_拼接插入Sql()
        {
            Decimal id     = -1;
            string  strSql = "";

            id     = Convert.ToDecimal(this.grid1.GetFocusedRowCellValue("ID"));
            strSql = "insert into dbo.水泵型号管理方案  (ID,水泵型号,水泵类型,用户名称,出厂编号,额定流量," +
                     "额定扬程,额定轴功率,汽蚀余量,进口直径,出口直径,额定转速,安装图片," +
                     "工况1_流量,工况2_流量,工况3_流量,工况4_流量,工况5_流量,工况1_扬程," +
                     "工况2_扬程,工况3_扬程,工况4_扬程,工况5_扬程,工况1_轴功率,工况2_轴功率," +
                     "工况3_轴功率,工况4_轴功率,工况5_轴功率,工况1_汽蚀余量,工况2_汽蚀余量," +
                     "工况3_汽蚀余量,工况4_汽蚀余量,工况5_汽蚀余量) values (" +
                     id + ",";

            ControlElement control = _form.GetControlElementByInfo("dbo.水泵型号管理", "水泵型号");

            strSql += "'";
            strSql += control.GetValue();
            strSql += "',";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "水泵类型");
            strSql += "'";
            strSql += control.GetValue();
            strSql += "',";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "用户名称");
            strSql += "'";
            strSql += control.GetValue();
            strSql += "',";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "出厂编号");
            strSql += "'";
            strSql += control.GetValue();
            strSql += "',";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "额定流量");
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "额定扬程");
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "额定轴功率");
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "汽蚀余量");
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "进口直径");
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "出口直径");
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "额定转速");
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "安装图片");
            strSql += "?,";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况1_流量");
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况2_流量");
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况3_流量");
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况4_流量");
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况5_流量");
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况1_扬程");
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况2_扬程");
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况3_扬程");
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况4_扬程");
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况5_扬程");
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况1_轴功率");
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况2_轴功率");
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况3_轴功率");
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况4_轴功率");
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况5_轴功率");
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况1_汽蚀余量");
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况2_汽蚀余量");
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况3_汽蚀余量");
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况4_汽蚀余量");
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ",";
            control = _form.GetControlElementByInfo("dbo.水泵型号管理", "工况5_汽蚀余量");
            strSql += Convert.ToDouble(control.GetValue());
            strSql += ")";

            return(strSql);
        }