Ejemplo n.º 1
0
        /// <summary>
        /// 傳入一個DTO,修改,一次修改一筆
        /// </summary>
        public void Update_NgData(MEM01_0000 MEM01_0000)
        {
            Comm   comm = new Comm();
            string sSql = " UPDATE MEM01_0000 " +
                          "     SET   ng_qty    =  @ng_qty      " +
                          "     WHERE mo_code   =  @mo_code     " +
                          "     AND  work_code  =  @work_code   ";

            using (SqlConnection con_db = comm.Set_DBConnection())
            {
                con_db.Execute(sSql, MEM01_0000);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 傳入一個DTO,存檔,一次存檔一筆
        /// </summary>
        public void InsertData(MEM01_0000 MEM01_0000)
        {
            Comm   comm = new Comm();
            string sSql = " INSERT INTO " +
                          " MEM01_0000 (  mo_code,  work_code , station_code , mac_code ," +
                          "               work_time_s , work_time_e ,  ok_qty,  ok_unit , " +
                          "               ng_qty,  ng_unit,  work_sec ) " +
                          "     VALUES (  @mo_code, @work_code,@station_code,@mac_code, " +
                          "               @work_time_s, @work_time_e, @ok_qty, @ok_unit, " +
                          "               @ng_qty, @ng_unit, @work_sec ) ";

            using (SqlConnection con_db = comm.Set_DBConnection())
            {
                con_db.Execute(sSql, MEM01_0000);
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 傳入一個DTO,修改,一次修改一筆
        /// </summary>
        public void UpdateData(MEM01_0000 MEM01_0000)
        {
            Comm   comm = new Comm();
            string sSql = " UPDATE MEM01_0000 " +
                          "    SET mo_code       =  @mo_code,      " +
                          "        work_code     =  @work_code,     " +
                          "        station_code  =  @station_code,     " +
                          "        mac_code      =  @mac_code,     " +
                          "        work_time_s   =  @work_time_s,     " +
                          "        work_time_e   =  @work_time_e,     " +
                          "        ok_qty        =  @ok_qty,   " +
                          "        ok_unit       =  @ok_unit,      " +
                          "        ng_qty        =  @ng_qty,     " +
                          "        ng_unit       =  @ng_unit,     " +
                          "        work_sec      =  @work_sec,     " +

                          "  WHERE MEM01_0000   =  @mem01_0000    ";

            using (SqlConnection con_db = comm.Set_DBConnection())
            {
                con_db.Execute(sSql, MEM01_0000);
            }
        }