示例#1
0
        /// <summary>
        /// 傳入一個DTO,修改,一次修改一筆
        /// </summary>
        public void UpdateData(MED09_0000 MED09_0000)
        {
            Comm   comm = new Comm();
            string sSql = " UPDATE MED09_0000 " +
                          "    SET mo_code      =  @mo_code,      " +
                          "        wrk_code     =  @wrk_code,     " +
                          "        mac_code     =  @mac_code,     " +
                          "        pro_code     =  @pro_code,     " +
                          "        pro_lot_no   =  @pro_lot_no,   " +
                          "        pro_qty      =  @pro_qty,      " +
                          "        ins_date     =  @ins_date,     " +
                          "        ins_time     =  @ins_time,     " +
                          "        usr_code     =  @usr_code,     " +
                          "        des_memo     =  @des_memo,     " +
                          "        is_ng        =  @is_ng,        " +
                          "        is_end       =  @is_end,       " +
                          "        end_memo     =  @end_memo,     " +
                          "        end_date     =  @end_date,     " +
                          "        end_time     =  @end_time,     " +
                          "        end_usr_code =  @end_usr_code  " +
                          "  WHERE med09_0000   =  @med09_0000    ";

            using (SqlConnection con_db = comm.Set_DBConnection())
            {
                con_db.Execute(sSql, MED09_0000);
            }
        }
示例#2
0
        /// <summary>
        /// 傳入一個DTO,存檔,一次存檔一筆
        /// </summary>
        public void InsertData(MED09_0000 MED09_0000)
        {
            Comm   comm = new Comm();
            string sSql = " INSERT INTO " +
                          " MED09_0000 (  mo_code,  wrk_code,  mac_code,  pro_code,  pro_lot_no,  pro_qty,  ins_date,  ins_time,  usr_code, " +
                          "               des_memo,  is_ng,  is_end,  end_memo,  end_date,  end_time,  end_usr_code ) " +

                          "     VALUES ( @mo_code, @wrk_code, @mac_code, @pro_code, @pro_lot_no, @pro_qty, @ins_date, @ins_time, @usr_code, " +
                          "              @des_memo, @is_ng, @is_end, @end_memo, @end_date, @end_time, @end_usr_code ) ";

            using (SqlConnection con_db = comm.Set_DBConnection())
            {
                con_db.Execute(sSql, MED09_0000);
            }
        }
示例#3
0
        /// <summary>
        /// 傳入一個DTO,存檔,一次存檔一筆
        /// </summary>
        public void InsertData(MED09_0000 MED09_0000)
        {
            Comm   comm = new Comm();
            string sSql = " INSERT INTO " +
                          " MED09_0000 (  mo_code,  wrk_code,  work_code, station_code,  mac_code,  pro_code,  pro_lot_no,  pro_qty,  ins_date,  ins_time,  usr_code, " +
                          "               des_memo,  is_ng,  is_end,  end_memo,  end_date,  end_time,  end_usr_code , " +
                          "               user_field_01, user_field_02, user_field_03, user_field_04, user_field_05,    " +
                          "               user_field_06, user_field_07, user_field_08, user_field_09, user_field_10 ) " +

                          "     VALUES ( @mo_code, @wrk_code,  @work_code, @station_code, @mac_code, @pro_code, @pro_lot_no, @pro_qty, @ins_date, @ins_time, @usr_code, " +
                          "              @des_memo, @is_ng, @is_end, @end_memo, @end_date, @end_time, @end_usr_code,  " +
                          "             @user_field_01, @user_field_02, @user_field_03, @user_field_04, @user_field_05,    " +
                          "             @user_field_06, @user_field_07, @user_field_08, @user_field_09, @user_field_10 )    ";

            using (SqlConnection con_db = comm.Set_DBConnection())
            {
                con_db.Execute(sSql, MED09_0000);
            }
        }
示例#4
0
        /// <summary>
        /// 傳入一個DTO,修改,一次修改一筆
        /// </summary>
        public void UpdateData(MED09_0000 MED09_0000)
        {
            Comm   comm = new Comm();
            string sSql = " UPDATE MED09_0000 " +
                          "    SET " +
                          //"mo_code      =  @mo_code,      " +
                          //"        wrk_code     =  @wrk_code,     " +
                          //"        mac_code     =  @mac_code,     " +
                          //"        pro_code     =  @pro_code,     " +
                          //"        pro_lot_no   =  @pro_lot_no,   " +
                          //"        pro_qty      =  @pro_qty,      " +
                          //"        ins_date     =  @ins_date,     " +
                          //"        ins_time     =  @ins_time,     " +
                          //"        usr_code     =  @usr_code,     " +
                          //"        des_memo     =  @des_memo,     " +
                          //"        is_ng        =  @is_ng,        " +
                          //"        is_end       =  @is_end,       " +
                          //"        end_memo     =  @end_memo,     " +
                          //"        end_date     =  @end_date,     " +
                          //"        end_time     =  @end_time,     " +
                          //"        end_usr_code =  @end_usr_code, " +
                          "        user_field_01=  @user_field_01," +
                          "        user_field_02=  @user_field_02," +
                          "        user_field_03=  @user_field_03," +
                          "        user_field_04=  @user_field_04," +
                          "        user_field_05=  @user_field_05," +
                          "        user_field_06=  @user_field_06," +
                          "        user_field_07=  @user_field_07," +
                          "        user_field_08=  @user_field_08, " +
                          "        user_field_09=  @user_field_09," +
                          "        user_field_10=  @user_field_10 " +
                          "  WHERE med09_0000   =  @med09_0000    ";

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